Support optional boot menu and increase power down timeout.

This commit is contained in:
Michael Lipp 2023-06-11 14:04:25 +02:00
parent 175d64e1ca
commit f49e834f02
3 changed files with 9 additions and 2 deletions

View file

@ -42,10 +42,13 @@
# * secure[-4m] # * secure[-4m]
# "firmware": "uefi" # "firmware": "uefi"
# Whether to show a boot menu.
# "bootMenu": false
# When terminating, a graceful powerdown is attempted. If it # When terminating, a graceful powerdown is attempted. If it
# doesn't succeed within the given timeout (seconds) SIGTERM # doesn't succeed within the given timeout (seconds) SIGTERM
# is sent to Qemu. # is sent to Qemu.
# "powerdownTimeout": 60 # "powerdownTimeout": 900
# RAM settings # RAM settings
# "maximumRam": "1G" # "maximumRam": "1G"

View file

@ -114,6 +114,7 @@ class Configuration implements Dto {
public String name; public String name;
public String uuid; public String uuid;
public boolean useTpm; public boolean useTpm;
public boolean bootMenu;
public String firmware = "uefi"; public String firmware = "uefi";
public BigInteger maximumRam; public BigInteger maximumRam;
public BigInteger currentRam; public BigInteger currentRam;
@ -127,7 +128,7 @@ class Configuration implements Dto {
public String accelerator = "kvm"; public String accelerator = "kvm";
public String rtcBase = "utc"; public String rtcBase = "utc";
public String rtcClock = "rt"; public String rtcClock = "rt";
public int powerdownTimeout = 60; public int powerdownTimeout = 900;
public Network[] network = { new Network() }; public Network[] network = { new Network() };
public Drive[] drives; public Drive[] drives;
public Spice spice; public Spice spice;

View file

@ -67,6 +67,9 @@
<#if vm.firmware?starts_with("secure")> <#if vm.firmware?starts_with("secure")>
- [ "-global", "driver=cfi.pflash01,property=secure,value=on" ] - [ "-global", "driver=cfi.pflash01,property=secure,value=on" ]
</#if> </#if>
<#if vm.bootMenu>
- [ "-boot", "menu=on" ]
</#if>
# * Provide RAM # * Provide RAM
- [ "-object", "memory-backend-ram,id=pc.ram,\ - [ "-object", "memory-backend-ram,id=pc.ram,\
size=${ (vm.maximumRam!1073741824)?c }" ] size=${ (vm.maximumRam!1073741824)?c }" ]