Starting and using guests

Below are instructions for booting guests in your hypervisor's VMs.

Note: For instructions on how to start the hypervisor, see the board-specific instructions in this chapter under Booting the host.

When the hypervisor has completed its startup, it is ready to host guests. You can't start a guest until the hypervisor has finished configuring the VM hosting the guest. You can configure your hypervisor's startup activities to automatically launch qvm processes that will load and launch guests after VM configurations are complete, or to wait for further input before starting any or all guests.

You can know that your hypervisor has completed its startup successfully when you can perform any of the activities described in Viewing hypervisor activity.

Prerequisites

To run a guest (QNX Neutrino OS 7.0.4+, QOS 2.1, or Linux) on the hypervisor, you need the following on your target board:

In addition to the above, Linux guests may require an initial RAM disk (initrd, initramfs) file.

Start a guest

CAUTION:
When you start a qvm process and launch a guest, the terminal console will switch to the guest you have started. You may find it useful to get the IP address for the hypervisor host, then open a second terminal console via SSH into the hypervisor host domain before you start a guest (see Determine where terminal consoles are connected below).

To start a QNX guest OS, in the command line of your terminal program connected the hypervisor:

  1. Go to the directory with the qvm configuration file for the VM in which you will run your guest.

  2. Run the qvm utility, pointing it to the configuration file for the guest you want to run.

For example, from the directories with the guests, for each guest:

The at sign (“@”) in front of the filename in the qvm command line instruction designates a path to a qvm configuration file.

When it receives the instruction, the hypervisor should:

  1. Launch a new instance of the qvm process for the VM that will host the guest OS.
  2. Parse the configuration file (e.g., qnx704-guest.qvmconf) for the guest OS.
  3. Load the IFS with the guest (e.g., qnx704-guest.ifs).
  4. Start the guest OS.
  5. Connect the terminal program to the guest, so that output from the guest OS boot goes to the terminal on the host system; this is the default configuration, which you can change.

Things to try

Below are some things you can try in order to get to know your virtualized system:

Determine where terminal consoles are connected

Determining which terminal consoles are connected to the hypervisor host, or to the QNX and Linux guests can be difficult for a novice hypervisor user.

If you know a little about how your system is configured, you can easily determine what your terminal console is showing, however. Running uname -a, and pidin info or ps should give you the information you need. For example, a pidin info command on a terminal connected to a QNX Neutrino OS 7.0.4 guest configured to run on two vCPUs would show two CPUs, but the same command on a terminal connected to the hypervisor host would show all four CPUs.

The hypervisor host and QNX guests each have an /etc/os.version file. You can open these files to view information about the hypervisor host or the guests.

View thread activity

To view information about thread activity in a qvm process, use pidin in the command line of your terminal program connected to the hypervisor host, or the QNX Momentics IDE tools connected to the hypervisor host.

The qvm thread activity tells you about vCPUs, but not about the various services and applications each guest is running. To view thread activity within a guest from the IDE, you can create a new QNX target and enter the IP address of the guest. In this case, you must be running the qconn service on the guest, because this service supports the IDE.

If your configuration doesn't start this utility, you must start it manually (see qconn in the QNX SDP Utilities Reference).

Virtual networking

To start virtual networking, on the command line for a console connected to a QNX guest, run the following script:

/scripts/network-start.sh

When the script completes, you will be able to get an IP address for your guest, ping the guest, and perform other networking activities, such as use SSH to access this guest, mount an NFS share on this guest, etc.

You can do the equivalent on a Linux guest as well.

Block devices

To start a block device, on the command line for a console connected to a QNX guest, run the following script:

/scripts/block-start.sh

Try using the block device as you would this type of device in a non-virtualized system.

The block device is mounted to /RAM disk on the guest. The VM is configured to use the devb-ram device on the hypervisor host. You can change the qvm configuration for the VM hosting your guest so that your guest's block device uses another device, such as a USB key.