Compare commits
2 Commits
3985d8ac19
...
b980eb3a97
Author | SHA1 | Date |
---|---|---|
|
b980eb3a97 | |
|
22469ca0b9 |
|
@ -70,6 +70,7 @@ FROM stagex/user-libusb@sha256:53d499555164f12d9e87118a6d44e1d07f0b1cc9081a29eb6
|
|||
FROM stagex/user-libusbmuxd@sha256:1e97f0a2ede0ee5fac9b056d0395e12b77c9f0bf550f9d0c20734ce0617eb51f AS user-libusbmuxd
|
||||
FROM stagex/user-usbmuxd@sha256:90f687d2368328b76141badc382a21873a5b44d4ddccf851c017caf1e78af418 AS user-usbmuxd
|
||||
FROM stagex/user-socat@sha256:990a70ae13462d8ba0a925fe959dd83070cbecdb3f91ff145caca5232171f3b8 AS user-socat
|
||||
FROM stagex/user-dhcpcd@sha256:60bd86d9e2fcb6341c1efaeda5d786b63ff92e9d0c729cd8f634a20ff54ee71e AS user-dhcpcd
|
||||
|
||||
FROM scratch AS base
|
||||
ARG VERSION development
|
||||
|
@ -129,6 +130,7 @@ COPY --from=core-gcc /usr/lib/. initramfs/usr/lib/
|
|||
COPY --from=user-usbmuxd . initramfs
|
||||
COPY --from=user-glib . initramfs
|
||||
COPY --from=user-numactl . initramfs
|
||||
COPY --from=user-dhcpcd . initramfs
|
||||
COPY --from=user-qemu /usr/bin/qemu-ga initramfs/usr/bin/
|
||||
|
||||
COPY src/guest/rootfs/ initramfs
|
||||
|
|
|
@ -82,10 +82,19 @@ function cmd_start(){
|
|||
-boot order=d \
|
||||
-chardev socket,path=/var/run/netvm_qga.sock,server=on,wait=off,id=qga0 \
|
||||
$net_args \
|
||||
-device qemu-xhci \
|
||||
-device virtio-serial \
|
||||
-device virtserialport,chardev=qga0,name=org.qemu.guest_agent.0 &
|
||||
echo $! > "${LOCKFILE}"
|
||||
#TODO: Poll here for VM to come up and respond to QMP agent ping
|
||||
pid=$!
|
||||
echo "$pid" > "${LOCKFILE}"
|
||||
until qemu_ga guest-ping; do
|
||||
ps -p $pid >/dev/null || {
|
||||
echo "Error: netvm exited unexpectedly";
|
||||
exit 1;
|
||||
rm "${LOCKFILE}"
|
||||
}
|
||||
sleep 1
|
||||
done
|
||||
}
|
||||
|
||||
function cmd_stop(){
|
||||
|
|
Loading…
Reference in New Issue