Updated: October 28, 2024 |
When you build guests to run in a QNX virtualized environment, you must build them for the appropriate hardware architecture, and configure the VMs in which they will run.
You need to have the build environment and tools that correspond to the hypervisor host and the guests you're building (see Supported build environments).
It may be easier to identify and debug problems in an OS that you want to use as a guest before integrating it into in your hypervisor system.
If you're building a QNX Neutrino system that will be used as a guest, follow our instructions for building an OS image given in Building Embedded Systems and copy the image to your target.
For a non-QNX system, follow the platform-specific instructions for building that image and copy it to your target.
When you're satisfied all these OS images function well in a non-virtualized system, you can add them as guests to your hypervisor system. For a QNX Neutrino guest, you must obtain a hypervisor guest BSP and use it to build a new OS image. Then, you can add this guest along with the non-QNX guests to your hypervisor system image, copy this newly built image to your target, and boot into it.
You must ensure all guests function as expected in the hypervisor environment before deploying these guests (and the host) in a production system.
Each guest in a hypervisor system is hosted in a hypervisor qvm process. When it is started, each instance of the qvm process reads its specified configuration file and assembles a VM from the components specified in this file. This VM becomes the virtual environment in which the guest runs.
If you change anything in your guest that accesses hardware (physical or virtual), you need to ensure that the qvm configuration file for the VM that will host the guest is properly configured.
When building a guest to run in a QNX virtualized environment, it is important to remember that each guest must be configured to match the VM in which it will run. This means that it must have the drivers it needs to access devices, whether they are physical or virtual. In the VM, the drivers must be configured to be where the guest expects them to be.
In a QNX OS system, board-specific drivers and other components are brought into the build through BSPs. This is true for a QNX OS that will run in a VM, just as it is for a QNX OS that will run directly on hardware.
For both ARM and x86 hardware platforms, you'll need the BSP for your supported hardware platform to build the hypervisor host domain, and a hypervisor guest BSP to build each guest. These are available for QNX Neutrino 7.1 and QOS 2.2.1 guests. If you add new devices for your guest, you'll probably need to add the appropriate new drivers to the BSPs, and rebuild the guest with them.
What is true for QNX guests is also true for non-QNX guests: the VM must present to the guest the virtual environment the guest OS expects to find (i.e., the hardware components it has been built to use). The only difference is that QNX OSs (including QNX OSs that will run as guests in virtualized environments) use BSPs to bring in the architecture-specific and board-specific components, while other OSs may use other mechanisms to achieve the same end.
For more information, see Assembling and configuring VMs in the Configuration chapter.