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

running DispVMs fails from both dom0 and #3057

Closed
artemist opened this Issue Aug 28, 2017 · 4 comments

Comments

Projects
None yet
3 participants
@artemist

artemist commented Aug 28, 2017

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

R4.0-rc1

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

all + dom0


Expected behavior:

Running qvm-run --dispvm -- firefox or qvm-run-vm --dispvm -- firefox creates a new DispVM

Actual behavior:

The request fails with Request Refused in an AppVM and Got empty response from qubesd in dom0. In both cases, similar error messages appear in the systemd journal

Steps to reproduce the behavior:

See above

General notes:

The error message in the systemd journal is as follows:

Aug 28 19:45:23 dom0 qubesd[7511]: unhandled exception while calling src=b'dom0' meth=b'admin.vm.CreateDisposable' dest=b'dom0' arg=b'' len(untrusted_payload)=0
Aug 28 19:45:23 dom0 qubesd[7511]: Traceback (most recent call last):
Aug 28 19:45:23 dom0 qubesd[7511]:   File "/usr/lib/python3.5/site-packages/qubes/__init__.py", line 222, in __get__
Aug 28 19:45:23 dom0 qubesd[7511]:     return getattr(instance, self._attr_name)
Aug 28 19:45:23 dom0 qubesd[7511]: AttributeError: 'DispVM' object has no attribute '_qubesprop_uuid'
Aug 28 19:45:23 dom0 qubesd[7511]: During handling of the above exception, another exception occurred:
Aug 28 19:45:23 dom0 qubesd[7511]: Traceback (most recent call last):
Aug 28 19:45:23 dom0 qubesd[7511]:   File "/usr/lib/python3.5/site-packages/qubes/api/__init__.py", line 262, in respond
Aug 28 19:45:23 dom0 qubesd[7511]:     untrusted_payload=untrusted_payload)
Aug 28 19:45:23 dom0 qubesd[7511]:   File "/usr/lib64/python3.5/asyncio/futures.py", line 380, in __iter__
Aug 28 19:45:23 dom0 qubesd[7511]:     yield self  # This tells Task to wait for completion.
Aug 28 19:45:23 dom0 qubesd[7511]:   File "/usr/lib64/python3.5/asyncio/tasks.py", line 304, in _wakeup
Aug 28 19:45:23 dom0 qubesd[7511]:     future.result()
Aug 28 19:45:23 dom0 qubesd[7511]:   File "/usr/lib64/python3.5/asyncio/futures.py", line 293, in result
Aug 28 19:45:23 dom0 qubesd[7511]:     raise self._exception
Aug 28 19:45:23 dom0 qubesd[7511]:   File "/usr/lib64/python3.5/asyncio/tasks.py", line 239, in _step
Aug 28 19:45:23 dom0 qubesd[7511]:     result = coro.send(None)
Aug 28 19:45:23 dom0 qubesd[7511]:   File "/usr/lib/python3.5/site-packages/qubes/api/admin.py", line 931, in create_disposable
Aug 28 19:45:23 dom0 qubesd[7511]:     dispvm = yield from qubes.vm.dispvm.DispVM.from_appvm(dispvm_template)
Aug 28 19:45:23 dom0 qubesd[7511]:   File "/usr/lib/python3.5/site-packages/qubes/vm/dispvm.py", line 170, in from_appvm
Aug 28 19:45:23 dom0 qubesd[7511]:     **kwargs)
Aug 28 19:45:23 dom0 qubesd[7511]:   File "/usr/lib/python3.5/site-packages/qubes/app.py", line 1051, in add_new_vm
Aug 28 19:45:23 dom0 qubesd[7511]:     return self.domains.add(cls(self, None, qid=qid, **kwargs))
Aug 28 19:45:23 dom0 qubesd[7511]:   File "/usr/lib/python3.5/site-packages/qubes/vm/dispvm.py", line 108, in __init__
Aug 28 19:45:23 dom0 qubesd[7511]:     super(DispVM, self).__init__(app, xml, *args, **kwargs)
Aug 28 19:45:23 dom0 qubesd[7511]:   File "/usr/lib/python3.5/site-packages/qubes/vm/qubesvm.py", line 645, in __init__
Aug 28 19:45:23 dom0 qubesd[7511]:     super(QubesVM, self).__init__(app, xml, **kwargs)
Aug 28 19:45:23 dom0 qubesd[7511]:   File "/usr/lib/python3.5/site-packages/qubes/vm/mix/net.py", line 189, in __init__
Aug 28 19:45:23 dom0 qubesd[7511]:     super(NetVMMixin, self).__init__(*args, **kwargs)
Aug 28 19:45:23 dom0 qubesd[7511]:   File "/usr/lib/python3.5/site-packages/qubes/vm/__init__.py", line 276, in __init__
Aug 28 19:45:23 dom0 qubesd[7511]:     super(BaseVM, self).__init__(xml, **kwargs)
Aug 28 19:45:23 dom0 qubesd[7511]:   File "/usr/lib/python3.5/site-packages/qubes/__init__.py", line 500, in __init__
Aug 28 19:45:23 dom0 qubesd[7511]:     setattr(self, key, value)
Aug 28 19:45:23 dom0 qubesd[7511]:   File "/usr/lib/python3.5/site-packages/qubes/vm/__init__.py", line 503, in __set__
Aug 28 19:45:23 dom0 qubesd[7511]:     super(VMProperty, self).__set__(instance, vm)
Aug 28 19:45:23 dom0 qubesd[7511]:   File "/usr/lib/python3.5/site-packages/qubes/__init__.py", line 248, in __set__
Aug 28 19:45:23 dom0 qubesd[7511]:     value = self._setter(instance, self, value)
Aug 28 19:45:23 dom0 qubesd[7511]:   File "/usr/lib/python3.5/site-packages/qubes/vm/mix/net.py", line 75, in _setter_netvm
Aug 28 19:45:23 dom0 qubesd[7511]:     or value in self.app.domains.get_vms_connected_to(self):
Aug 28 19:45:23 dom0 qubesd[7511]:   File "/usr/lib/python3.5/site-packages/qubes/app.py", line 523, in get_vms_connected_to
Aug 28 19:45:23 dom0 qubesd[7511]:     new_vms = set([self[netvm]])
Aug 28 19:45:23 dom0 qubesd[7511]:   File "/usr/lib/python3.5/site-packages/qubes/app.py", line 483, in __getitem__
Aug 28 19:45:23 dom0 qubesd[7511]:     key = key.uuid
Aug 28 19:45:23 dom0 qubesd[7511]:   File "/usr/lib/python3.5/site-packages/qubes/__init__.py", line 227, in __get__
Aug 28 19:45:23 dom0 qubesd[7511]:     'property {!r} not set'.format(self.__name__))
Aug 28 19:45:23 dom0 qubesd[7511]: AttributeError: property 'uuid' not set
Aug 28 19:45:23 dom0 qubesd[7511]: unhandled exception while calling src=b'dom0' meth=b'admin.vm.Kill' dest=b'$dispvm' arg=b'' len(untrusted_payload)=0
Aug 28 19:45:23 dom0 qubesd[7511]: Traceback (most recent call last):
Aug 28 19:45:23 dom0 qubesd[7511]:   File "/usr/lib/python3.5/site-packages/qubes/api/__init__.py", line 260, in respond
Aug 28 19:45:23 dom0 qubesd[7511]:     self.send_event)
Aug 28 19:45:23 dom0 qubesd[7511]:   File "/usr/lib/python3.5/site-packages/qubes/api/__init__.py", line 127, in __init__
Aug 28 19:45:23 dom0 qubesd[7511]:     self.dest = self.app.domains[dest.decode('ascii')]
Aug 28 19:45:23 dom0 qubesd[7511]:   File "/usr/lib/python3.5/site-packages/qubes/app.py", line 480, in __getitem__
Aug 28 19:45:23 dom0 qubesd[7511]:     raise KeyError(key)
Aug 28 19:45:23 dom0 qubesd[7511]: KeyError: '$dispvm'

