diff options
-rw-r--r-- | README.md | 24 |
1 files changed, 24 insertions, 0 deletions
@@ -106,3 +106,27 @@ sed -i 's|root=/dev/sda3 rw|root=/dev/vda2 rw console=ttyS0|g' /boot/syslinux/sy exit poweroff ``` + +## Start Arch Linux virtual machine for automated builds + +The following command starts the Arch Linux QEMU virtual machine in a read-only +mode (`snapshot=on`) to prevent altering the original image file. + +Furthermore the local port 22 of the VM is forwarded to the localhost port 9999 +of the host. Thus clients on the host can use SSH to connect to the VM. + +Again no graphical display is used and only output of the serial console is +shown in the terminal. Since the `console=ttyS0` kernel parameter was set in +the bootloader configuration of the VM, no manual editing of kernel parameters +during runtime is needed (in contrast to the current Arch Linux installation +image). + +``` +qemu-system-x86_64 \ + -enable-kvm \ + -m 4G \ + -net nic,model=virtio -net user,hostfwd=tcp:127.0.0.1:9999-:22 \ + -drive file=vms/archlinux.qcow2,media=disk,snapshot=on,if=virtio \ + -smp cpus=4 \ + -nographic +``` |