以下是在hypervisor qvm 进程创建的 VM 中运行的guest的配置文件。 qvm 进程组装并配置由配置文件中的选项及其参数指定的虚拟机组件:
system qnx7-x86_64-guest
ram 0xa0000
rom 0xc0000,0x40000
ram 1024M
# Specify "cpu" for each vCPU you want to assign to your guest
cpu
cpu
load /vm/images/qnx7-x86_64-guest.ifs
vdev ioapic
loc 0xf8000000
intr apic
name myioapic
vdev ser8250
intr myioapic:4
name ser8250_0
vdev timer8254
intr myioapic:0
name timer8254_0
vdev mc146818
name mc146818_0
vdev shmem
name shmem_0
vdev pckeyboard
name pckeyboard_0
# An example network device. Connects to a peer named vp0 in the host.
# This peer is found at /dev/vdevpeers in the host.
vdev virtio-net
name ptp
peer /dev/vdevpeers/vp0
# An example block device. This file has to be created somewhere;
# in this case, it's created in the IFS with dd.
vdev virtio-blk
hostdev /dev/qvmdisk0
name virtio-blk_qvmdisk0
# 8259s are here for legacy systems only.
# They only take the 'loc' option.
vdev 8259
loc 0x20
vdev 8259
loc 0xa0
vdev hpet
loc 0xf8008000
intr myioapic:2
name hpet_0
我们知道此配置适用于 x86 VM,因为 8259 设备和 APIC 仅在该体系结构上受支持。
为 vdev 指定了name
选项,以便它们显示在 /dev/qvm/system_name/vdev_name
下。
在本例中,system_name
是 qnx7-x86_64-guest
。