Next Previous Contents

3. Boot the virtual machine

3.1 Booting a single virtual machine

To boot one and only one virtual machine execute

linux ubd0=ROOT_IMAGE

where ROOT_IMAGE is the previously downloaded image.

To stop the virtual machine execute a shutdown in the virtual machine self executing

halt

This will stop all virtual machine's process and unmount the ROOT_IMAGE.

3.2 Booting multiple virtual machine

It's very important that you DON'T use the same image for booting more than one virtual machine without doing this step!

If you simultaneously mount a filesystem in read-write mode from two different system, the filesystem will be corrupted. To provide this functionality, the UML has a "copy on write" mechanism that is called COW.

Using COW files, you can run multiple instance of virtual machine using only one image. Each single instance mounts the image in read-only mode and uses its COW file to write. The COW files are generally much smaller than the root image and are therefore very performant!

To create a COW file execute

linux ubd0=COW_FILE, ROOT_IMAGE

where COW_FILE it's a name of your choice (e.g.: cow_file_1) and ROOT_IMAGE is the previously downloaded image. This will create a COW file and boot a new instance of virtual machine.

Repeat this step for each new virtual machine do you want.

To boot already existing virtual machine, simply pass the COW file as parameter like

linux ubd0=COW_FILE

e.g.: linux ubd0=cow_file1

VERY IMPORTANT NOTE:
If you have created COW files from a root image, don't try to boot a virtual machine using directly the root image self, but boot with COW files only!!!!
The COWs have stored the root image's dimension and timestamp, and if these values have been changed the COWs files became unusable and the virtual machine, with all you have changed into, are permanently damaged.


Next Previous Contents