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

VMs not created post-install; can't start qubesd.service #3431

Open
matthazinski opened this Issue Dec 27, 2017 · 2 comments

Comments

Projects
None yet
4 participants
@matthazinski

matthazinski commented Dec 27, 2017

Qubes OS version:

Qubes-R4.0-rc3.x86_64.iso, fresh install

Affected TemplateVMs:

Not applicable


Steps to reproduce the behavior:

Perform a fresh install of 4.0RC3 on a Macbook Pro 11,4 following the instructions in the Mac troubleshooting guide (substituting the current kernel version). After rebooting into the Qubes first-run wizard, select the default VMs suggested.

Expected behavior:

Qubes VMs should be created

Actual behavior:

An error message is displayed in the GUI from calling /usr/bin/qubes-prefs default-kernel 4.9.56-21 due to QUBESD_SOCKET (/var/run/qubesd.sock) not existing. Attempting to launch "Qubes Global Setings" gives the same FileNotFoundError on line 464 of app.py.

systemctl status qubesd.service shows qubesd failed to start. Attempting to start it manually gives the error xen.lowlevel.xs.xs.Error: (2, 'No such file or directory') from line 178 of /usr/lib/python3.5/site-packages/qubes/app.py.

/var/log/salt/minion shows:

2017-12-26 23:28:11,549 [salt.pillar      ][CRITICAL] Specified ext_pillar interface qvm_prefs is unavailable
2017-12-26 23:28:13,791 [salt.pillar      ][CRITICAL] Specified ext_pillar interface qvm_prefs is unavailable
2017-12-26 23:28:19,124 [salt.pillar      ][ERROR   ] Execption caught loading ext_pillar 'qvm_prefs':
  File "/usr/lib/python2.7/site-packages/salt/pillar/__init__.py", line 822, in ext_pillar
    key)
  File "/usr/lib/python2.7/site-packages/salt/pillar/__init__.py", line 756, in _external_pillar_data
    *val)
  File "/var/cache/salt/minion/extmods/pillar/qvm_prefs.py", line 39, in ext_pillar
    vm = app.domains[minion_id]
  File "/usr/lib/python2.7/site-packages/qubesadmin/app.py", line 85, in __getitem__
    if not self.app.blind_mode and item not in self:
  File "/usr/lib/python2.7/site-packages/qubesadmin/app.py", line 99, in __contains__
    self.refresh_cache()
  File "/usr/lib/python2.7/site-packages/qubesadmin/app.py", line 59, in refresh_cache
    'admin.vm.List'
  File "/usr/lib/python2.7/site-packages/qubesadmin/app.py", line 464, in qubesd_call
    client_socket.connect(qubesadmin.config.QUBESD_SOCKET)
  File "/usr/lib64/python2.7/socket.py", line 228, in meth
    return getattr(self._sock,name)(*args)

2017-12-26 23:28:19,124 [salt.pillar      ][CRITICAL] Pillar render error: Failed to load ext_pillar qvm_prefs: [Errno 2] No such file or directory
2017-12-26 23:28:21,342 [salt.pillar      ][CRITICAL] Specified ext_pillar interface qvm_prefs is unavailable
2017-12-26 23:28:26,681 [salt.pillar      ][ERROR   ] Execption caught loading ext_pillar 'qvm_prefs':
  File "/usr/lib/python2.7/site-packages/salt/pillar/__init__.py", line 822, in ext_pillar
    key)
  File "/usr/lib/python2.7/site-packages/salt/pillar/__init__.py", line 756, in _external_pillar_data
    *val)
  File "/var/cache/salt/minion/extmods/pillar/qvm_prefs.py", line 39, in ext_pillar
    vm = app.domains[minion_id]
  File "/usr/lib/python2.7/site-packages/qubesadmin/app.py", line 85, in __getitem__
    if not self.app.blind_mode and item not in self:
  File "/usr/lib/python2.7/site-packages/qubesadmin/app.py", line 99, in __contains__
    self.refresh_cache()
  File "/usr/lib/python2.7/site-packages/qubesadmin/app.py", line 59, in refresh_cache
    'admin.vm.List'
  File "/usr/lib/python2.7/site-packages/qubesadmin/app.py", line 464, in qubesd_call
    client_socket.connect(qubesadmin.config.QUBESD_SOCKET)
  File "/usr/lib64/python2.7/socket.py", line 228, in meth
    return getattr(self._sock,name)(*args)

2017-12-26 23:28:26,681 [salt.pillar      ][CRITICAL] Pillar render error: Failed to load ext_pillar qvm_prefs: [Errno 2] No such file or directory
2017-12-26 23:28:28,898 [salt.pillar      ][CRITICAL] Specified ext_pillar interface qvm_prefs is unavailable
2017-12-26 23:28:34,168 [salt.pillar      ][ERROR   ] Execption caught loading ext_pillar 'qvm_prefs':
  File "/usr/lib/python2.7/site-packages/salt/pillar/__init__.py", line 822, in ext_pillar
    key)
  File "/usr/lib/python2.7/site-packages/salt/pillar/__init__.py", line 756, in _external_pillar_data
    *val)
  File "/var/cache/salt/minion/extmods/pillar/qvm_prefs.py", line 39, in ext_pillar
    vm = app.domains[minion_id]
  File "/usr/lib/python2.7/site-packages/qubesadmin/app.py", line 85, in __getitem__
    if not self.app.blind_mode and item not in self:
  File "/usr/lib/python2.7/site-packages/qubesadmin/app.py", line 99, in __contains__
    self.refresh_cache()
  File "/usr/lib/python2.7/site-packages/qubesadmin/app.py", line 59, in refresh_cache
    'admin.vm.List'
  File "/usr/lib/python2.7/site-packages/qubesadmin/app.py", line 464, in qubesd_call
    client_socket.connect(qubesadmin.config.QUBESD_SOCKET)
  File "/usr/lib64/python2.7/socket.py", line 228, in meth
    return getattr(self._sock,name)(*args)

