[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [virt-tools-list] kvm vs. virsh



On Fri, Aug 05, 2011 at 11:28:38AM -0500, Jeff wrote:
> I see a lot of patches, queries, etc. posted to the various
> Virtualization lists that refer to using commands like "kvm" and
> "qemu-kvm" to do various things in KVM. I'm using Red Hat Enterprise
> Linux, and I have installed all the qemu packages, yet I don't have
> those commands. I am using "virsh" to manipulate libvirt.
>
> The question is...what is the difference between the sets of
> commands and should I be concerned if I don't have the former set?

qemu or qemu-kvm is the hypervisor that runs a single guest.

libvirt normally manages many qemu-kvm instances (one for each guest
that you have running).  It also abstracts away the differences
between KVM and other hypervisors like Xen and VMware.

virsh is a shell that talks to libvirt.

You can run guests directly, eg. by doing:

  qemu-kvm -hda disk.img

but there are downsides to this:

- The qemu/KVM command-line is not stable, and very complex once you
  start adding features required by real world guests.  The above
  command was only a very trivial example, see [1] for a real example.
  libvirt isolates you from all this.

- You have to manage all your running guests by hand.

- You might want to change to another hypervisor now or in future.

Rich.

[1] qemu-kvm -S -M rhel6.1.0 -enable-kvm -m 1024 -smp 1,sockets=1,cores=1,threads=1 -name builder_ubuntu1104 -uuid 00054c91-4461-e2a5-9724-48cb58361c56 -nodefconfig -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/builder_ubuntu1104.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -boot c -drive file=/dev/vg_hosts/builder_ubuntu1104,if=none,id=drive-virtio-disk0,format=raw,cache=none,aio=native -device virtio-blk-pci,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,id=virtio-disk0 -drive if=none,media=cdrom,id=drive-ide0-1-0,readonly=on,format=raw -device ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 -netdev tap,fd=28,id=hostnet0,vhost=on,vhostfd=29 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:47:2e:56,bus=pci.0,addr=0x3 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -usb -device usb-tablet,id=input0 -vnc 127.0.0.1:3 -vga cirrus -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x5

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming blog: http://rwmj.wordpress.com
Fedora now supports 80 OCaml packages (the OPEN alternative to F#)
http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]