Installing Linux on Kronos
This example will walk you through installing Ubuntu 10.04 (64 bit) on Kronos. Various other Linux distros and versions are supported (as are Windows versions): you can find out which by using the command
- The script below will require you to log directly into the VM in order to complete the installation. It is possible to use a pre-seed file to perform the installation process - see the xe documentation for more details.
- The script assumes that you are performing the installation from Dom0 on the local machine. It is possible to perform this task from a remote machine - again, see the xe documentation for more details.
You'll probably want to change the following settings:
- "vm-label" - to something useful to allow you to reference the vm from Dom0
- "hostname" - to whatever you'd like the hostname to be
- "domain" - to your local domain
#!/bin/bash set -e set -x template=`xe template-list name-label="Ubuntu Lucid Lynx 10.04 (64-bit)" --minimal` vm=`xe vm-install template=$template new-name-label=vm-label` network=`xe network-list bridge=xenbr0 --minimal` vif=`xe vif-create vm-uuid=$vm network-uuid=$network device=0` xe vm-param-set uuid=$vm other-config:install-repository=http://archive.ubuntu.com/ubuntu xe vm-param-set uuid=$vm PV-args="auto-install/enable=true interface=auto netcfg/dhcp_timeout=600 hostname=vm-host-name domain=mydomain.is.best" xe vm-start uuid=$vm
By far the easiest way to complete installation is to use the "xe console" command to connect to the VM's console. In order to do this, you will need to start the xapissl daemon:
service start xapissl
It should report as "stunnel4". Note that if you're running Apache/Apache2, you may find that it's already bound to 443, but then again you probably stopped it anyway so that you could use xcp in the first place. You then need to identify to which VM you need to connect. Use this command to find all VMs:
You need to find the vm-uuid for the VM with the label you set up before (e.g. vm-label, as above), and then to connect to it using a command such as this:
xe console uuid=593c6788-1ddc-e7d7-c6b1-0de0778c78b7
You should now be connected (you may need to press <Return> once or twice), and can now complete the installation. I suggest that you install an ssh daemon and record the IP address of the guest, so that you can easily reconnect in the future.
If things go wrong
If things go wrong, and you want to delete the vm, you can do so very easily with the following command (use with care!):
xe vm-uninstall name-label=vm-label --multiple