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

Commit

Permalink
qemu: Set govmmQemu NoReboot config Knob
Browse files Browse the repository at this point in the history
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 <liam.merwick@oracle.com>
  • Loading branch information
merwick committed Jul 30, 2020
1 parent b1cbf83 commit a162469
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions virtcontainers/qemu.go
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,7 @@ func (q *qemu) createSandbox(ctx context.Context, id string, networkNS NetworkNa
NoUserConfig: true,
NoDefaults: true,
NoGraphic: true,
NoReboot: true,
Daemonize: true,
MemPrealloc: q.config.MemPrealloc,
HugePages: q.config.HugePages,
Expand Down
1 change: 1 addition & 0 deletions virtcontainers/qemu_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ func TestQemuKnobs(t *testing.T) {
assert.Equal(q.qemuConfig.Knobs.NoUserConfig, true)
assert.Equal(q.qemuConfig.Knobs.NoDefaults, true)
assert.Equal(q.qemuConfig.Knobs.NoGraphic, true)
assert.Equal(q.qemuConfig.Knobs.NoReboot, true)
}

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

0 comments on commit a162469

Please sign in to comment.