mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-04-30 12:44:39 +00:00
qemu: Add support for --no-shutdown Knob
Add support for --no-shutdown Knob. This allows us to shutdown the VM without quitting QEMU. Note: Also fix the comment around --no-reboot to be more accurate. Signed-off-by: Manohar Castelino <mcastelino@apple.com>
This commit is contained in:
parent
1ed52714c0
commit
fe83c208dc
@ -2402,8 +2402,12 @@ type Knobs struct {
|
|||||||
Realtime bool
|
Realtime bool
|
||||||
|
|
||||||
// Exit instead of rebooting
|
// Exit instead of rebooting
|
||||||
|
// Prevents QEMU from rebooting in the event of a Triple Fault.
|
||||||
NoReboot bool
|
NoReboot bool
|
||||||
|
|
||||||
|
// Don’t exit QEMU on guest shutdown, but instead only stop the emulation.
|
||||||
|
NoShutdown bool
|
||||||
|
|
||||||
// IOMMUPlatform will enable IOMMU for supported devices
|
// IOMMUPlatform will enable IOMMU for supported devices
|
||||||
IOMMUPlatform bool
|
IOMMUPlatform bool
|
||||||
}
|
}
|
||||||
@ -2776,6 +2780,10 @@ func (config *Config) appendKnobs() {
|
|||||||
config.qemuParams = append(config.qemuParams, "--no-reboot")
|
config.qemuParams = append(config.qemuParams, "--no-reboot")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if config.Knobs.NoShutdown {
|
||||||
|
config.qemuParams = append(config.qemuParams, "--no-shutdown")
|
||||||
|
}
|
||||||
|
|
||||||
if config.Knobs.Daemonize {
|
if config.Knobs.Daemonize {
|
||||||
config.qemuParams = append(config.qemuParams, "-daemonize")
|
config.qemuParams = append(config.qemuParams, "-daemonize")
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user