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, 3000000000 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.img1        2048 5859374 5857327  2.8G 83 Linux

[user@dom0 ~] sudo kpartx -a /home/user/root.img
[user@dom0 ~] losetup -l
NAME        SIZELIMIT 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.

Reply via email to