Skip to content

[feature request] qvm-restart #4747

@GammaSQ

Description

@GammaSQ

An easy fix for most VM-internal problems is to reboot the VM. Especially with VMs supplying networking, USB-device or similar, this isn't a simple matter of qvm-shutdown VM --wait && qvm-start VM. What I'm hoping for is a command that restarts the VM and restores the state as good as possible. That means unplugging everything connected to the VM, unplugging everything the VM is connected to, shutting down (asking weather a kill is in order if that takes too long), rebooting and reconnecting everything.

In the case of networking VMs, it should be a simple matter of storing the connections, rebooting and reconnecting all connected VMs.
It's more tricky when block-devices are involved. E.g. a VM decrypting a block device and that being attached to another VM, Users have to take care of decryption themselves. I'm not sure weather a simple error after the fact ("can't reconnect DecryptVM:dm-0 to ConnectedVM: does not exist!") is okay, or a warning/conformation before restart is necessary ("You are about to restart a VM that supplies devices: dm-0 to ConnectedVM; continue?")
Furthermore, I'm not sure weather a dispVM should actually restart, or by default shut down, be deleted, and another dispVM takes its place.

Since this is intended to recover from error-states, excluding devices to be attached after reboot might be a good idea, something like --no-usb; --no-block, --no-pci. (e.g. a network-vm with attached wifi-dongle might have issues because of it.)

Metadata

Metadata

Assignees

Labels

C: coreThis issue pertains to a Qubes core component.P: defaultPriority: default. Default priority for new issues, to be replaced given sufficient information.pr submittedA pull request has been submitted for this issue.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions