Monday, March 2, 2009

Create a zvol based hvm xvm

I have just created a Trixbox VM on my Opensolaris server (xVM/Xen).  It is currently a HVM and I will be looking into how I can paravirtualise it.

This really is disgustingly simple:

Create a 6GB zvol:
zfs create -V 6g array/xvm/trixbox

Create the VM:
virt-install --name Trixbox --ram 512 --file /dev/zvol/dsk/array/xvm/trixbox --vnc --hvm --os-type=linux os-variant=rhel5 --location /iso/trixbox.iso

Most of the options are self-explanatory:
--name Trixbox (the name of the VM)
--ram 512 (how much ram to allocate)
--file /dev/zvol/dsk/array/xvm/trixbox (uses the zvol device as hard disk)
--vnc (enables vnc access to the VM)
--hvm (specifies that the VM is a HVM, and not paravirtualised)
--os-type=linux os-variant=rhel5 (specifies that the VM is a rhel5 based linux VM)
--location /iso/trixbox.iso (uses this iso image as the installation media)

Easy peasy!

No comments:

Post a Comment