Uh oh!
There was an error while loading. Please reload this page.
CLOUDSTACK-8715: Add VirtIO channel to all Instances for the Qemu Gue… - #985
CLOUDSTACK-8715: Add VirtIO channel to all Instances for the Qemu Gue…#985wido wants to merge 1 commit into
Conversation
remibergsma
commented
Oct 28, 2015
@wido Thanks for working on this, awesome! I was testing this PR and found that the SSVM and CPVM systemvms do not start properly. This is the error: Here is the channel dir: The I've installed the rpm package that I've built from this branch. The agent seems to run as root: It was tested on a KVM hypervisor on CentOS 7. Ping me if you need more details. |
wido
commented
Oct 28, 2015
@remibergsma Hmm, was SELinux enabled on that system? Can't see any reason why it wouldn't work. All the directories exist. Do you by any chance have the XML the Agent generated for the SSVM for example? |
remibergsma
commented
Oct 28, 2015
Hi @wido : SELinux is off: The generated XML: |
wido
commented
Oct 28, 2015
@remibergsma Ok, that is odd. A proper XML should look like this: path is not required, that is computed by libvirt. But the state connected is probably the issue. I'll fix that. |
d3a0669 to
2f43a04Comparewido
commented
Oct 29, 2015
@borisroman Could you give this PR a spin? |
remibergsma
commented
Oct 29, 2015
@wido I will also test it again today. |
ustcweizhou
commented
Oct 29, 2015
I have same issue with Remi, |
ustcweizhou
commented
Oct 29, 2015
succeed after the following change: |
wido
commented
Oct 29, 2015
Hmm, ok. That should be allowed. Since we want the Guest tools also to be supported on SSVMs to control them properly. |
ustcweizhou
commented
Oct 29, 2015
that is good idea. then we need to rebuild systemvm template with qemu-guest-agent |
ustcweizhou
commented
Oct 29, 2015
by the way, for user vms, I think it is better to add the field in vm_instance/user_vm or zone/cluster/global setting to determine if the vm is qemu guest agent enabled. |
ustcweizhou
commented
Oct 29, 2015
uservm can not start 2015-10-29 21:04:38,017 WARN resource.wrapper.LibvirtStartCommandWrapper LibvirtException |
wido
commented
Oct 30, 2015
@ustcweizhou Which version of libvirt are you using? If you use libvirt 1.0.6 or newer, you can omit the path='...' attribute of the |
ustcweizhou
commented
Oct 30, 2015
@wido ja, you got it. The issue happened on a host running with Ubuntu 12.04 (QEMU 1.2.1 and libvirt 0.9.13) |
ustcweizhou
commented
Oct 30, 2015
@wido by the way, I just remember I have implemented some codes for qemu-guest-agent support , based on cloudstack 4.2.0 maybe. |
wido
commented
Oct 30, 2015
@ustcweizhou@remibergsma I just pushed a new version of the commit. On Ubuntu AppArmor needs to be disabled since the default profile for libvirt doesn't allow writing into /var/lib/libvirt/qemu. This is however already the case with the SSVM. This could be fixed by adding this to '/etc/apparmor.d/abstractions/libvirt-qemu': /var/lib/libvirt/qemu/channel/target/* rw, |
wido
commented
Nov 9, 2015
I justed pushed a new commit which uses libvirt-java for the communication with the Guest Agent. The build will fail since this patch for libvirt-java has not been accepted upstream: |
ustcweizhou
commented
Nov 12, 2015
@wido nice, I will test it. |
wido
commented
Nov 13, 2015
@ustcweizhou Yes, it does. See the patches I posted above. |
wido
commented
Nov 30, 2015
Still working on this one. However, I need to get stuff into libvirt-java upstream. Working on that here: https://github.com/wido/libvirt-java/commits/qemu-guest-command |
NuxRo
commented
Nov 30, 2015
Ok, godspeed. |
nislim
commented
Jan 17, 2016
Any progress on getting the patches into upstream libvirt-java? @wido |
wido
commented
Jan 17, 2016
@nislim No, not really. The people at libvirt-java aren't the fastest. Thinking about forking it into CloudStack itself. |
b6a8707 to
68aad17Comparewido
commented
Apr 26, 2016
I just rebased the commit against master, but still waiting on libvirt-java. Really think we should fork libvirt-java to get this fixed. |
| #irqbalance from wheezy-backports | ||
| chroot . apt-get --no-install-recommends -q -y --force-yes -t wheezy-backports install irqbalance | ||
| #qemu guest agent | ||
| chroot . apt-get --no-install-recommends -q -y --force-yes install qemu-guest-agent |
There was a problem hiding this comment.
this needs to go in tools/appliance/definitions/systemvmtemplate
yadvr
commented
May 2, 2016
@wido thanks for the feature, can you rebase against latest master and push -f; update on the state of the PR We should have this feature. tag:needlove |
wido
commented
May 2, 2016
@rhtyd Done! Rebased against master |
swill
commented
May 12, 2016
Does this require a change to the system VM template? I am pulling this in for testing now... |
wido
commented
May 12, 2016
@swill Yes, it does. It install the Qemu Quest Agent inside the SSVM. It doesn't hurt to do that already, it is just that the libvirt-java bindings don't allow us to talk to the VMs. |
wido
commented
May 12, 2016
Thinking about closing this PR and coming up with two new ones. One which only adds the channel and installs Qemu Guest Agent in the SSVM. |
swill
commented
May 12, 2016
This failed during compiling: Here is the error |
…st 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 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
wido
commented
May 13, 2016
Closing this one in favor of #1545 |
…st 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:
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