Wow, thanks. That looks like what I need and much more!
I'm currently looking for support for LXC and XEN, and maybe KVM later so I
want a solution that is as hypervisor agnostic as possible so qemu-ga might
not be as usable as libguestfs.
Best regards.
Jørgen
2012/7/12 Osier Yang <jyang(a)redhat.com>
On 2012年07月12日 14:43, Jørgen Nordmoen wrote:
> Hi again.
>
> I was just wondering if there are any support for running programs
> inside a VM through libvirt. From what I can see in the API the only
> solution I found was connecting to the VM with openConsole and running
> the program I want. This however seems a bit tricky through Python and I
> was just wondering if there are any simpler solutions.
>
libguestfs does the work.
http://libguestfs.org/
And you might also want to have a look at qemu-ga, Libvirt supports
to talk to qemu-ga with APIs (only a few qemu-ga commands), and anyway
qemu-ga supports relatively few commands, no support for running
a program inside a guest yet.
Regards,
Osier