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-create --class DispVM throws exception in qubesd #3341

Closed
zander opened this Issue Nov 27, 2017 · 4 comments

Comments

Projects
None yet
6 participants
@zander

zander commented Nov 27, 2017

Qubes OS version:

4RC2, updated to latest 'current'. So likely RC3.

Steps to reproduce the behavior:

I build my own archlinux template which works great and I have some AppVMs based on it.

As this actually includes KDE, I want it to be the basis of my DispVM.

As such I found that qvm-create has a list of classes, one of them is 'DispVM'.
So I ran;

qvm-create --class DispVM --template archlinux --label red DispArch

Expected behavior:

I expected to get a VM that would be used as a template for disposable VMs.

Actual behavior:

qvm-create came back with a hint to look in the journal.

The output follows;

Nov 27 18:55:48 dom0 qubesd[2760]: unhandled exception while calling src=b'dom0' meth=b'admin.vm.Create.DispVM' dest=b'dom0' arg=b'archlinux' len(untrusted_payload)=23
Nov 27 18:55:48 dom0 qubesd[2760]: Traceback (most recent call last):
Nov 27 18:55:48 dom0 qubesd[2760]:   File "/usr/lib/python3.5/site-packages/qubes/api/__init__.py", line 262, in respond
Nov 27 18:55:48 dom0 qubesd[2760]:     untrusted_payload=untrusted_payload)
Nov 27 18:55:48 dom0 qubesd[2760]:   File "/usr/lib64/python3.5/asyncio/futures.py", line 381, in __iter__
Nov 27 18:55:48 dom0 qubesd[2760]:     yield self  # This tells Task to wait for completion.
Nov 27 18:55:48 dom0 qubesd[2760]:   File "/usr/lib64/python3.5/asyncio/tasks.py", line 310, in _wakeup
Nov 27 18:55:48 dom0 qubesd[2760]:     future.result()
Nov 27 18:55:48 dom0 qubesd[2760]:   File "/usr/lib64/python3.5/asyncio/futures.py", line 294, in result
Nov 27 18:55:48 dom0 qubesd[2760]:     raise self._exception
Nov 27 18:55:48 dom0 qubesd[2760]:   File "/usr/lib64/python3.5/asyncio/tasks.py", line 240, in _step
Nov 27 18:55:48 dom0 qubesd[2760]:     result = coro.send(None)
Nov 27 18:55:48 dom0 qubesd[2760]:   File "/usr/lib64/python3.5/asyncio/coroutines.py", line 213, in coro
Nov 27 18:55:48 dom0 qubesd[2760]:     res = yield from res
Nov 27 18:55:48 dom0 qubesd[2760]:   File "/usr/lib/python3.5/site-packages/qubes/api/admin.py", line 1000, in _vm_create
Nov 27 18:55:48 dom0 qubesd[2760]:     vm = self.app.add_new_vm(vm_class, **kwargs)
Nov 27 18:55:48 dom0 qubesd[2760]:   File "/usr/lib/python3.5/site-packages/qubes/app.py", line 1081, in add_new_vm
Nov 27 18:55:48 dom0 qubesd[2760]:     return self.domains.add(cls(self, None, qid=qid, **kwargs))
Nov 27 18:55:48 dom0 qubesd[2760]:   File "/usr/lib/python3.5/site-packages/qubes/vm/dispvm.py", line 81, in __init__
Nov 27 18:55:48 dom0 qubesd[2760]:     if not template.template_for_dispvms:
Nov 27 18:55:48 dom0 qubesd[2760]: AttributeError: 'TemplateVM' object has no attribute 'template_for_dispvms'

Related issues:

#3047

@rustybird

This comment has been minimized.

Show comment
Hide comment
@rustybird

rustybird Jan 4, 2018

qvm-create --class DispVM --template archlinux --label red DispArch

I expected to get a VM that would be used as a template for disposable VMs.

Use --property template_for_dispvms=True instead of --class DispVM.

qvm-create --class DispVM --template archlinux --label red DispArch

I expected to get a VM that would be used as a template for disposable VMs.

Use --property template_for_dispvms=True instead of --class DispVM.

@arjan-s

This comment has been minimized.

Show comment
Hide comment
@arjan-s

arjan-s Jan 18, 2018

Creating a VM with that property does work. It also is possible to run for instance qvm-run --dispvm=arch-dvm --service qubes.StartApp+firefox.
What doesn't work is registering the new DispVM in the Qubes interface.
The menu options created for the new DispVM start the applications in the AppVM/template, not in a newly created DispVM. I can fix this manually by running qvm-features arch-dvm appmenus-dispvm true and then selecting the applications I want in the menu.
Also, it's not possible to choose the new DispVM as default DispVM in the configuration dialog of other AppVM's. I don't know how to fix this yet.

arjan-s commented Jan 18, 2018

Creating a VM with that property does work. It also is possible to run for instance qvm-run --dispvm=arch-dvm --service qubes.StartApp+firefox.
What doesn't work is registering the new DispVM in the Qubes interface.
The menu options created for the new DispVM start the applications in the AppVM/template, not in a newly created DispVM. I can fix this manually by running qvm-features arch-dvm appmenus-dispvm true and then selecting the applications I want in the menu.
Also, it's not possible to choose the new DispVM as default DispVM in the configuration dialog of other AppVM's. I don't know how to fix this yet.

@qubesos-bot

This comment has been minimized.

Show comment
Hide comment
@qubesos-bot

qubesos-bot Mar 29, 2018

Automated announcement from builder-github

The package qubes-core-dom0-4.0.25-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.25-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 Mar 29, 2018

Closed

core-admin v4.0.25 (r4.0) #469

@qubesos-bot

This comment has been minimized.

Show comment
Hide comment
@qubesos-bot

qubesos-bot May 14, 2018

Automated announcement from builder-github

The package qubes-core-dom0-4.0.27-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.27-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