Using qemu guest agent for snapshots

Hi,

I found the following advice on http://www.centosabc.com/archives/1236:

Add the QEMU guest agent channel to the guest from the host

Add the following elements to the guest’s XML file using the # virsh edit win7x86command and save the changes. The source socket name must be unique in the host, namedwin7x86.agent in this example:

(replaced < with % …, sorry)

%channel type=‘unix’>
%source mode=‘bind’ path=‘/var/lib/libvirt/qemu/win7x86.agent’/>
%target type=‘virtio’ name=‘org.qemu.guest_agent.0’/>
%/channel>

(How) can I use %i or another way of saying VMID in the RAW content?
It would need to replace win7x86.agent in the above, so it works for all VMs created from a cetain template.

Any ideas?

PS: If you haven’t heard about this feature, read the linked page for a nice intro. Basically, the guest agent is needed for any kind of backup consistency. I think it is at least available for Linux (as per above link) and Windows (Docs can be found at: Installing the QEMU Guest Agent for Application-Consistent Snapshots (Windows-based VMs) - holy f*** Stratus! This company runs at 5 nines+ availability across ALL their worldwide customers for decades.)

Hi Florian,

AFAIK in OpenNebula v5 you can enable the qemu guest agent in the VM template. Check OS Booting -> Features -> Qemu Guest Agent. (hmm the documentation is not updated tough)

Also, keep in mind that if you want “complete” consistency you must add/enable hooks in the guiest VM(qemu-guest-agent hooks example) to flush all needed buffers. For example if you have database server in the VM you must flush the database buffers(cache) too.

Kind Regards,
Anton Todorov

Thanks!
There’s a default script for MySQL and nothing else. I’ll definitely share whatever I add.

Anyone on 5.x who can tick that box and post me their XML?

I don’t have time to install a 5.x just for the test, at least not right now :-/