diff --git a/src/host/rootfs/usr/local/bin/netvm b/src/host/rootfs/usr/local/bin/netvm index 5bbfbcc..4fdc215 100755 --- a/src/host/rootfs/usr/local/bin/netvm +++ b/src/host/rootfs/usr/local/bin/netvm @@ -70,6 +70,19 @@ qga() { fi } +function cmd_shell(){ + qemu-system-x86_64 \ + -m 512M \ + --machine q35 \ + -nographic \ + -net none \ + -cdrom /guest.img \ + -boot order=d \ + -device qemu-xhci \ + -device virtio-serial \ + -device virtserialport,chardev=qga0,name=org.qemu.guest_agent.0 +} + function cmd_start(){ [ ! -f "${LOCKFILE}" ] || { echo "Error: Netvm already running"; exit 1; } local net_args="" @@ -235,6 +248,8 @@ cmd_usage() { Start headless network vm in the background netvm stop Stop headless network vm + netvm shell + Start interactive network vm in the foreground netvm status Get hostname and uptime from running network vm netvm push