Creating DomU Guests on the J6 Board

Back to Xen J6 Main Page

Overview
This wiki describes how to create and boot DomU guests with the Xen tools from a Dom0 kernel on the J6 board. These will be additional virtualized Linux Kernels that will run alongside the Dom0 Linux Kernel.

Prerequisites
Your system must be setup according to System Setup, and you must install Xen Tools on the core filesystem as outlined in Setting Up Xen Tools. Also, you must be able to successfully login to the Dom0 kernel. To see how to get Dom0 to boot, see Booting with Xen on the J6.

System Overview
These instructions were run and tested with the following software and hardware:
 * Board: J6 Eco
 * Chip: DRA72x
 * Laptop OS: Ubuntu 12.04 (64-bit)
 * Board OS: Ubuntu 14.04 (32-bit)
 * Cross-Compiler GCC Version: 4.6.3


 * UBoot:
 * Version: 2014.07-dirty
 * Release: 6AL.1.0
 * Linux Kernel:
 * Version: 3.14
 * Release: 6AL.1.0
 * Xen:
 * Version: 4.6-unstable (master branch)

For reference, we assume that the following environment variables are defined:

Setup Xen Tool Daemons to Run on Startup
The services used by the Xen Tools need to run on system initialization, or else they will have to be manually started everytime we boot into the system. Note that we use chroot-full below (performing the command on the host machine), but you can also run these commands from the J6 board as root, or with sudo. You will have to restart the system for the changes to take affect. See Chroot-full Command for the definition of the chroot-full command.

Enable the Xen Tool services to run on system startup (run this from the host machine):

Add these changes to the rootfs partition on the SD card:

Setup the DomU Filesystem Image
In order for the DomU guest to boot, they require a filesystem, so we need to create one for them to use. There are two options here, partitioning a physical disk, or setting up a disk image on an existing parition. We're going to do the latter, as it is simpler overall to do, and is flexible.

Create a EXT3 filesystem image (perform this on the host machine):

Mount the image on the SD card, and copy in the Ubuntu core filesystem:

Enable the serial console on the guest filesystem (for the contents of the listed files, see Setup Serial Console):

Enable passwordless login for the root user on the domU filesystem:

Unmount the DomU filesystem:

Create a DomU Guest
To create a DomU guest, we need to specify to Xen the configuration parameters to use for the DomU guest (e.g. filesystem location, memory size, number of CPUs, etc.). Also, to actually boot up, the DomU requires a kernel image to read from (in our case a zImage).

Create /media/rootfs/root/domU.conf with the following contents:

domU.conf

Copy the kernel zImage to your home directory:

Unmount the SD card:

Boot up the system on the J6 board, and login. Once you have the shell, mount the domU image and startup the DomU guest:

Connect to the DomU console:

To disconnect from DomU console at any time, type CTRL+]. This will return you to the Dom0 console.

Next Steps
With DomU guests now up and running, we can setup some software for them and Dom0. In particular, we can now setup DRM for Dom0 and DomU so that they can share the GPU, and render displays.

For setting up DRM on Dom0, see Setting Up DRM on Dom0.

For setting up DRM on DomU guests, see Setting up DRM on DomU.