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

`default_dispvm` global default value #3688

Open
modulistic opened this Issue Mar 10, 2018 · 5 comments

Comments

Projects
None yet
6 participants
@modulistic

Qubes OS version:

Qubes release 4.0 (R4.0)
Up to date as of 2018-03-10 with repo qubes-dom0-current-testing

Affected component(s):

  • /var/lib/qubes/qubes.xml
  • qvm-prefs

Steps to reproduce the behavior:

  • qvm-remove fedora-25-dvm

Expected behavior:

  • qube fedora-25-dvm should be gone

Actual behavior:

  • qube fedora-25-dvm is not gone
  • message in /var/log/qubes/qubes.log:
    Cannot remove fedora-25-dvm, used by Qubes.default_dispvm

General notes:

  • I am trying to get rid of the old qube fedora-25-dvm in favor of my new one fedora-26-dvm
  • Everything works fine, I just want to get rid of the old one and reclaim the used harddisk space
  • I could replace the default_dispvm pref from all my qubes, wifh qvm-prefs XXX default_dispvm fedora-26-dvm
  • Qubes is not and hasn't been the name of any of any qube in my machine: it's something made up by qvm-prefs or its dependencies
  • The structure of /var/lib/qubes/qubes.xml is like this;
<qubes>
  <labels>...</labels>
  <pools>...</pools>
  <properties>
    ...
    <property name="default_dispvm">fedora-25-dvm</property><!-- this is the problem, I guess -->
   ...
  <domains>
    <domain id="..." class="...">
      <properties>
        ...
        <property name="default_dispvm">fedora-26-dvm</property>
        ...
      </properties>
      ...
    </domain>
    ...
  </domains>
</qubes>
  • I would expect, by reading the comment in the log, to be able to get rid of it by:
qvm-prefs Qubes default_dispvm fedora-26-dvm # or qvm-prefs -D Qubes default_dispvm
qvm-remove fedora-25-dvm
  • Maybe there shouldn't be a Qubes.default_dispvm
  • Or maybe it should have the role of dom0.default_dispvm, and this latter should not exist?
  • Maybe the system's default value for default_dvm pref should be managed from the Qubes Global Settings tool, and it should set both Qubes.default_dispvm and dom0.default_dispvm?

Related issues:

@unman

This comment has been minimized.

Show comment
Hide comment
@unman

unman Mar 10, 2018

Member

I suggest you read this page:
https://www.qubes-os.org/doc/dispvm/

You cant remove the fedora-25-dvm because it is set as the default_dispvm. (The log message tells you this but is somewhat misleading: you already realise this is the case.)
You need to set another qube as the default_dispvm, but you're using the wrong syntax.
qubes-prefs default_dispvm <name> is what you want.

The thing is that now there are multiple disposableVMs it doesn't really have the same impact as when there was only one - I assume that's the reason why it's no longer in the Global Settings tool.

So there's a host of things here:

  1. It would be better if the error message identified the real problem.
  2. The log message is confusing.
  3. The docs aren't all that clear.
  4. You dont know how to set the default dispvm.

Please change the Title to something more specific.

Member

unman commented Mar 10, 2018

I suggest you read this page:
https://www.qubes-os.org/doc/dispvm/

You cant remove the fedora-25-dvm because it is set as the default_dispvm. (The log message tells you this but is somewhat misleading: you already realise this is the case.)
You need to set another qube as the default_dispvm, but you're using the wrong syntax.
qubes-prefs default_dispvm <name> is what you want.

The thing is that now there are multiple disposableVMs it doesn't really have the same impact as when there was only one - I assume that's the reason why it's no longer in the Global Settings tool.

So there's a host of things here:

  1. It would be better if the error message identified the real problem.
  2. The log message is confusing.
  3. The docs aren't all that clear.
  4. You dont know how to set the default dispvm.

Please change the Title to something more specific.

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Mar 10, 2018

Member
Member

marmarek commented Mar 10, 2018

@modulistic

This comment has been minimized.

Show comment
Hide comment
@modulistic

modulistic Mar 10, 2018

Hey thanks for the quick and informative answer :)
Clearly I've lagged behind the documentation, glad to see it's talking about R4. Also I was unaware of qubes-prefs; I was confusing it with qvm-prefs.

Hey thanks for the quick and informative answer :)
Clearly I've lagged behind the documentation, glad to see it's talking about R4. Also I was unaware of qubes-prefs; I was confusing it with qvm-prefs.

@modulistic modulistic changed the title from Unable to remove original `fedora-25-dvm` qube to `default_dispvm` global default value Mar 10, 2018

@andrewdavidwong andrewdavidwong added this to the Release 4.0 milestone Mar 10, 2018

@andrewdavidwong andrewdavidwong added the bug label Mar 10, 2018

@mirrorway

This comment has been minimized.

Show comment
Hide comment
@mirrorway

mirrorway Mar 11, 2018

I keep hearing about this issue. I think it would be more user-friendly if removing a VM that is the default_dispvm should automatically set it to none.

$ qvm-remove test
These VM(s) will be completely removed: test
default_dispvm is currently test, will be set to none.
clockvm is currently test, will be set to none.
Are you sure? [y/N]

mirrorway commented Mar 11, 2018

I keep hearing about this issue. I think it would be more user-friendly if removing a VM that is the default_dispvm should automatically set it to none.

$ qvm-remove test
These VM(s) will be completely removed: test
default_dispvm is currently test, will be set to none.
clockvm is currently test, will be set to none.
Are you sure? [y/N]

marmarta added a commit to marmarta/qubes-manager that referenced this issue Mar 14, 2018

Added default_dispvm to Global Settings
Added "default dispvm" to Global Settings.

references QubesOS/qubes-issues#3688

@marmarta marmarta referenced this issue in QubesOS/qubes-manager Mar 14, 2018

Merged

Added default_dispvm to Global Settings #78

@qubesos-bot qubesos-bot referenced this issue in QubesOS/updates-status Mar 28, 2018

Closed

manager v4.0.17 (r4.0) #468

@RefinedSoftwareLLC

This comment has been minimized.

Show comment
Hide comment
@RefinedSoftwareLLC

RefinedSoftwareLLC Jun 15, 2018

(Using qvm-remove or Qube Manager's Delete qube)
If the qube being deleted is the "[Dom0] Qube Global Settings" Default DispVM, then display:

"This qube can't be deleted while it is the system default of Default DispVM.
Change the system default of Default DispVM to: "

Then give a dropdown with the options of the list of dvm-templates (except qube being deleted).

If there are no other dvm-templates then:

"This qube can't be deleted while it is the system default of Default DispVM.
To delete this qube, first create another DVM-Template to replace it.

If triggered by qvm-remove in the console, then display and number the entries of the drop down, and have the console user select a number for the replacement or to cancel deleting the qube.

RefinedSoftwareLLC commented Jun 15, 2018

(Using qvm-remove or Qube Manager's Delete qube)
If the qube being deleted is the "[Dom0] Qube Global Settings" Default DispVM, then display:

"This qube can't be deleted while it is the system default of Default DispVM.
Change the system default of Default DispVM to: "

Then give a dropdown with the options of the list of dvm-templates (except qube being deleted).

If there are no other dvm-templates then:

"This qube can't be deleted while it is the system default of Default DispVM.
To delete this qube, first create another DVM-Template to replace it.

If triggered by qvm-remove in the console, then display and number the entries of the drop down, and have the console user select a number for the replacement or to cancel deleting the qube.

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