A server (host) hosts many Virtual Machine (VM) guest
Less:
Hardware or software
In the late 1990s, x86 virtualization was achieved by complex software techniques first introduced in VMware’s products, which overcame the platform’s hard-to-virtualize peculiarities, yet managed to attain reasonable performance.
VM doesn’t comunicate directly with hardware but through virtualization sofware that acts at low level.
In the mid 2000s, both Intel and AMD added hardware support to their processors that first made the virtualization software simpler to write (with the 1st generation hardware assist), and later provided substantial speed improvements (2nd generation hardware assist).
A collection of software that provides a convenient way to manage virtual machines and other virtualization functionality, such as storage and network interface management. These software pieces include an API library, a daemon (libvirtd) and a command line utility (virsh).
Various domain lifecycle operations such as start, stop, pause, save, restore, and migrate.
Hotplug operations for many device types including disk and network interfaces, memory, and cpus.
All libvirt functionality is accessible on any machine running the libvirt daemon, including remote machines.
A variety of network transports are supported for connecting remotely, with the simplest being SSH, which requires no extra explicit configuration.
virsh --connect qemu+ssh://root@example.com/system
The previous command will provide access to all virsh commands on the remote host for qemu/kvm
Any host running the libvirt daemon can be used to manage various types of storage: create file images of various formats, mount NFS shares, enumerate existing LVM volume groups, create new LVM volume groups and logical volumes, partition raw disk devices, mount iSCSI share.
Since libvirt works remotely as well, all these options are available for remote hosts as well.
Any host running the libvirt daemon can be used to manage physical and logical network interfaces.
In future releases netcf will provide the functionalities to enumerate existing interfaces, as well as configure (and create) interfaces, bridges, vlans, and bond devices.
Any host running the libvirt daemon can manage and create virtual networks.
Libvirt virtual networks use firewall rules to act as a router, providing VMs transparent access to the host machines network.
kvm-ok
$ sudo apt-get install kvm libvirt-bin
$ sudo adduser $USER libvirtd
$ sudo apt-get install ubuntu-vm-builder
$ vmbuilder kvm ubuntu --suite lucid --flavour virtual --arch i386 \
-o --libvirt qemu:///system --mirror http://localhost:9999/ubuntu \
--addpkg openssh-server --addpkg acpid
$ sudo virt-clone --original ubuntu --name test1 --auto-clone
$ sudo apt-get install virt-manager
# connect to a local VM
$ virt-manager -c qemu:///system
# connect to a remote VM
$ virt-manager -c qemu+ssh://root@HOSTNAME/system
allows you to connect to a virtual machine’s console
$ sudo apt-get install virt-viewer
$ virt-viewer -c qemu:///system web_devel
$ virt-viewer -c qemu+ssh://root@HOSTNAME/system web_devel
libvirt virtual machine disappear after config customizations (validation error on domain xml format)
virtual machine is too slow
…other libvirt silent errors (e.g. unknown xml tag will be just ignored)
# /etc/init.d/libvirt-bin stop
...
# libvirtd
...
... libvirt log and errors
...
# tail /var/log/libvirt/qemu/myfirst-testvm.log
LC_ALL=C PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin HOME=/root USER=root LOGNAME=root /usr/bin/kvm -S -M pc-0.11 -m 512 -smp 1 -name myfirst-testvm -uuid 7b625c5b-91f3-4575-8782-406eaef80d9a -monitor unix:/var/run/libvirt/qemu/myfirst-testvm.monitor,server,nowait -boot c -kernel /boot/vmlinuz-2.6.31-22-generic -initrd /boot/initrd-2.6.31-22-generic -append root=/dev/sda ro -drive file=/mnt/works/TOOLS/RIPLinux-9.3-non-X.iso,if=ide,media=cdrom,index=2 -drive file=/var/lib/libvirt/images/disk0.qcow2,if=scsi,index=0,boot=on -net nic,macaddr=54:52:00:07:2d:32,vlan=0,model=virtio,name=virtio.0 -net tap,fd=16,vlan=0,name=tap.0 -serial none -parallel none -usb -vnc 127.0.0.1:0 -k it -vga cirrus
qemu: could not load initial ram disk '/boot/initrd-2.6.31-22-generic'