feat: add netvm shell for raw shel access
This commit is contained in:
parent
24a254a914
commit
d1229c0f45
|
@ -70,6 +70,19 @@ qga() {
|
||||||
fi
|
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(){
|
function cmd_start(){
|
||||||
[ ! -f "${LOCKFILE}" ] || { echo "Error: Netvm already running"; exit 1; }
|
[ ! -f "${LOCKFILE}" ] || { echo "Error: Netvm already running"; exit 1; }
|
||||||
local net_args=""
|
local net_args=""
|
||||||
|
@ -235,6 +248,8 @@ cmd_usage() {
|
||||||
Start headless network vm in the background
|
Start headless network vm in the background
|
||||||
netvm stop
|
netvm stop
|
||||||
Stop headless network vm
|
Stop headless network vm
|
||||||
|
netvm shell
|
||||||
|
Start interactive network vm in the foreground
|
||||||
netvm status
|
netvm status
|
||||||
Get hostname and uptime from running network vm
|
Get hostname and uptime from running network vm
|
||||||
netvm push <local-path> <remote-path>
|
netvm push <local-path> <remote-path>
|
||||||
|
|
Loading…
Reference in New Issue