You are here
Using default VM build with KVM
Fastest way... go go go
This method requires the "kvm" program be installed on your system, e.g. in /usr/bin. That may not be the case, for example, in CentOS or other flavors of Linux, even with the full KVM virtualization hooks and tools installed. But if you are lucky:
- Download and unzip the Default VM build of the TurnKeyLinux image you want
- Run in a terminal:
- kvm -drive file=myVMfile.vmdk
The "kvm" program is closely related to "qemu". See also [http://wiki.qemu.org/Manual] and you might find shortcuts there on a similar method for a quick start.
More permanent deployment using Libvirt
Libvirt is a virtualization api. The libvirt daemon is a good virtual machine manager, eg. it makes sure that machines start on host boot (if selected) and generally works as a control panel for all your virtual machines.
In Ubuntu install the package libvirt-bin to run the daemon.
You can connect to the libvirt daemon with one of the many libvirt clients. Popular options are:
- virsh - command line interface (CLI), has a lengthy man page
- virt-manager - graphical user interface (GUI), requires a desktop windowing system
Turn the key
- Download and unzip the default VM build of the turnkey solution you need.
- In a terminal, navigate to the directory where you have the VM, and convert the disk image to the qcow2 format:
- kvm-img convert -O qcow2 *.vmdk myHD.qcow2
OR - qemu-img convert -O qcow2 *vmdk myHD.qcow2
- kvm-img convert -O qcow2 *.vmdk myHD.qcow2
- Run this to see how much RAM the virtual machine expects.
- grep memsize *.vmx
- Move the qcow2 image to where you want to the virtual disk to reside.
- Open virt-manager on your computer and connect to your virtual-machine host (it may be your own computer :-).
OR figure out virsh and use that on the command line. :-o - If the host's storage pool does not already point to where your qcow2 image is located, make a new or change the default. (Right-click the connection and select "Details"->"Storage")
- Create a new machine and point the storage to your qcow2 image. You may need to click the reload (↻) button for libvirt to see the qcow2 image.
- Setting disk-bus to VirtIO will often increase performance.
- Start it :-)