| 1 | Xen PVH machine (``xenpvh``) |
| 2 | ========================================= |
| 3 | |
| 4 | Xen supports a spectrum of types of guests that vary in how they depend |
| 5 | on HW virtualization features, emulation models and paravirtualization. |
| 6 | PVH is a mode that uses HW virtualization features (like HVM) but tries |
| 7 | to avoid emulation models and instead use passthrough or |
| 8 | paravirtualized devices. |
| 9 | |
| 10 | QEMU can be used to provide PV virtio devices on an emulated PCIe controller. |
| 11 | That is the purpose of this minimal machine. |
| 12 | |
| 13 | Supported devices |
| 14 | ----------------- |
| 15 | |
| 16 | The x86 Xen PVH QEMU machine provide the following devices: |
| 17 | |
| 18 | - RAM |
| 19 | - GPEX host bridge |
| 20 | - virtio-pci devices |
| 21 | |
| 22 | The idea is to only connect virtio-pci devices but in theory any compatible |
| 23 | PCI device model will work depending on Xen and guest support. |
| 24 | |
| 25 | Running |
| 26 | ------- |
| 27 | |
| 28 | The Xen tools will typically construct a command-line and launch QEMU |
| 29 | for you when needed. But here's an example of what it can look like in |
| 30 | case you need to construct one manually: |
| 31 | |
| 32 | .. code-block:: console |
| 33 | |
| 34 | qemu-system-i386 -xen-domid 3 -no-shutdown \ |
| 35 | -chardev socket,id=libxl-cmd,path=/var/run/xen/qmp-libxl-3,server=on,wait=off \ |
| 36 | -object monitor-qmp,id=qmp0,chardev=libxl-cmd \ |
| 37 | -chardev socket,id=libxenstat-cmd,path=/var/run/xen/qmp-libxenstat-3,server=on,wait=off \ |
| 38 | -object monitor-qmp,id=qmp1,chardev=libxenstat-cmd \ |
| 39 | -nodefaults \ |
| 40 | -no-user-config \ |
| 41 | -xen-attach -name g0 \ |
| 42 | -vnc none \ |
| 43 | -display none \ |
| 44 | -device virtio-net-pci,id=nic0,netdev=net0,mac=00:16:3e:5c:81:78 \ |
| 45 | -netdev type=tap,id=net0,ifname=vif3.0-emu,br=xenbr0,script=no,downscript=no \ |
| 46 | -smp 4,maxcpus=4 \ |
| 47 | -nographic \ |
| 48 | -machine xenpvh,ram-low-base=0,ram-low-size=2147483648,ram-high-base=4294967296,ram-high-size=2147483648,pci-ecam-base=824633720832,pci-ecam-size=268435456,pci-mmio-base=4026531840,pci-mmio-size=33554432,pci-mmio-high-base=824902156288,pci-mmio-high-size=68719476736 \ |
| 49 | -m 4096 |