Dear all: Afer run the command 'qemu-kvm -hda /root/free.img -m 512 -usbdevice tablet -vga qxl -spice port=5930,disable-ticketing' , and the VM starts natrually. Then I run the command 'virsh list' , it shows as follows: [root at localhost ~]# virsh list Id Name State ---------------------------------- [root at localhost ~]# there is no VM running! I am puzzled , can someone help me? Yours Sinerely! suyi -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20120308/3cf4eda5/attachment.htm>
On 03/08/2012 06:15 AM, wangsuyi640 wrote:> Dear all: > > Afer run the command 'qemu-kvm -hda /root/free.img -m 512 -usbdevice > tablet -vga qxl -spice port=5930,disable-ticketing' , and the VM starts> > there is no VM running! I am puzzled , can someone help me?Running a VM directly via qemu-kvm makes the VM invisible to libvirt, unless you first run 'virsh qemu-attach'. There are certain restrictions for this to work, such as having a socket-based monitor on the guest. 'virsh list' can only list VMs known to libvirt. -- 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/libvirt-users/attachments/20120308/41972db9/attachment.sig>
Hi, well, you are not using the libvirt api to create the vm :) You need to use something like "virt-install" and then start the vm via "virsh start". Afaik "virsh list" only shows machines which are using libvirt. Kind regards, Felix Blanke On 3/8/12 2:15 PM, wangsuyi640 wrote:> Dear all: > > Afer run the command 'qemu-kvm -hda /root/free.img -m 512 -usbdevice > tablet -vga qxl -spice port=5930,disable-ticketing' , and the VM starts > natrually. Then I run the command 'virsh list' , it shows as follows: > > [root at localhost ~]# virsh list > > Id Name State > > ---------------------------------- > > [root at localhost ~]# > > there is no VM running! I am puzzled , can someone help me? > > Yours Sinerely! > > suyi > > > > _______________________________________________ > libvirt-users mailing list > libvirt-users at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-users