Using virsh to load scripts for the guest machine
Quoted 15 lines · Mauricio Tavares
Quoted 7 lines · Eric Blake
Quoted 5 lines · Mauricio Tavares
Right on the top of
http://www.centos.org/docs/5/html/5.2/Virtualization/chap-Virtualization-Managing_guests_with_virsh.html,
it seems to imply you can load/send scripts to the vm guest using virsh. Is that possible? How and what are the limitations? Can you query the vm guest?Quoted 7 lines
What type of scripts are you talking about? You may be thinking more about the capabilities of what libguestfs provides, for modifying disk images. In general, virsh itself controls how to start a guest, but not the additional layers of communication (such as virtio, qemu-ga, or the libguestfs appliance app) required for a host to command a guest to do something from within the guest.
Quoted 4 lines
Basic one would be in case a machine has been paused for a long
time. You know as in "hey, you lazy vm! You have been sleeping for two weeks! Now your clock is way off and poor ntp can't sync it back. So, here's current date!"
That is something that fits better through qemu-ga, but no one has implemented it yet (cc'ing qemu-devel in case I'm misrepresenting things). Of course, if we did have a qemu-ga command for pushing the current time into the guest, then libvirt could usefully expose an API to wrap that qemu-ga command.
Signature · 2 lines
Eric Blake [email protected] +1-919-301-3266 Libvirt virtualization library http://libvirt.org
Quoted 21 lines · Eric Blake
Quoted 15 lines · Mauricio Tavares
Quoted 7 lines · Eric Blake
Quoted 5 lines · Mauricio Tavares
Right on the top of
http://www.centos.org/docs/5/html/5.2/Virtualization/chap-Virtualization-Managing_guests_with_virsh.html,
it seems to imply you can load/send scripts to the vm guest using virsh. Is that possible? How and what are the limitations? Can you query the vm guest?Quoted 7 lines
What type of scripts are you talking about? You may be thinking more about the capabilities of what libguestfs provides, for modifying disk images. In general, virsh itself controls how to start a guest, but not the additional layers of communication (such as virtio, qemu-ga, or the libguestfs appliance app) required for a host to command a guest to do something from within the guest.
Quoted 4 lines
Basic one would be in case a machine has been paused for a long
time. You know as in "hey, you lazy vm! You have been sleeping for two weeks! Now your clock is way off and poor ntp can't sync it back. So, here's current date!"
Quoted 5 lines
That is something that fits better through qemu-ga, but no one has implemented it yet (cc'ing qemu-devel in case I'm misrepresenting things). Of course, if we did have a qemu-ga command for pushing the current time into the guest, then libvirt could usefully expose an API to wrap that qemu-ga command.
Could you setup a wiki page on qemu.org with a list of qemu-ga commands that libvirt would like?
Adding commands is pretty trivial so if ya'll have a list of things you'd like, they're great quick tasks that we can find folks to work on.
Regards,
Anthony Liguori
Quoted 4 lines
Signature · 3 lines
-- Eric Blake [email protected] +1-919-301-3266 Libvirt virtualization library http://libvirt.org
Quoted 5 lines · Anthony Liguori
Quoted 5 lines
Quoted 4 lines
Basic one would be in case a machine has been paused for a long
time. You know as in "hey, you lazy vm! You have been sleeping for two weeks! Now your clock is way off and poor ntp can't sync it back. So, here's current date!"
Quoted 8 lines
Quoted 5 lines
That is something that fits better through qemu-ga, but no one has implemented it yet (cc'ing qemu-devel in case I'm misrepresenting things). Of course, if we did have a qemu-ga command for pushing the current time into the guest, then libvirt could usefully expose an API to wrap that qemu-ga command.
Could you setup a wiki page on qemu.org with a list of qemu-ga commands that libvirt would like?
I gave it a shot (feel free to improve it)
http://wiki.qemu.org/Features/GuestAgent/UsefulCommands
Signature · 2 lines
Eric Blake [email protected] +1-919-301-3266 Libvirt virtualization library http://libvirt.org