When you create a QNX Virtual Machine target connection, the IDE uses the
mkqnximage utility to generate a target VM that runs a QNX system image based on settings you specify, such as
the CPU architecture and VM platform.
CAUTION:
If you plan to use VirtualBox as the VM platform and it's your first time using VirtualBox on your host machine,
you likely have to create a network interface. For information on doing so, see the
mkqnximage description in the
Utilities Reference.
If you don't create a network interface, when the IDE finishes creating the VM and tries to start it on the target,
the VM will fail to boot and the IDE will output a vague error message.
To create a QNX virtual machine:
-
In the launch bar at the top of the IDE UI, click the button for the Launch Target
dropdown, which is the rightmost dropdown.
-
Select New Launch Target to open the launch target wizard selector.
-
Select QNX Virtual Machine Target in the list of target types, then click
Next to open the New QNX Virtual Machine Target window.
-
In the Target Name field, enter a name for your target.
-
Configure any other settings needed for your new VM.
You can set the following fields:
Below the configurable fields, there's a read-only text box showing the command line that will be passed to
mkqnximage based on the options you've set. This field is useful for understanding the relation
between your settings and the resulting image, and for extracting the command line if you want to run it manually
(i.e., outside of the IDE).
-
Click Finish to create the VM.
The IDE calls the
mkqnximage utility with options based on your configured settings.
The utility tries to generate a VM with a QNX system image, and the operation output is displayed in the
Console window so you can see any errors and warnings.
Note:
If there was a serious error and the VM couldn't be generated, the target connection will still be created but
won't be usable until you fix the problem and rebuild the VM. When you restart the IDE, it will try to regenerate
the VM.
The IDE adds an entry for the target referred to by the new connection to the Launch Target dropdown,
and in the
Project Explorer and
Target Navigator views, whose visiblity depend on
which IDE perspective is selected.
The IDE also tries to connect to the target using the specified settings. If the connection attempt succeeds, you'll see a
purple circle symbolizing a physical connector (even if your target is virtual) but with no red box
(

), on the left of the launch target name.
If it fails, you'll see a red box with an X in the lower left corner of the icon
(

).
You can now select the new launch target to tell the IDE to debug, profile, or run an application on the QNX VM target.
You can also start and stop the VM, rebuild it with the same or different settings, or delete it, as explained in
Controlling a QNX virtual machine.