diff --git a/src/aleph/vm/controllers/__main__.py b/src/aleph/vm/controllers/__main__.py index 519270b48..f3cef3171 100644 --- a/src/aleph/vm/controllers/__main__.py +++ b/src/aleph/vm/controllers/__main__.py @@ -53,6 +53,7 @@ def parse_args(args): help="set loglevel to DEBUG", action="store_const", const=logging.DEBUG, + default=logging.INFO, ) return parser.parse_args(args) diff --git a/src/aleph/vm/hypervisors/qemu/qemuvm.py b/src/aleph/vm/hypervisors/qemu/qemuvm.py index 5949fbdc4..5bcb1313c 100644 --- a/src/aleph/vm/hypervisors/qemu/qemuvm.py +++ b/src/aleph/vm/hypervisors/qemu/qemuvm.py @@ -102,6 +102,13 @@ async def start( # Tell to put the output to std fd, so we can include them in the log "-serial", "stdio", + # nographics. Seems redundant with -serial stdio but without it the boot process is not displayed on stdout + "-nographic", + # Boot + # order=c only first hard drive + # reboot-timeout in combination with -no-reboot, makes it so qemu stop if there is no bootable device + "-boot", + "order=c,reboot-timeout=1", # Uncomment for debug # "-serial", "telnet:localhost:4321,server,nowait", # "-snapshot", # Do not save anything to disk diff --git a/src/aleph/vm/hypervisors/qemu_confidential/qemuvm.py b/src/aleph/vm/hypervisors/qemu_confidential/qemuvm.py index 85ca63c1e..89e9c3e80 100644 --- a/src/aleph/vm/hypervisors/qemu_confidential/qemuvm.py +++ b/src/aleph/vm/hypervisors/qemu_confidential/qemuvm.py @@ -87,12 +87,18 @@ async def start( "-qmp", f"unix:{self.qmp_socket_path},server,nowait", # Tell to put the output to std fd, so we can include them in the log - "-nographic", "-serial", "stdio", - "--no-reboot", # Rebooting from inside the VM shuts down the machine - "-S", + # nographics. Seems redundant with -serial stdio but without it the boot process is not displayed on stdout + "-nographic", + # Boot + # order=c only first hard drive + # reboot-timeout in combination with -no-reboot, makes it so qemu stop if there is no bootable device + "-boot", + "order=c,reboot-timeout=1", # Confidential options + # Do not start CPU at startup, we will start it via QMP after injecting the secret + "-S", "-object", f"sev-guest,id=sev0,policy={self.sev_policy},cbitpos={sev_info.c_bit_position}," f"reduced-phys-bits={sev_info.phys_addr_reduction},"