[libvirt] libvirt and qemu

Eric Blake eblake at redhat.com
Wed Jul 4 12:54:56 UTC 2012


On 07/04/2012 06:43 AM, mattias wrote:
> when i do
> virsh connect qemu:///system
> i can connect
> but virsh list 
> dosent show anything
> my qemu vms are not created with virt-manager

How were your qemu vms created?  Was it by direct invocation of 'qemu'?
 If so, you _might_ be able to teach libvirt about those vms by using
'virsh qemu-attach $pid', but it depends on the vm having been created
with a proper monitor connection.

In general, libvirt is better suited to managing vms created via libvirt
interfaces (virt-manager is only one of many programs that uses libvirt
interfaces for creating a vm) than it is for managing random vms created
via direct command-line invocation of qemu.

The 'virsh domxml-from-native' command might help you in creating a
libvirt XML representation that matches what you are currently passing
directly to qemu, although that area of code is not the best-maintained
at the moment.

-- 
Eric Blake   eblake at redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20120704/77b0ce83/attachment-0001.sig>


More information about the libvir-list mailing list