XenServer – Create a VM from an ISO

When creating a new virtual machine in XenServer, the typical path is to clone a pre-built template of the type of linux/Windows you want to install, and add a network repository from which it can grab its packages. While this works well for popular OSes, it doesn’t help when you want to install something. To work through the manual process of installing something custom, I got Vyatta setup using a blank template and a downloaded ISO.

ISO Library
In order to make an ISO available to a VM, you have to first create a storage repository with the ISOs, then mount the ISO on the VM. I’ve added the initialization of this repository to xencap, and you can run it with: cap xencap:iso_lib:create. This will create a home for ISOs in /var/lib/isos. After you download some ISOs and put them into that directory, cap xencap:iso_lib:scan will rescan the storage repository and find the ISOs.

VM Creation
Once you have the ISO repository figured out, using the CD instead of a pre-built OS template is easy. You still use a template, but this time it’s the one called “Other install media.” This template doesn’t do anything special for you, but is just a blank machine. You can add the CD using xe vm-cd-add, then boot the VM and connect using VNC. You should see the installer for whatever you’re doing, and from there it’s just a normal installation (don’t forget to set up paravirtualization when you’re done).

Published by

Patrick Schless

I'm a (mostly) ruby/rails developer, living in Chicago. I work at Braintree, and I have lots of side-projects.

One thought on “XenServer – Create a VM from an ISO”

Leave a Reply

Your email address will not be published. Required fields are marked *