Changes

Jump to: navigation, search

Building a Xen Guest Domain using Xen-Tools

85 bytes added, 18:52, 29 May 2016
m
Text replacement - "<htmlet>xen<htmlet>" to "<htmlet>xen</htmlet>"
</table>
<hr>
 
 
<htmlet>xen</htmlet>
== Getting Xen-Tools ==
Xen-Tools are available for download from the [http://www.xen-tools.org Xen-Tools.org web site]. Before rushing to this web site to download these tools it is first worth checking if they are available from the repositories for your chosen Linux distribution. This is certain the case for Ubuntu Linux which installs the xen-tools as part of the ''ubuntu-xen-server'' package (if you already have this installed the following command does not need to be run):
<pre>
Edit this file to configure the desired defaults. Note that any of these defaults may be overridden using command-line arguments.
== Specifiy Specify Xen-Tools Installation Location ==
Begin by setting the ''dir = '' directive to the directory into which the tools are to create the Xen guest image files:
<pre>
</pre>
Also, the ''accounts'' option can be used if all user accounts on the host are to be copied to the Xen guest system:
<pre>
== Xen Guest Console Settings ==
It Next, it is necessary to configure the console settings for the Xen guest. Choice Choices are as follows:
<pre>
== Options Disk Drive Device Naming ==
Finally the device naming conventions used for the disk drives within the guest operating system may be optionally be defined. Xen-Tools defaults to ''/dev/sda'' based names, but this can be changed to the more recent ''tap:aio'' based ''xvda'' conventions as follows:
<pre>
== Building the Xen Guest Images ==
Now that we have completed the configuration process the next step is to generate the images for the Xen guest. This task is performed using the ''xen-create-image'' tool. This tool takes a wide range of command-line options which can be used to override the settings in a configuration file outlined above, or as an alternative to placing configuration settings in the configuration file. The following example creates the images based on the settings we defined in the Xen-Tools configuration file, avoiding the need to extensive use fo of command-line options:
<pre>
== Booting the Xen Guest System ==
Once the creation process is completed there should be a Xen guest configuration file for the new system located in ''/etc/xen''. In the case of our example this file is called ''XenUbuntu.cfg''. This is atext a text file so feel free to open it in a an editor and review it. Many of the settings defined in the Xen-Tools configuration file should be reflected in this file.
Also the root filesystem and swap images will have been created (and are referenced in the guest configuration file). To review the contents of the root filesystem before attempting to boot the guest domain simply mount the image using the loopback interface. For example, the following command mounts our image at /tmp/mnt:
All being well, the guest system will now boot. If any boot problems are encountered refer to the [[Solving Common Xen Boot Problems]] chapter of this book.
 
 
<htmlet>xen</htmlet>

Navigation menu