How to launch multiple QEMU based VM's that can communicate with the outside world and between each other other without any setup on the host.
This uses two features available in qemu
- User Mode Networking stack - SLIRP
- Socket networking backend allows you to create a network of guests that can see each other
This allows us to have
On the virt platform if the kernel crashes early (even before the virtio-serial port comes up), you need to be able to debug the early boot process. This can be done using the sysbug-debugcon device which is available right at boot.
The key items to note below are
- Kernel commandline:
console=ttyS0
- Additional sysbus-debugcon device:
-device sysbus-debugcon,iobase=0x3f8,chardev=serialcon -chardev file,path=/tmp/serial-log,id=serialcon
Note:
- QEMU includes bundled option ROMs which are loaded by default unless a device is specifically setup with --romfile="".
- These options roms are bundled as binaries. The source code for the same can be found at http://ipxe.org/
- These options roms are useful for example when you want to PXE boot over a virtio-net device.
Here is an example of booting via Network PXE using the option ROM
qemu-system-x86_64 \
The directions below are specific to an Ubuntu 16.04 host system equipped with a GeForce GTX 550 Ti graphics card. While the process should be the same, YMMV.
- Make sure your system supports IOMMU groups
todo -- get directions from SRIOV page
PC: | Q35: | |
00:04.0 VGA compatible controller: NVIDIA Corporation GK107 [GeForce GTX 650] (rev a1) (prog-if 00 [VGA controller]) | 00:03.0 VGA compatible controller: NVIDIA Corporation GK107 [GeForce GTX 650] (rev a1) (prog-if 00 [VGA controller]) | |
Physical Slot: 4 < | |
Region 0: Memory at 80000000 (32-bit, non-prefetchable) [size=16M] | Region 0: Memory at 90000000 (32-bit, non-prefetchable) [size=16M] | |
Region 5: I/O ports at c000 [size=128] | Region 5: I/O ports at 6000 [size=128] | |
Capabilities: [78] Express (v2) Endpoint, MSI 00 | Capabi |
Build the kernel with ACPI debug enabled as described in https://www.kernel.org/doc/Documentation/acpi/debug.txt
tl;dr
ACPI debug output is globally enabled by CONFIG_ACPI_DEBUG. If this config
Note: virtio-serial does cannot be connected to a pcie bus. It does work when connected directly to the host bridge as a transistional virtio device. | |
This needs to be investigated | |
``` | |
#!/bin/bash | |
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- | |
# ex: ts=8 sw=4 sts=4 et filetype=sh | |
VMN=${VMN:=1} |