I have used KVM since kvm-7x and now i am using KVM-86(as i cannot compile KVM-88). However, i have never used VMM and libvirt !
I use KVM as below:
%/usr/local/bin/qemu-system-x86_64 -m 256 -soundhw es1370 -hda /media/E/winxp.img -hdb /dev/sda7 -localtime -net nic -net user -nographic -daemonize -redir tcp:3389::3389 -boot c -k en-us &
%rdesktop localhost:3389 -u sw2wolf -p 123 -g 1440x880 -D -K -r sound:remote
It works fine ! So i donot understand why we need VMM and libvirt ?
Any suggestions are appreciated !
VMM and libvirt and do the same things as you do now managing kvm by command line. Together, they just provide a GUI front end that makes it easier to manage your guests.
Libvirt provides a daemon service that manages your kvm processes. It starts, stops, pauses and can do some things as you normally would using the monitor commands but not everything. So libvirt is one layer above the kvm process. VMM (Virtual Machine manager) is a GUI front end that sends instructions via a libvirt client to libvirt daemon(s) to perform operations on the kvm process that it is are managing. VMM therefore sits a little farther away from the kvm process. So you have
VMM -----> libvirtclient----> libvirtd ------> kvm process
Libvirt daemon service and kvm processes live on the same server. VMM and libvirt client work together and also live on the same machine. The VMM/libvirt client pair can exist on the same or different machine as the libvirt daemon/kvm pair.
Hope this helps..
It is clear now! thanks!
I have couple of guest VM created on my Rhel6 machine .I am using virsh commands to start and shutdown the guest VM. When i shutdown guest VM using :
virsh shutdown "domain-name" , it shutdowns the guest properly . But after that if i run "virsh list" , the command hangs . I tried to run the strace on that process. It hangs at polling the data from /var/run/libvirt/libvirt-sock.
libvirtd maintains domain_name.pid and domain_name.xml to store process id of the qemu emulator which is running the guest VM and the xml file to store guest information . The xml file also stores the current status of the guest VM. On guest shutdown these files should get deleted. But in my case the even after guest shutdown these files exists and xml file shows guest VM running.
As i understand , libvirt client and libvirtd (server) communicates using this socket (/var/run/libvirt/libvt-sock). When libvirtd asks for guest VM status , libvirt client should reply by writing to the socket. But in my case i guess libvirt client is not responding and libvirtd is just waiting infinitely for the response.
Could anyone please suggest , when guest VM shuts down how does libvirt client knows about it and what reply it sends to libvirtd about the guest shutdown ?
Thanks,
-Manisha
Post new comment