Skip to content

Commit

Permalink
Merge pull request #57 from olifre/qemu-guest-agent-support
Browse files Browse the repository at this point in the history
Add qemu-guest-agent channel.
  • Loading branch information
strzibny authored Oct 6, 2019
2 parents 55ed359 + 301efc2 commit ca92983
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/fog/libvirt/models/compute/server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ class Server < Fog::Compute::Server
attribute :display
attribute :cpu
attribute :hugepages
attribute :guest_agent

attribute :state

Expand Down Expand Up @@ -480,6 +481,7 @@ def defaults
:display => default_display,
:cpu => {},
:hugepages => false,
:guest_agent => true,
}
end

Expand Down
5 changes: 5 additions & 0 deletions lib/fog/libvirt/models/compute/templates/server.xml.erb
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@
<source <%= nic.type == 'bridge' ? "bridge='#{nic.bridge}'" : "network='#{nic.network}'" %> />
<model type='<%= nic.model %>'/>
</interface>
<% end -%>
<% if guest_agent -%>
<channel type='unix'>
<target type='virtio' name='org.qemu.guest_agent.0'/>
</channel>
<% end -%>
<serial type='pty'>
<target port='0'/>
Expand Down

0 comments on commit ca92983

Please sign in to comment.