Add VM Troubleshooting

This commit is contained in:
PROTechThor 2020-10-10 11:02:41 +01:00
parent ad55c802ce
commit 24c86d459c
5 changed files with 79 additions and 56 deletions

10
doc.md
View File

@ -135,13 +135,19 @@ Core documentation for Qubes users.
* [Making Any File Persistent Using `bind-dirs`](/doc/bind-dirs/)
* [GUI Configuration](/doc/gui-configuration/)
* [Resizing Disk Images](/doc/resize-disk-image/)
* [Troubleshooting UEFI](/doc/uefi-troubleshooting/)
* [Troubleshooting Newer Hardware](/doc/newer-hardware-troubleshooting/)
* [Mounting and Decrypting Qubes Partitions from Outside Qubes](/doc/mount-from-other-os/)
* [KDE](/doc/kde/)
* [i3 Window Manager](/doc/i3/)
* [awesome Window Manager](/doc/awesome/)
### Troubleshooting
* [Installation Troubleshooting](/doc/installation-troubleshooting/)
* [UEFI Troubleshooting](/doc/uefi-troubleshooting/)
* [Suspend/Resume Troubleshooting](/doc/suspend-resume-troubleshooting/)
* [VM Troubleshooting](/doc/vm-troubleshooting/)
### Reference Pages
* [Command-line Tools](/doc/tools/)
@ -294,8 +300,6 @@ Unofficial, third-party documentation from the Qubes community and others.
* [Lenovo ThinkPad Troubleshooting](/doc/thinkpad-troubleshooting/)
* [Apple MacBook Troubleshooting](/doc/macbook-troubleshooting/)
* [Getting Sony Vaio Z laptop to work with Qubes](/doc/sony-vaio-tinkering/)
* [Fixing wireless on suspend & resume](/doc/wireless-troubleshooting/)
* [How to remove VMs manually](/doc/remove-vm-manually/)
* [Intel Integrated Graphics Troubleshooting](/doc/intel-igfx-troubleshooting/)
### Building Guides

View File

@ -1,36 +0,0 @@
---
layout: doc
title: How to Remove VMs Manually
permalink: /doc/remove-vm-manually/
---
How to Remove VMs Manually
==========================
How to Remove a TemplateVM Manually
-----------------------------------
Try the [normal method] before resorting to this.
All of the following commands should be executed in a dom0 terminal.
When a template is marked as 'installed by package manager', but cannot be uninstalled there, trying to uninstall manually will result in the error "ERROR: VM installed by package manager: template-vm-name". Do as follows to be able to uninstall the template:
1. Check the state of `installed_by_rpm`
$ qvm-prefs template-vm-name
2. If `installed_by_rpm - True]`, mark the template as not installed by package manager
$ qvm-prefs template-vm-name installed_by_rpm false
3. Re-check the state of `installed_by_rpm`
- If `installed_by_rpm - False`, remove the template like you would a regular qube:
$ qvm-remove template-vm-name
- If `installed_by_rpm` remains `True`, reboot your computer to bring qubes.xml in sync with qubesd, and try again to remove the template.
[normal method]: /doc/templates/#uninstalling

View File

@ -355,12 +355,7 @@ The output should look like this:
#### Troubleshooting
In case of problems, you can access the VM console using `qvm-console-dispvm VMNAME` in dom0, then access the GRUB menu.
You need to call it just after starting the VM (until `GRUB_TIMEOUT` expires); for example, in a separate dom0 terminal window.
In any case you can later access the VM's logs (especially the VM console log `/var/log/xen/console/guest-VMNAME.log`).
You can always set the kernel back to some dom0-provided value to fix a VM kernel installation.
In case of problems, visit the [VM Troubleshooting guide](/doc/vm-troubleshooting/#vm-kernel-troubleshooting) to learn how to access the VM console, view logs and fix a VM kernel installation.
[dom0-kernel-upgrade]: /doc/software-update-dom0/#kernel-upgrade

View File

@ -99,17 +99,7 @@ The lesson is that you should carefully look at what is being installed to your
### Package installation errors in Qubes 4.0
By default, templates in 4.0 only have a loopback interface.
Some packages will throw an error on installation in this situation.
For example, Samba expects to be configured using a network interface post installation.
One solution is to add a dummy interface to allow the package to install correctly:
ip link add d0 type dummy
ip addr add 192.168.0.1/24 dev d0
ip link set d0 up
If some packages throw installation errors, see [this guide.](/doc/vm-troubleshooting/#fixing-package-installation-errors)
[TemplateVM]: /doc/templates/
[Minimal TemplateVMs]: /doc/templates/minimal/

View File

@ -0,0 +1,70 @@
---
layout: doc
title: Suspend/Resume Troubleshooting
permalink: /doc/vm-troubleshooting/
redirect_from:
- /doc/remove-vm-manually/
---
# VM troubleshooting #
## VM Kernel troubleshooting ##
In case of problems, you can access the VM console using `qvm-console-dispvm VMNAME` in dom0, then access the GRUB menu.
You need to call it just after starting the VM (until `GRUB_TIMEOUT` expires); for example, in a separate dom0 terminal window.
In any case you can later access the VM's logs (especially the VM console log `/var/log/xen/console/guest-VMNAME.log`).
You can always set the kernel back to some dom0-provided value to fix a VM kernel installation.
## Qubes starts, but no VMs load ##
This issue may occur if a dom0 update is interrupted halfway through and/or a hard power off is done without shutting down Qubes, which results in files getting corrupted.
In this case, the best fix is to reinstall Qubes and restore your files from a backup.
Even if you have not backed up data in a while, you should be able to mount the volumes to pull data from them.
## Can not uninstall a VM / “ERROR: VM installed by package manager: template-vm-name”
Try the [normal method] before resorting to this method to remove a VM manually.
All of the following commands should be executed in a dom0 terminal.
When a template is marked as 'installed by package manager', but cannot be uninstalled there, trying to uninstall manually will result in the error "ERROR: VM installed by package manager: template-vm-name". Do as follows to be able to uninstall the template:
1. Check the state of `installed_by_rpm`
$ qvm-prefs template-vm-name
2. If `installed_by_rpm - True]`, mark the template as not installed by package manager
$ qvm-prefs template-vm-name installed_by_rpm false
3. Re-check the state of `installed_by_rpm`
- If `installed_by_rpm - False`, remove the template like you would a regular qube:
$ qvm-remove template-vm-name
- If `installed_by_rpm` remains `True`, reboot your computer to bring qubes.xml in sync with qubesd, and try again to remove the template.
[normal method]: /doc/templates/#uninstalling
## Fixing package installation errors ##
By default, templates in 4.0 only have a loopback interface.
Some packages will throw an error on installation in this situation.
For example, Samba expects to be configured using a network interface post installation.
One solution is to add a dummy interface to allow the package to install correctly:
ip link add d0 type dummy
ip addr add 192.168.0.1/24 dev d0
ip link set d0 up
## "Cannot connect to qrexec agent" error ##
If you face this error when starting a VM, it may be due to too little initial memory.
A solution is to increase the initial memory from 200MB to 400MB by navigating to VM settings » Advanced » Initial memory.