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

USBVMs based on fedora-23-minimal do not properly pass block devices #2018

Closed
andrewdavidwong opened this Issue May 23, 2016 · 9 comments

Comments

Projects
None yet
5 participants
@andrewdavidwong
Member

andrewdavidwong commented May 23, 2016

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

R3.1

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

fedora-23-minimal


Steps to reproduce the behavior:

  1. Create USBVM based on fedora-23-minimal.
  2. Create testvm based on fedora-23.
  3. Physically plug in USB drive.
  4. Use Qubes Manager to attach it to testvm.
  5. qvm-block -l claims it's attached to testvm as xvdi.
  6. Check testvm. There is no /dev/xvdi.

General notes:

Changing the USBVM from fedora-23-minimal to fedora-23 avoids the problem.

Thread: https://groups.google.com/d/msgid/qubes-users/5743431F.2060607%40vfemail.net

@entr0py

This comment has been minimized.

Show comment
Hide comment
@entr0py

entr0py May 25, 2016

Is it proper form to cross-post with qubes-users? or is one preferred over the other?

Marek Marczykowski-Górecki:

Check for other xvd* device (for example xvdj). Also you may try xl block-list, especially look at "state" column - should be "4". Normal
AppVM has 4 disks, so 5th should be your usb stick.

xl block-list shows it as state "3"! No sign of it using fdisk (no abnormal xvd*'s)

#Before attaching...
[user@dom0 ~]$ xl block-list appVM 
Vdev  BE  handle state evt-ch ring-ref BE-path                       
51712 0   7      4     17     8        /local/domain/0/backend/vbd/7/51712
51728 0   7      4     18     9        /local/domain/0/backend/vbd/7/51728
51744 0   7      4     19     10       /local/domain/0/backend/vbd/7/51744
51760 0   7      4     20     11       /local/domain/0/backend/vbd/7/51760

# After attaching...
[user@dom0 ~]$ xl block-list appVM
Vdev  BE  handle state evt-ch ring-ref BE-path                       
51712 0   7      4     17     8        /local/domain/0/backend/vbd/7/51712
51728 0   7      4     18     9        /local/domain/0/backend/vbd/7/51728
51744 0   7      4     19     10       /local/domain/0/backend/vbd/7/51744
51760 0   7      4     20     11       /local/domain/0/backend/vbd/7/51760
51840 3   7      3     25     868      /local/domain/3/backend/vbd/7/51840

entr0py commented May 25, 2016

Is it proper form to cross-post with qubes-users? or is one preferred over the other?

Marek Marczykowski-Górecki:

Check for other xvd* device (for example xvdj). Also you may try xl block-list, especially look at "state" column - should be "4". Normal
AppVM has 4 disks, so 5th should be your usb stick.

xl block-list shows it as state "3"! No sign of it using fdisk (no abnormal xvd*'s)

#Before attaching...
[user@dom0 ~]$ xl block-list appVM 
Vdev  BE  handle state evt-ch ring-ref BE-path                       
51712 0   7      4     17     8        /local/domain/0/backend/vbd/7/51712
51728 0   7      4     18     9        /local/domain/0/backend/vbd/7/51728
51744 0   7      4     19     10       /local/domain/0/backend/vbd/7/51744
51760 0   7      4     20     11       /local/domain/0/backend/vbd/7/51760

# After attaching...
[user@dom0 ~]$ xl block-list appVM
Vdev  BE  handle state evt-ch ring-ref BE-path                       
51712 0   7      4     17     8        /local/domain/0/backend/vbd/7/51712
51728 0   7      4     18     9        /local/domain/0/backend/vbd/7/51728
51744 0   7      4     19     10       /local/domain/0/backend/vbd/7/51744
51760 0   7      4     20     11       /local/domain/0/backend/vbd/7/51760
51840 3   7      3     25     868      /local/domain/3/backend/vbd/7/51840
@andrewdavidwong

This comment has been minimized.

Show comment
Hide comment
@andrewdavidwong

andrewdavidwong May 25, 2016

Member

Is it proper form to cross-post with qubes-users? or is one preferred over the other?

I think it's fine in this case. It depends on the situation.

Member

andrewdavidwong commented May 25, 2016

Is it proper form to cross-post with qubes-users? or is one preferred over the other?

I think it's fine in this case. It depends on the situation.

@entr0py

This comment has been minimized.

Show comment
Hide comment
@entr0py

entr0py Jun 4, 2016

XenbusStateInitialised = 3, /* Initialised and waiting for a connection from the peer. */

So I've been trying to troubleshoot this issue rather blindly... by comparing fedora-23 template to fedora-23-minimal template:

  1. checked qvm-prefs & *.conf files
  2. lsmod shows the same modules running on both systems
  3. Kernel configs (from /proc/config.gz) have identical checksums.
  4. dnf list installed *guess* in both systems to see which packages are missing. Installing missing packages in the minimal template and rebooting have not resolved. "guess" includes, xen, qubes, qvm, bus, virt, virsh, usb, blk, block, qxl, qemu, whatever else I could think of... qubes-template-minimal-stub.spec complicates this but don't see any obvious candidates in there that might resolve this.

Can anyone point me in some kind of direction? Thanks!

entr0py commented Jun 4, 2016

XenbusStateInitialised = 3, /* Initialised and waiting for a connection from the peer. */

So I've been trying to troubleshoot this issue rather blindly... by comparing fedora-23 template to fedora-23-minimal template:

  1. checked qvm-prefs & *.conf files
  2. lsmod shows the same modules running on both systems
  3. Kernel configs (from /proc/config.gz) have identical checksums.
  4. dnf list installed *guess* in both systems to see which packages are missing. Installing missing packages in the minimal template and rebooting have not resolved. "guess" includes, xen, qubes, qvm, bus, virt, virsh, usb, blk, block, qxl, qemu, whatever else I could think of... qubes-template-minimal-stub.spec complicates this but don't see any obvious candidates in there that might resolve this.

Can anyone point me in some kind of direction? Thanks!

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Jun 4, 2016

Member

Take a look at /var/log/xen/xen-hotplug.log - maybe there you'll find something helpful.

Member

marmarek commented Jun 4, 2016

Take a look at /var/log/xen/xen-hotplug.log - maybe there you'll find something helpful.

@entr0py

This comment has been minimized.

Show comment
Hide comment
@entr0py

entr0py Jun 4, 2016

Thank you!

SOLVED! fedora-23-minimal template requires perl to be installed in order to function as a usbVM.

sigh... could live another lifetime with all the hours wasted from not knowing where to look :)

entr0py commented Jun 4, 2016

Thank you!

SOLVED! fedora-23-minimal template requires perl to be installed in order to function as a usbVM.

sigh... could live another lifetime with all the hours wasted from not knowing where to look :)

