Skip to content
This repository was archived by the owner on May 12, 2021. It is now read-only.

Commit a162469

Browse files
committed
qemu: Set govmmQemu NoReboot config Knob
The Kata architecture does not support rebooting VMs (the lifecycle being start/exec/kill) and if a VM is killed (e.g. using sysrq-trigger), the VM does not exit fully and other layers do not notice the state change. Set the NoReboot config Knob so that govmmQemu.LaunchQemu() runs QEMU with the --no-reboot command-line option. Fixes: #2866 Signed-off-by: Liam Merwick <[email protected]>
1 parent b1cbf83 commit a162469

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

virtcontainers/qemu.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -489,6 +489,7 @@ func (q *qemu) createSandbox(ctx context.Context, id string, networkNS NetworkNa
489489
NoUserConfig: true,
490490
NoDefaults: true,
491491
NoGraphic: true,
492+
NoReboot: true,
492493
Daemonize: true,
493494
MemPrealloc: q.config.MemPrealloc,
494495
HugePages: q.config.HugePages,

virtcontainers/qemu_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,7 @@ func TestQemuKnobs(t *testing.T) {
202202
assert.Equal(q.qemuConfig.Knobs.NoUserConfig, true)
203203
assert.Equal(q.qemuConfig.Knobs.NoDefaults, true)
204204
assert.Equal(q.qemuConfig.Knobs.NoGraphic, true)
205+
assert.Equal(q.qemuConfig.Knobs.NoReboot, true)
205206
}
206207

207208
func testQemuAddDevice(t *testing.T, devInfo interface{}, devType deviceType, expected []govmmQemu.Device) {

0 commit comments

Comments
 (0)