mirror of
https://github.com/aljazceru/kata-containers.git
synced 2025-12-18 14:54:19 +01:00
qemu: allow to create a stopped guest
When Knobs.Stopped is set, the guest CPU will not be started at startup. Signed-off-by: Peng Tao <bergwolf@gmail.com>
This commit is contained in:
@@ -1182,6 +1182,9 @@ type Knobs struct {
|
||||
// Only active when Realtime is set to true
|
||||
Mlock bool
|
||||
|
||||
// Stopped will not start guest CPU at startup
|
||||
Stopped bool
|
||||
|
||||
// Realtime will enable realtime QEMU
|
||||
Realtime bool
|
||||
}
|
||||
@@ -1521,6 +1524,10 @@ func (config *Config) appendKnobs() {
|
||||
config.qemuParams = append(config.qemuParams, "mlock=off")
|
||||
}
|
||||
}
|
||||
|
||||
if config.Knobs.Stopped == true {
|
||||
config.qemuParams = append(config.qemuParams, "-S")
|
||||
}
|
||||
}
|
||||
|
||||
func (config *Config) appendBios() {
|
||||
|
||||
Reference in New Issue
Block a user