Re: [qubes-users] qvm-block doesn't list/expose dom0 loop devices
On 09/10/2017 05:44 PM, nicholas roveda wrote: `qvm-block` lists all vms loop device, but no the dom0 ones. I've checked with `udevadm info -q all` and I've noticed loop devices don't have the 'QUBES_EXPOSED' property. Can you try to reproduce my situation and show me your `udevadm` output for your loop device? Thanks a lot. Yes, qvm-block currently doesn't work with dom0 loop devices. Tracked here: https://github.com/QubesOS/qubes-issues/issues/3084 -- You received this message because you are subscribed to the Google Groups "qubes-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to qubes-users+unsubscr...@googlegroups.com. To post to this group, send email to qubes-users@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/qubes-users/747321a8-bb55-b81d-026c-d403c25e0f21%40hackingthe.net. For more options, visit https://groups.google.com/d/optout. smime.p7s Description: S/MIME Cryptographic Signature
Re: [qubes-users] qvm-block doesn't list/expose dom0 loop devices
`qvm-block` lists all vms loop device, but no the dom0 ones. I've checked with `udevadm info -q all` and I've noticed loop devices don't have the 'QUBES_EXPOSED' property. Can you try to reproduce my situation and show me your `udevadm` output for your loop device? Thanks a lot. -- You received this message because you are subscribed to the Google Groups "qubes-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to qubes-users+unsubscr...@googlegroups.com. To post to this group, send email to qubes-users@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/qubes-users/629fcf29-a9df-4dc6-a30d-a3f4c3d1a280%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [qubes-users] qvm-block doesn't list/expose dom0 loop devices
On 09/01/2017 05:13 PM, Unman wrote: On Tue, Aug 29, 2017 at 04:08:38PM -0700, nicholas roveda wrote: I'm using R4.0 rc1. I wanted to install a Linux distro inside a disk image located in dom0 home, using QEMU in an AppVM. I've created a new disk image in dom0, set it up (dos partition label and a primary ext4 partition) and attached it with `kpartx` to loopX, but `qvm-block` doesn't list it in the exposed block devices. So, in order to understand better how Qubes handles this, I've tried to do the same in a VM and see if the dom0 would catch the event, but nothing. Strangely, when I detached the disk image, both the 'AppVM:loopX - IMG_PATH is available' and 'AppVM:loopX - IMG_PATH is removed' notifications appeared on the screen. I've read a lot about it, but I think what I found was all related to a < R4.0 version, so I don't know if this issue is related to a intended design or a bug. Procedure: [user@dom0 ~]$ dd if=/dev/zero of=/home/user/table.raw bs=2048 count=1 [user@dom0 ~]$ dd if=/dev/zero of=/home/user/root.raw bs=3GB count=1 [user@dom0 ~]$ mkfs.ext4 /home/user/root.raw [user@dom0 ~]$ cat /home/user/{table,root}.raw > /home/user/root.img [user@dom0 ~]$ rm /home/user/{table,root}.raw [user@dom0 ~]$ truncate -s 3GB /home/user/root.img [user@dom0 ~]$ fdisk /home/user/root.img o new DOS partition table n new partition p primary 1 first 2048 first sector \n to the end [user@dom0 ~] fdisk -l /home/user/root.img Disk /home/user/root.img: 2.8 GiB, 30 bytes, 5859375 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0xda159b44 Device Boot Start End Sectors Size Id Type root.img12048 5859374 5857327 2.8G 83 Linux [user@dom0 ~] sudo kpartx -a /home/user/root.img [user@dom0 ~] losetup -l NAMESIZELIMIT OFFSET AUTOCLEAR RO BACK-FILE DIO /dev/loop40 0 0 0 0 /home/user/root.img 0 [user@dom0 ~] ls /dev/mapper control loop40p1 ... I'm not surprised at this. Can you use qvm-block -A to attach a file? Wouldnt that be easier for you? -A is 3.2 notation and the file support was removed in 4.0rc1 I believe (it was less reliable than loop devices in 3.2 already anyway). I don't know what the problem is though: qvm-block l lists everything in 4.0rc1 that is attached to some VM (recently tested exactly that by chance) - including loop devices. Just do this in dom0: losetup --show -f [file] qvm-block a [VM] dom0:loop[i] qvm-block l Maybe you're also running at an older version than me though; I did one testing-repo-upgrade in dom0 & fedora template VM recently. -- You received this message because you are subscribed to the Google Groups "qubes-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to qubes-users+unsubscr...@googlegroups.com. To post to this group, send email to qubes-users@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/qubes-users/05249217-7491-c6ee-4450-2e623bf7b230%40hackingthe.net. For more options, visit https://groups.google.com/d/optout. smime.p7s Description: S/MIME Cryptographic Signature
Re: [qubes-users] qvm-block doesn't list/expose dom0 loop devices
On Tue, Aug 29, 2017 at 04:08:38PM -0700, nicholas roveda wrote: > I'm using R4.0 rc1. > > I wanted to install a Linux distro inside a disk image located in dom0 home, > using QEMU in an AppVM. > > I've created a new disk image in dom0, set it up (dos partition label and a > primary ext4 partition) and attached it with `kpartx` to loopX, but > `qvm-block` doesn't list it in the exposed block devices. > > So, in order to understand better how Qubes handles this, I've tried to do > the same in a VM and see if the dom0 would catch the event, but nothing. > Strangely, when I detached the disk image, both the 'AppVM:loopX - IMG_PATH > is available' and 'AppVM:loopX - IMG_PATH is removed' notifications appeared > on the screen. > > I've read a lot about it, but I think what I found was all related to a < > R4.0 version, so I don't know if this issue is related to a intended design > or a bug. > > > > Procedure: > [user@dom0 ~]$ dd if=/dev/zero of=/home/user/table.raw bs=2048 count=1 > [user@dom0 ~]$ dd if=/dev/zero of=/home/user/root.raw bs=3GB count=1 > [user@dom0 ~]$ mkfs.ext4 /home/user/root.raw > [user@dom0 ~]$ cat /home/user/{table,root}.raw > /home/user/root.img > [user@dom0 ~]$ rm /home/user/{table,root}.raw > [user@dom0 ~]$ truncate -s 3GB /home/user/root.img > [user@dom0 ~]$ fdisk /home/user/root.img >o new DOS partition table >n new partition >p primary >1 first >2048 first sector >\n to the end > [user@dom0 ~] fdisk -l /home/user/root.img > Disk /home/user/root.img: 2.8 GiB, 30 bytes, 5859375 sectors > Units: sectors of 1 * 512 = 512 bytes > Sector size (logical/physical): 512 bytes / 512 bytes > I/O size (minimum/optimal): 512 bytes / 512 bytes > Disklabel type: dos > Disk identifier: 0xda159b44 > > Device Boot Start End Sectors Size Id Type > root.img12048 5859374 5857327 2.8G 83 Linux > > [user@dom0 ~] sudo kpartx -a /home/user/root.img > [user@dom0 ~] losetup -l > NAMESIZELIMIT OFFSET AUTOCLEAR RO BACK-FILE > DIO > /dev/loop40 0 0 0 0 /home/user/root.img > 0 > [user@dom0 ~] ls /dev/mapper > control loop40p1 ... > I'm not surprised at this. Can you use qvm-block -A to attach a file? Wouldnt that be easier for you? -- You received this message because you are subscribed to the Google Groups "qubes-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to qubes-users+unsubscr...@googlegroups.com. To post to this group, send email to qubes-users@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/qubes-users/20170901151324.ahx7dv5e4qnix2hl%40thirdeyesecurity.org. For more options, visit https://groups.google.com/d/optout.
[qubes-users] qvm-block doesn't list/expose dom0 loop devices
Nobody has noticed this? -- You received this message because you are subscribed to the Google Groups "qubes-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to qubes-users+unsubscr...@googlegroups.com. To post to this group, send email to qubes-users@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/qubes-users/46d54335-fe77-4766-9acb-57735e34a514%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[qubes-users] qvm-block doesn't list/expose dom0 loop devices
I'm using R4.0 rc1. I wanted to install a Linux distro inside a disk image located in dom0 home, using QEMU in an AppVM. I've created a new disk image in dom0, set it up (dos partition label and a primary ext4 partition) and attached it with `kpartx` to loopX, but `qvm-block` doesn't list it in the exposed block devices. So, in order to understand better how Qubes handles this, I've tried to do the same in a VM and see if the dom0 would catch the event, but nothing. Strangely, when I detached the disk image, both the 'AppVM:loopX - IMG_PATH is available' and 'AppVM:loopX - IMG_PATH is removed' notifications appeared on the screen. I've read a lot about it, but I think what I found was all related to a < R4.0 version, so I don't know if this issue is related to a intended design or a bug. Procedure: [user@dom0 ~]$ dd if=/dev/zero of=/home/user/table.raw bs=2048 count=1 [user@dom0 ~]$ dd if=/dev/zero of=/home/user/root.raw bs=3GB count=1 [user@dom0 ~]$ mkfs.ext4 /home/user/root.raw [user@dom0 ~]$ cat /home/user/{table,root}.raw > /home/user/root.img [user@dom0 ~]$ rm /home/user/{table,root}.raw [user@dom0 ~]$ truncate -s 3GB /home/user/root.img [user@dom0 ~]$ fdisk /home/user/root.img o new DOS partition table n new partition p primary 1 first 2048 first sector \n to the end [user@dom0 ~] fdisk -l /home/user/root.img Disk /home/user/root.img: 2.8 GiB, 30 bytes, 5859375 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0xda159b44 Device Boot Start End Sectors Size Id Type root.img12048 5859374 5857327 2.8G 83 Linux [user@dom0 ~] sudo kpartx -a /home/user/root.img [user@dom0 ~] losetup -l NAMESIZELIMIT OFFSET AUTOCLEAR RO BACK-FILE DIO /dev/loop40 0 0 0 0 /home/user/root.img 0 [user@dom0 ~] ls /dev/mapper control loop40p1 ... -- You received this message because you are subscribed to the Google Groups "qubes-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to qubes-users+unsubscr...@googlegroups.com. To post to this group, send email to qubes-users@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/qubes-users/35f29cb8-e8d6-4cba-8cc0-ea02517eee46%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.