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

QEMU instance does not exit when VM shuts itself down. #2866

Closed
merwick opened this issue Jul 29, 2020 · 5 comments
Closed

QEMU instance does not exit when VM shuts itself down. #2866

merwick opened this issue Jul 29, 2020 · 5 comments
Assignees

Comments

@merwick
Copy link
Contributor

merwick commented Jul 29, 2020

Description of problem

Stopping a Kata VM (e.g. using /proc/sysrq-trigger) from within the VM doesn't cause the QEMU process to exit.

Expected result

echo b > /proc/sysrq-trigger, Kata VM shuts down and QEMU process exits

Actual result

QEMU instance keeps running but VM is now unresponsive having shut down.


@merwick
Copy link
Contributor Author

merwick commented Jul 29, 2020

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.

The QEMU instance needs to be told to exit and not reboot which can be done by passing the --no-reboot command line option when creating the VM.

I am working on a fix for this, please assign issue to me.

merwick added a commit to merwick/runtime that referenced this issue Jul 29, 2020
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: kata-containers#2866

Signed-off-by: Liam Merwick <[email protected]>
@devimc devimc closed this as completed in a162469 Jul 30, 2020
@merwick
Copy link
Contributor Author

merwick commented Jul 30, 2020

@devimc This covers Kata 1.12 but I'm not sure how to deal with Kata 2.0. I ported the changes to the 2.0-dev branch [1] and they pass Travis CI [2] - does it need a separate PR?
[1] merwick/kata-containers@c15ef21
[2] https://travis-ci.org/github/merwick/kata-containers/builds/713350564

@devimc
Copy link

devimc commented Jul 30, 2020

@merwick yes please, forwardport this patch,

NOTE: 2.0-dev uses go modules (not dep)

@devimc
Copy link

devimc commented Jul 30, 2020

does it need a separate PR?

yes, please

@merwick
Copy link
Contributor Author

merwick commented Jul 30, 2020

In merwick/kata-containers@5010e3a I made the changes to go.mod, got.sum & vendor/modules.txt (I'm not sure if I should have deleted the old govmm lines (167-168) in go.sum). I'll submit the PR and people can comment there.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants