Installing Linux on Kronos: Difference between revisions
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
==Installing Linux== |
==Installing Linux== |
||
*Note*: before proceeding further, ensure that you have a symlink from /usr/share/qemu/keymaps to the real directory /usr/share/qemu-linaro/keymaps. |
|||
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 |
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 |
||
<pre> |
<pre> |
||
Line 27: | Line 29: | ||
xe vm-start uuid=$vm |
xe vm-start uuid=$vm |
||
</pre> |
|||
===Completing installation=== |
|||
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: |
|||
<pre> |
|||
/usr/lib/xcp/lib/xapissl start |
|||
</pre> |
|||
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: |
|||
<pre> |
|||
xe console-list |
|||
</pre> |
|||
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: |
|||
<pre> |
|||
xe console uuid=593c6788-1ddc-e7d7-c6b1-0de0778c78b7 |
|||
</pre> |
|||
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!): |
|||
<pre> |
|||
xe vm-uninstall name-label=vm-label --multiple |
|||
</pre> |
</pre> |
Latest revision as of 15:48, 16 January 2012
Installing Linux
- Note*: before proceeding further, ensure that you have a symlink from /usr/share/qemu/keymaps to the real directory /usr/share/qemu-linaro/keymaps.
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
xe template-list
- 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
Completing installation
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:
/usr/lib/xcp/lib/xapissl start
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:
xe console-list
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