cloudstack/plugins
Wido den Hollander 2a5f37c1b1
CLOUDSTACK-8715: Add channel to Instances for Qemu Guest Agent
This commit adds a additional VirtIO channel with the name
'org.qemu.guest_agent.0' to all Instances.

With the Qemu Guest Agent the Hypervisor gains more control over the Instance if
these tools are present inside the Instance, for example:

* Power control
* Flushing filesystems
* Fetching Network information

In the future this should allow safer snapshots on KVM since we can instruct the
Instance to flush the filesystems prior to snapshotting the disk.

More information: http://wiki.qemu.org/Features/QAPI/GuestAgent

Keep in mind that on Ubuntu AppArmor still needs to be disabled since the default
AppArmor profile doesn't allow libvirt to write into /var/lib/libvirt/qemu

This commit does not add any communication methods through API-calls, it merely
adds the channel to the Instances and installs the Guest Agent in the SSVMs.

With the addition of the Qemu Guest Agent channel a second channel appears in /dev
on a SSVM as a VirtIO port.

The order in which the ports are defined in the XML matters for the naming inside
the SSVM VM and by not relying on /dev/vportXX but looking for a static name the
SSVM still boots properly if the order in the XML definition is changed.

A SSVM with both ports attached will have something like this:

  root@v-215-VM:~# ls -l /dev/virtio-ports
  total 0
  lrwxrwxrwx 1 root root 11 May 13 21:41 org.qemu.guest_agent.0 -> ../vport0p2
  lrwxrwxrwx 1 root root 11 May 13 21:41 v-215-VM.vport -> ../vport0p1
  root@v-215-VM:~# ls -l /dev/vport*
  crw------- 1 root root 251, 1 May 13 21:41 /dev/vport0p1
  crw------- 1 root root 251, 2 May 13 21:41 /dev/vport0p2
  root@v-215-VM:~#

In this case the SSVM port points to /dev/vport0p1, but if the order in the XML
is different it might point to /dev/vport0p2

By looking for a portname with a pre-defined pattern in /dev/virtio-ports we
do not rely on the order in the XML definition.

Signed-off-by: Wido den Hollander <wido@widodh.nl>
2016-11-23 16:01:08 +01:00
..
acl Adds support for four position versions and optional db upgrades 2016-08-30 13:32:32 +05:30
affinity-group-processors Adds support for four position versions and optional db upgrades 2016-08-30 13:32:32 +05:30
alert-handlers Adds support for four position versions and optional db upgrades 2016-08-30 13:32:32 +05:30
api Adds support for four position versions and optional db upgrades 2016-08-30 13:32:32 +05:30
database Adds support for four position versions and optional db upgrades 2016-08-30 13:32:32 +05:30
dedicated-resources Adds support for four position versions and optional db upgrades 2016-08-30 13:32:32 +05:30
deployment-planners Adds support for four position versions and optional db upgrades 2016-08-30 13:32:32 +05:30
event-bus Adds support for four position versions and optional db upgrades 2016-08-30 13:32:32 +05:30
file-systems/netapp Adds support for four position versions and optional db upgrades 2016-08-30 13:32:32 +05:30
ha-planners/skip-heurestics Adds support for four position versions and optional db upgrades 2016-08-30 13:32:32 +05:30
host-allocators/random Adds support for four position versions and optional db upgrades 2016-08-30 13:32:32 +05:30
hypervisors CLOUDSTACK-8715: Add channel to Instances for Qemu Guest Agent 2016-11-23 16:01:08 +01:00
network-elements CLOUDSTACK-9401 : Support for Internal DNS in Nuage VSP plugin 2016-11-14 14:39:48 +01:00
outofbandmanagement-drivers/ipmitool Merge branch '4.9' 2016-08-23 14:16:53 +05:30
storage Making use of the new SolidFire SDK for Java 2016-10-31 08:09:39 -06:00
storage-allocators/random Adds support for four position versions and optional db upgrades 2016-08-30 13:32:32 +05:30
user-authenticators Adds support for four position versions and optional db upgrades 2016-08-30 13:32:32 +05:30
pom.xml Adds support for four position versions and optional db upgrades 2016-08-30 13:32:32 +05:30