New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

qvm-remove sys-whonix error - QubesException: domain is in use "sys-whonix" #3193

Closed
adrelanos opened this Issue Oct 19, 2017 · 8 comments

Comments

@adrelanos
Member

adrelanos commented Oct 19, 2017

Qubes OS version:

Qubes R4 with all Qubes testing repositories

Affected TemplateVMs:

Dom0


Steps to reproduce the behavior:

Install Qubes R4 with all Qubes testing repositories.

Enable Qubes community templates repository in /etc/yum.repos.d/qubes-templates.repo.

sudo qubes-dom0-update qubes-template-whonix-gw qubes-template-whonix-ws

(Did last command because of #3188.)

sudo qubesctl state.sls qvm.sys-whonix
sudo qubesctl state.sls qvm.sys-whonix
sudo qubesctl state.highstate

qvm-prefs --set sys-whonix netvm sys-firewall

qvm-start sys-whonix

qvm-kill sys-whonix
qvm-remove sys-whonix

Expected behavior:

sys-whonix removed.

Actual behavior:

Error message

QubesException: domain is in use "sys-whonix"

Checked using qvm-ls that sys-whonix is not running, it's halted, whonix-gw and whonix-ws are halted as well and anon-whonix does not exist. No other VM using sys-whonix. I wonder what may be using sys-whonix?

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Oct 19, 2017

Member

See journalctl in dom0 for details where exactly it is used. You can't remove it if it's netvm of some other VM, even if not running. You need to change netvm first.

Member

marmarek commented Oct 19, 2017

See journalctl in dom0 for details where exactly it is used. You can't remove it if it's netvm of some other VM, even if not running. You need to change netvm first.

@adrelanos

This comment has been minimized.

Show comment
Hide comment
@adrelanos

adrelanos Oct 19, 2017

Member

Right.

whonix-ws-dvm is using sys-whonix.

And qvm-remove whonix-ws-dvm is also refused, because it is being used by whonix-ws-dvm.default_dispvm.

The required commands are:

qvm-prefs --set whonix-ws-dvm netvm ""
qvm-prefs --set whonix-ws-dvm default_dispvm ""
qvm-remove whonix-ws-dvm
qvm-remove sys-whonix

So this is not a core, but more a documentation or usability issue.

Member

adrelanos commented Oct 19, 2017

Right.

whonix-ws-dvm is using sys-whonix.

And qvm-remove whonix-ws-dvm is also refused, because it is being used by whonix-ws-dvm.default_dispvm.

The required commands are:

qvm-prefs --set whonix-ws-dvm netvm ""
qvm-prefs --set whonix-ws-dvm default_dispvm ""
qvm-remove whonix-ws-dvm
qvm-remove sys-whonix

So this is not a core, but more a documentation or usability issue.

@marmarek marmarek added this to the Release 4.0 milestone Oct 19, 2017

marmarek added a commit to marmarek/qubes-core-admin that referenced this issue Nov 7, 2017

app: clarify error message on failed domain remove (used somewhere)
Point to system logs for more details. Do not include them directly in
the message for privacy reasons (Admin API client may not be given
permission to it).

QubesOS/qubes-issues#3273
QubesOS/qubes-issues#3193

@qubesos-bot qubesos-bot referenced this issue in QubesOS/updates-status Nov 21, 2017

Closed

core-admin v4.0.12 (r4.0) #313

@adubois

This comment has been minimized.

Show comment
Hide comment
@adubois

adubois Mar 2, 2018

From an end user point of view, whonix-ws-dvm is visible from qvm-ls, so it make sense for him to naturally delete it before it's netvm.
However what is not obvious is qvm-remove whonix-ws-dvm -> Domain in use.
qvm-prefs --set whonix-ws-dvm default_dispvm "" as mentioned above fixed it.

If there is no real dependency (AFAIK this property is a property of the object itself, so should not be a blocker) -> so rather than doc update, should this ticket be tagged as bug in qvm-remove?

otherwise, happy to do the PR for the doc update of qvm-remove instructing that:

  • --force should be used because of that qvm-prefs value
  • that qvm-prefs should be cleared <-- my preferred solution

adubois commented Mar 2, 2018

From an end user point of view, whonix-ws-dvm is visible from qvm-ls, so it make sense for him to naturally delete it before it's netvm.
However what is not obvious is qvm-remove whonix-ws-dvm -> Domain in use.
qvm-prefs --set whonix-ws-dvm default_dispvm "" as mentioned above fixed it.

If there is no real dependency (AFAIK this property is a property of the object itself, so should not be a blocker) -> so rather than doc update, should this ticket be tagged as bug in qvm-remove?

otherwise, happy to do the PR for the doc update of qvm-remove instructing that:

  • --force should be used because of that qvm-prefs value
  • that qvm-prefs should be cleared <-- my preferred solution

adubois added a commit to adubois/qubes-doc that referenced this issue Mar 3, 2018

@adubois adubois referenced this issue in QubesOS/qubes-doc Mar 3, 2018

Merged

Fix for issue 3193 #610

@adubois

This comment has been minimized.

Show comment
Hide comment
@adubois

adubois Mar 3, 2018

Created QubesOS/qubes-doc#610
Problem is not limited to qvm-prefs of DVM itself.

adubois commented Mar 3, 2018

Created QubesOS/qubes-doc#610
Problem is not limited to qvm-prefs of DVM itself.

marmarta added a commit to marmarta/qubes-core-admin-client that referenced this issue Jul 19, 2018

Better information on error in qvm-remove
If qvm-remove fails because the VM is in use, it will display
information about where it is used.

fixes QubesOS/qubes-issues#3193

@marmarta marmarta referenced this issue in QubesOS/qubes-core-admin-client Jul 19, 2018

Merged

Better information on error in qvm-remove #74

@qubesos-bot

This comment has been minimized.

Show comment
Hide comment
@qubesos-bot

qubesos-bot Jul 20, 2018

Automated announcement from builder-github

The package python2-qubesadmin-4.0.19-0.1.fc25 has been pushed to the r4.0 testing repository for dom0.
To test this update, please install it with the following command:

sudo qubes-dom0-update --enablerepo=qubes-dom0-current-testing

Changes included in this update

Automated announcement from builder-github

The package python2-qubesadmin-4.0.19-0.1.fc25 has been pushed to the r4.0 testing repository for dom0.
To test this update, please install it with the following command:

sudo qubes-dom0-update --enablerepo=qubes-dom0-current-testing

Changes included in this update

@qubesos-bot qubesos-bot referenced this issue in QubesOS/updates-status Jul 20, 2018

Open

core-admin-client v4.0.19 (r4.0) #607

@qubesos-bot

This comment has been minimized.

Show comment
Hide comment
@qubesos-bot

qubesos-bot Jul 20, 2018

Automated announcement from builder-github

The package core-admin-client has been pushed to the r4.0 testing repository for the CentOS centos7 template.
To test this update, please install it with the following command:

sudo yum update --enablerepo=qubes-vm-r4.0-current-testing

Changes included in this update

Automated announcement from builder-github

The package core-admin-client has been pushed to the r4.0 testing repository for the CentOS centos7 template.
To test this update, please install it with the following command:

sudo yum update --enablerepo=qubes-vm-r4.0-current-testing

Changes included in this update

@qubesos-bot

This comment has been minimized.

Show comment
Hide comment
@qubesos-bot

qubesos-bot Jul 20, 2018

Automated announcement from builder-github

The package qubes-core-admin-client_4.0.19-1+deb9u1 has been pushed to the r4.0 testing repository for the Debian template.
To test this update, first enable the testing repository in /etc/apt/sources.list.d/qubes-*.list by uncommenting the line containing stretch-testing (or appropriate equivalent for your template version), then use the standard update command:

sudo apt-get update && sudo apt-get dist-upgrade

Changes included in this update

Automated announcement from builder-github

The package qubes-core-admin-client_4.0.19-1+deb9u1 has been pushed to the r4.0 testing repository for the Debian template.
To test this update, first enable the testing repository in /etc/apt/sources.list.d/qubes-*.list by uncommenting the line containing stretch-testing (or appropriate equivalent for your template version), then use the standard update command:

sudo apt-get update && sudo apt-get dist-upgrade

Changes included in this update

@qubesos-bot

This comment has been minimized.

Show comment
Hide comment
@qubesos-bot

qubesos-bot Jul 20, 2018

Automated announcement from builder-github

The component core-admin-client (including package python2-qubesadmin-4.0.19-0.1.fc26) has been pushed to the r4.0 testing repository for the Fedora template.
To test this update, please install it with the following command:

sudo yum update --enablerepo=qubes-vm-r4.0-current-testing

Changes included in this update

Automated announcement from builder-github

The component core-admin-client (including package python2-qubesadmin-4.0.19-0.1.fc26) has been pushed to the r4.0 testing repository for the Fedora template.
To test this update, please install it with the following command:

sudo yum update --enablerepo=qubes-vm-r4.0-current-testing

Changes included in this update

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment