Creating and transferring a hypervisor disk image

If you make changes to the hypervisor host or the guests, you need to make a new bootable disk image with the hypervisor system and transfer it to your target.

If you are working with the HHBSP (see The HHBSP) and make changes to your hypervisor host or the guests, you need to set up the appropriate environment(s) in the host BSP and/or guest BSP root directories as appropriate and rebuild the images for these components before you make a new hypervisor system disk image (see The HHBSP, Building the guests, and Using your own board-specific BSP for the host in this chapter).

To make a new hypervisor disk image, assuming that you are working in the HHBSP:

  1. Make sure that your environment is properly set up for QNX SDP 7.0 builds in your HHBSP's root directory.
  2. In the HHBSP root directory, run make to make a hypervisor bootable disk image with the new content.

    The build will place the disk image in the HHBSP's images/ directory.

If you are modifying your own BSP, see Using your own board-specific BSP for the host for instructions.

See Transferring the disk imagein the Getting Started chapter for instructions on how to transfer your new disk image to your target.

Hypervisor disk image partitions

A hypervisor disk image includes the hypervisor host in a bootable partition and the guests in a data partition:

bootable partition
Type 11 (DOS). Includes at least one bootable IFS (usually several) for the hypervisor host. Components not needed before the disk driver starts and becomes able to mount other partitions are put in the data partition.

If you want to customize your board setup without rebuilding the IFS, you can create a shell script called hv_setup.sh with your customizations, and place it in the root directory of the bootable partition. The startup will look for this script and run it (see The HHBSP in the Assembling a Hypervisor System and Its Components chapter).

Note: You can use this partition to copy files to this disk from any development host that can access a DOS filesystem. This is useful if you ever need to transfer files from your development host to your target.
data partition
Type 177 (QNX PowerSafe). Includes an IFS for each guest in the reference image, and a qvm configuration file (or files) for each VM for these guests.
You can speed up the boot time by modifying the data.partition.build.template file to take out of the boot partition and putting in the data partition (in the /guests/ directory) any files that aren't be needed until after the disk mounts. The boot will be faster, because the smaller the bootable IFS, the less time it will take to load.

If you need to change the sizes of your partitions, before you build the hypervisor system (i.e., before you run make in the HHBSP root directory) you can adjust the disk configuration in the diskimage.cfg and the *.partition.build.template files in the hypervisor host BSP's images/disk_config/ directory (see Adjust the disk image settings (optional) in this chapter).

What happens when you make a new hypervisor disk image?

Running make in the HHBSP root directory looks after getting any updated IFSs for the hypervisor host and for guests that are in the HHBSP directory structure and calling mkxfs to produce a disk image.

The build uses the following updated files from the HHBSP directories:

Linux guests

For Linux guests, the build process uses the contents of the entire images/guest_bsps/linux/arch directory (where arch is either arm or x86), which should include everything needed to run a Linux guest (Linux kernel, initrd file, etc.). For more information about building Linux guests, see Using non-QNX (Linux, Android) guests in this chapter.