@andrewdavidwong

This comment has been minimized.

Show comment
Hide comment
@andrewdavidwong

andrewdavidwong Jun 4, 2016

Member

@marmarek, do you want to include perl in fedora-*-minimal templates by default, or instead note in the documentation that the user must install perl in order to use a fedora-*-minimal-based VM as a USB VM?

Member

andrewdavidwong commented Jun 4, 2016

@marmarek, do you want to include perl in fedora-*-minimal templates by default, or instead note in the documentation that the user must install perl in order to use a fedora-*-minimal-based VM as a USB VM?

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Jun 5, 2016

Member

If possible, I'd like to not depend on perl for USBVM. But if not, add a documentation about this requirement. It looks like the only perl usage there is in locking mechanism.
I think the whole locking in this script isn't really needed in USBVM (but it is in dom0, and it is the same script). Will think of something...

Member

marmarek commented Jun 5, 2016

If possible, I'd like to not depend on perl for USBVM. But if not, add a documentation about this requirement. It looks like the only perl usage there is in locking mechanism.
I think the whole locking in this script isn't really needed in USBVM (but it is in dom0, and it is the same script). Will think of something...

@ptitdoc

This comment has been minimized.

Show comment
Hide comment
@ptitdoc

ptitdoc Jun 6, 2016

I will also take a look at it in order to add it as a (optional?) dependency in archlinux.

ptitdoc commented Jun 6, 2016

I will also take a look at it in order to add it as a (optional?) dependency in archlinux.

@unman

This comment has been minimized.

Show comment
Hide comment
@unman

unman Apr 14, 2017

Member

@andrewdavidwong Fedora 23 is eol, and the issue doesn't arise with Fedora24-minimal on r3.2, so I believe this can now be closed.

Member

unman commented Apr 14, 2017

@andrewdavidwong Fedora 23 is eol, and the issue doesn't arise with Fedora24-minimal on r3.2, so I believe this can now be closed.

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