2017-12-26 23:28:34,168 [salt.pillar      ][CRITICAL] Pillar render error: Failed to load ext_pillar qvm_prefs: [Errno 2] No such file or directory

General notes:

This machine had some difficulty booting Qubes and the grub config may have some errors. I'm not sure if this would affect anything post-boot.


Related issues:

  • #2213 has a similar symptom of no configured VMs post-install, but on R3.2
  • #2902 has similar salt error messages

@matthazinski matthazinski changed the title from FileNotFoundError on QUBESD_SOCKET on fresh install of 4.0RC3 to VMs not created post-install; can't start qubesd.service Dec 27, 2017

@andrewdavidwong andrewdavidwong added this to the Release 4.0 milestone Dec 28, 2017

@jayarjo

This comment has been minimized.

Show comment
Hide comment
@jayarjo

jayarjo Jan 23, 2018

In my case /var/run/qubesd.sock doesn't exist either. Not sure how this could happen. I've restarted Qubes and after restart VMs stopped starting. Can I easily recereate that file? I tried touch /var/run/qubesd.sock with appropriate permissions, but qvm scripts still fail with Connection refused Error 111.

Any kind of quick solution to this?

jayarjo commented Jan 23, 2018

In my case /var/run/qubesd.sock doesn't exist either. Not sure how this could happen. I've restarted Qubes and after restart VMs stopped starting. Can I easily recereate that file? I tried touch /var/run/qubesd.sock with appropriate permissions, but qvm scripts still fail with Connection refused Error 111.

Any kind of quick solution to this?

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Jan 23, 2018

Member

This machine had some difficulty booting Qubes and the grub config may have some errors. I'm not sure if this would affect anything post-boot.

It looks like you're booting Linux directly, without Xen. See here for fixing bootloader: https://www.qubes-os.org/doc/macbook-troubleshooting/

In my case /var/run/qubesd.sock doesn't exist either. Not sure how this could happen. I've restarted Qubes and after restart VMs stopped starting.

See status of qubesd service (systemctl status qubesd). Restart it if necessary. If you get similar error like xen.lowlevel.xs.xs.Error: (2, 'No such file or directory'), the problem is the same - you run just Linux, without Xen. You need to fix grub (or EFI) configuration.

Example minimal grub.cfg snippet (normally generated automatically):

menuentry 'Qubes, with Xen hypervisor' {
	set root='hd0,msdos1'
	echo	'Loading Xen 4.6.6 ...'
	multiboot	/xen-4.6.6.gz placeholder dom0_mem=min:1024M dom0_mem=max:4096M
	echo	'Loading Linux 4.9.56-21.pvops.qubes.x86_64 ...'
	module	/vmlinuz-4.9.56-21.pvops.qubes.x86_64 placeholder root=/dev/mapper/qubes_dom0-root ro rd.luks.uuid=luks-UUID rd.lvm.lv=qubes_dom0/root
	echo	'Loading initial ramdisk ...'
	module	--nounzip   /initramfs-4.9.56-21.pvops.qubes.x86_64.img
}

(UUID needs to be replaced with actual UUID of luks volume; you can get it for example with lsblk command)

Member

marmarek commented Jan 23, 2018

This machine had some difficulty booting Qubes and the grub config may have some errors. I'm not sure if this would affect anything post-boot.

It looks like you're booting Linux directly, without Xen. See here for fixing bootloader: https://www.qubes-os.org/doc/macbook-troubleshooting/

In my case /var/run/qubesd.sock doesn't exist either. Not sure how this could happen. I've restarted Qubes and after restart VMs stopped starting.

See status of qubesd service (systemctl status qubesd). Restart it if necessary. If you get similar error like xen.lowlevel.xs.xs.Error: (2, 'No such file or directory'), the problem is the same - you run just Linux, without Xen. You need to fix grub (or EFI) configuration.

Example minimal grub.cfg snippet (normally generated automatically):

menuentry 'Qubes, with Xen hypervisor' {
	set root='hd0,msdos1'
	echo	'Loading Xen 4.6.6 ...'
	multiboot	/xen-4.6.6.gz placeholder dom0_mem=min:1024M dom0_mem=max:4096M
	echo	'Loading Linux 4.9.56-21.pvops.qubes.x86_64 ...'
	module	/vmlinuz-4.9.56-21.pvops.qubes.x86_64 placeholder root=/dev/mapper/qubes_dom0-root ro rd.luks.uuid=luks-UUID rd.lvm.lv=qubes_dom0/root
	echo	'Loading initial ramdisk ...'
	module	--nounzip   /initramfs-4.9.56-21.pvops.qubes.x86_64.img
}

(UUID needs to be replaced with actual UUID of luks volume; you can get it for example with lsblk command)

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