Related issues:

#3012 and #3013 are both errors with DispVM creation, but appear to have different root causes. I have not found
any issues that deal with this exact problem.

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Aug 29, 2017

Member

What version of qubes-core-dom0 do you have? What is default DispVM set (qubes-prefs default_dispvm)?

Member

marmarek commented Aug 29, 2017

What version of qubes-core-dom0 do you have? What is default DispVM set (qubes-prefs default_dispvm)?

@marmarek marmarek added this to the Release 4.0 milestone Aug 29, 2017

@artemist

This comment has been minimized.

Show comment
Hide comment
@artemist

artemist Aug 29, 2017

I am running qubes-core-dom0 version 4.0.6, although this bug has appeared in earlier versions. The default dispvm is fedora-25-dvm, which was automatically created during restore. I have verified that dispvm_allowed is set to True for fedora-25-dvm in /var/lib/qubes/qubes.xml. I have not modified the policy files.

I am running qubes-core-dom0 version 4.0.6, although this bug has appeared in earlier versions. The default dispvm is fedora-25-dvm, which was automatically created during restore. I have verified that dispvm_allowed is set to True for fedora-25-dvm in /var/lib/qubes/qubes.xml. I have not modified the policy files.

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

dispvm: fix setting up new DispVM
Clone properties from DispVM template after setting base properties
(qid, name, uuid). This means we can use standard clone_properties()
function. Otherwise various setters may fail - for example
netvm setter require uuid property initialized (for VM lookup in VM
collection).
Also, make dispvm_allowed check more robust - include direct creation of
DispVM, and also check just before VM startup (if property was changed
in the meantime).

Fixes QubesOS/qubes-issues#3057

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

dispvm: fix setting up new DispVM
Clone properties from DispVM template after setting base properties
(qid, name, uuid). This means we can use standard clone_properties()
function. Otherwise various setters may fail - for example
netvm setter require uuid property initialized (for VM lookup in VM
collection).
Also, make dispvm_allowed check more robust - include direct creation of
DispVM, and also check just before VM startup (if property was changed
in the meantime).

Fixes QubesOS/qubes-issues#3057

@marmarek marmarek referenced this issue in QubesOS/qubes-core-admin Sep 5, 2017

Merged

Policy related changed for DispVM #148

@qubesos-bot

This comment has been minimized.

Show comment
Hide comment
@qubesos-bot

qubesos-bot Sep 14, 2017

Automated announcement from builder-github

The package qubes-core-dom0-4.0.7-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 qubes-core-dom0-4.0.7-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 Sep 14, 2017

Closed

core-admin v4.0.7 (r4.0) #204

@qubesos-bot

This comment has been minimized.

Show comment
Hide comment
@qubesos-bot

qubesos-bot Oct 30, 2017

Automated announcement from builder-github

The package qubes-core-dom0-4.0.11-1.fc25 has been pushed to the r4.0 stable repository for dom0.
To install this update, please use the standard update command:

sudo qubes-dom0-update

Or update dom0 via Qubes Manager.

Changes included in this update

Automated announcement from builder-github

The package qubes-core-dom0-4.0.11-1.fc25 has been pushed to the r4.0 stable repository for dom0.
To install this update, please use the standard update command:

sudo qubes-dom0-update

Or update dom0 via Qubes Manager.

Changes included in this update

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