feat: add netvm shell for raw shel access

This commit is contained in:
Lance Vick 2025-04-30 17:56:00 -07:00
parent 24a254a914
commit d1229c0f45
Signed by: lrvick
GPG Key ID: 8E47A1EC35A1551D
1 changed files with 15 additions and 0 deletions

View File

@ -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 <local-path> <remote-path>