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

Improve error reporting when user attempts to remove a VM that is set as "NetVM for DispVM" for another VM #2382

Closed
cyrinux opened this Issue Oct 16, 2016 · 6 comments

Comments

4 participants
@cyrinux

cyrinux commented Oct 16, 2016

Qubes OS version (e.g., R3.1):

3.2

Affected TemplateVMs (e.g., fedora-23, if applicable):

All


Expected behavior:

Clic remove or qvm-remove a vm

Actual behavior:

Got
Traceback (most recent call last):
File "/usr/bin/qvm-remove", line 112, in
main()
File "/usr/bin/qvm-remove", line 109, in main
qvm_collection.save()
File "/usr/lib64/python2.7/site-packages/qubes/qubes.py", line 687, in save
element = vm.create_xml_element()
File "/usr/lib64/python2.7/site-packages/qubes/modules/000QubesVm.py", line 2142, in create_xml_element
attrs = self.get_xml_attrs()
File "/usr/lib64/python2.7/site-packages/qubes/modules/000QubesVm.py", line 2131, in get_xml_attrs
value = attr_config'save'
File "/usr/lib64/python2.7/site-packages/qubes/modules/000QubesVm.py", line 235, in
if self.dispvm_netvm is not None
File "/usr/lib64/python2.7/site-packages/qubes/modules/000QubesVm.py", line 655, in dispvm_netvm
return self._collection[self._dispvm_netvm]
KeyError: 38

Steps to reproduce the behavior:

General notes:


Related issues:

@cyrinux

This comment has been minimized.

Show comment
Hide comment
@cyrinux

cyrinux Oct 16, 2016

I suspect a xml lint issue in my qubes.xml? But how to be sure of this? I can't say really seens which action this error appears.

cyrinux commented Oct 16, 2016

I suspect a xml lint issue in my qubes.xml? But how to be sure of this? I can't say really seens which action this error appears.

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Oct 16, 2016

Member

VM you're trying to remove is set as "DispVM NetVM" for some other VM.
Change it to other VM first.
Anyway, this should be better reported...

Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?

Member

marmarek commented Oct 16, 2016

VM you're trying to remove is set as "DispVM NetVM" for some other VM.
Change it to other VM first.
Anyway, this should be better reported...

Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?

@cyrinux

This comment has been minimized.

Show comment
Hide comment
@cyrinux

cyrinux Oct 17, 2016

Hi Marek,

I understand but it seems to not be this case. I don't see where appvm (no
proxy or netvm) are set as netvm for dispvm.
How to check this without qubes-manager?
With qvm-ls? In which file this info is stored?

And with this error I can't also change template for a vm. I get same
error.

Thanks you

On Sun, 16 Oct 2016, 23:19 Marek Marczykowski-Górecki, <
notifications@github.com> wrote:

VM you're trying to remove is set as "DispVM NetVM" for some other VM.
Change it to other VM first.
Anyway, this should be better reported...

Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#2382 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAfrq1aUop4Y3x0ljW0usXsXI3KLqky7ks5q0pTEgaJpZM4KYFIR
.

cyrinux commented Oct 17, 2016

Hi Marek,

I understand but it seems to not be this case. I don't see where appvm (no
proxy or netvm) are set as netvm for dispvm.
How to check this without qubes-manager?
With qvm-ls? In which file this info is stored?

And with this error I can't also change template for a vm. I get same
error.

Thanks you

On Sun, 16 Oct 2016, 23:19 Marek Marczykowski-Górecki, <
notifications@github.com> wrote:

VM you're trying to remove is set as "DispVM NetVM" for some other VM.
Change it to other VM first.
Anyway, this should be better reported...

Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#2382 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAfrq1aUop4Y3x0ljW0usXsXI3KLqky7ks5q0pTEgaJpZM4KYFIR
.

@andrewdavidwong

This comment has been minimized.

Show comment
Hide comment
@andrewdavidwong

andrewdavidwong Oct 17, 2016

Member

@cyrinux: Suppose the VM you want to remove is a ProxyVM called sys-proxy. Suppose that you have an AppVM called untrusted, and in the Advanced tab of the VM Settings for untrusted, you have the following setting:

NetVM for DispVM: sys-proxy

You must change this from sys-proxy to some other entry in that list before you can remove sys-proxy.

Member

andrewdavidwong commented Oct 17, 2016

@cyrinux: Suppose the VM you want to remove is a ProxyVM called sys-proxy. Suppose that you have an AppVM called untrusted, and in the Advanced tab of the VM Settings for untrusted, you have the following setting:

NetVM for DispVM: sys-proxy

You must change this from sys-proxy to some other entry in that list before you can remove sys-proxy.

@cyrinux

This comment has been minimized.

Show comment
Hide comment
@cyrinux

cyrinux Oct 17, 2016

Thanks.
I have switch to none all dispvm entries in qubes.xml
After reboot it is ok

On Mon, 17 Oct 2016, 08:37 Andrew David Wong, notifications@github.com
wrote:

@cyrinux https://github.com/cyrinux: Suppose the VM you want to remove
is a ProxyVM called sys-proxy. Suppose that you have an AppVM called
untrusted, and in the Advanced tab of the VM Settings for untrusted, you
have the following setting:

NetVM for DispVM: sys-proxy

You must change this from sys-proxy to some other entry in that list
before you can remove sys-proxy.


You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub
#2382 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAfrq9tXkGmPXKA-362Jr2aRdioe7yC6ks5q0xe3gaJpZM4KYFIR
.

cyrinux commented Oct 17, 2016

Thanks.
I have switch to none all dispvm entries in qubes.xml
After reboot it is ok

On Mon, 17 Oct 2016, 08:37 Andrew David Wong, notifications@github.com
wrote:

@cyrinux https://github.com/cyrinux: Suppose the VM you want to remove
is a ProxyVM called sys-proxy. Suppose that you have an AppVM called
untrusted, and in the Advanced tab of the VM Settings for untrusted, you
have the following setting:

NetVM for DispVM: sys-proxy

You must change this from sys-proxy to some other entry in that list
before you can remove sys-proxy.


You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub
#2382 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAfrq9tXkGmPXKA-362Jr2aRdioe7yC6ks5q0xe3gaJpZM4KYFIR
.

@andrewdavidwong andrewdavidwong changed the title from Can't delete AppVm/Template, error 38 to Improve error reporting when user attempts to remove a VM that is set as "NetVM for DispVM" for another VM Oct 18, 2016

@unman unman referenced this issue in QubesOS/qubes-core-admin Jan 6, 2017

Merged

Do the right thing on removal of proxyVM used as dispvm_netvm #86

@marmarta

This comment has been minimized.

Show comment
Hide comment
@marmarta

marmarta Jul 13, 2018

It looks like QubesOS/qubes-core-admin#86 is the correct fix - in the case described here instead of an error, the dispvm_netvm is correctly set to None and nothing painful happens. It looks like this one can be closed.

It looks like QubesOS/qubes-core-admin#86 is the correct fix - in the case described here instead of an error, the dispvm_netvm is correctly set to None and nothing painful happens. It looks like this one can be closed.

@marmarta marmarta closed this Jul 13, 2018

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