« Previous 1 2 3 Next »
Understanding Hardware-Assisted Virtualization
Setting up a new Virtual Machine
To setup a new VM, you must first create a virtual disk. Use a simple command, such as:
qemu-img create -f qcow2 ubuntu10.10.img 8G
This command creates a dynamically expanding 8GB disk named ubuntu10.10.img. The disk image is very small but will expand on installation of the guest operating system to a maximum size of 8GB. Boot your system using the following command:
kvm -hda ubuntu10.10.img -cdrom /dev/cdrom -m 512 -boot d &
If everything works correctly, you'll see a QEMU instance booted up onto the Ubuntu installation CD.
If your system does not fully support virtualization, you'll receive a message similar to the following:
open /dev/kvm: No such file or directoryCould not initialize KVM, will disable KVM supportUbuntu does not support running KVM without hardware acceleration. Sorry.[1]+ Exit 1 kvm -hda ubuntu10.10.img -cdrom /dev/cdrom -m 512 -boot d
If you're sure your hardware does fully support virtualization but it fails at this point, you'll have to restart the system, enter the BIOS setup, and change the virtualization-related settings. You should also update your system's BIOS to the latest version to enable any missing options. Remember that your hardware must meet all four hardware requirements detailed above.
The KVM hypervisor is written to use hardware-assisted virtualization and cannot run without it.
Under the Hood
KVM uses a device node, /dev/kvm, created and managed by a loadable kernel module based on your system's CPU architecture (kvm-intel.ko or kvm-amd.ko). QEMU supports 32-bit and 64-bit systems based on various architectures including x86, SPARC, PowerPC, ARM, Motorola, and MIPS. This emulation allows you to install unmodified operating systems into virtual machines using underlying x86 architecture.
« Previous 1 2 3 Next »
Subscribe to our ADMIN Newsletters
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Most Popular
Support Our Work
ADMIN content is made possible with support from readers like you. Please consider contributing when you've found an article to be beneficial.