I am working on a Win10 image. It's too big; want to shrink it. I reduced the partition sizes so I have under 52GB of partitions in a 500GB raw virtual disk.
Config info below.
The hard part: the image (in my local-zfs storage) is actually apparently a set of links to /dev/zd48* which are device files. qemu-img complains that it will not function on device files. I'm confused! Where is the actual file? Have I done something wrong? What's going on here?
in 711.conf:
ls -lh /dev/zvol/rpool/data/*711*
lsblk /dev/zd48
qemu-img info vm-711-disk-0
qemu-img resize --shrink -f raw vm-711-disk-0 448G
Config info below.
The hard part: the image (in my local-zfs storage) is actually apparently a set of links to /dev/zd48* which are device files. qemu-img complains that it will not function on device files. I'm confused! Where is the actual file? Have I done something wrong? What's going on here?
in 711.conf:
scsi0: local-zfs:vm-711-disk-0,cache=writeback,discard=on,size=500G,ssd=1
ls -lh /dev/zvol/rpool/data/*711*
lrwxrwxrwx 1 root root 13 Mar 14 20:40 vm-711-disk-0 -> ../../../zd48
lrwxrwxrwx 1 root root 15 Mar 14 20:40 vm-711-disk-0-part1 -> ../../../zd48p1
lrwxrwxrwx 1 root root 15 Mar 14 20:40 vm-711-disk-0-part2 -> ../../../zd48p2
lrwxrwxrwx 1 root root 15 Mar 15 05:00 vm-711-disk-0-part3 -> ../../../zd48p3
lsblk /dev/zd48
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
zd48 230:48 0 500G 0 disk
├─zd48p1 230:49 0 50M 0 part
├─zd48p2 230:50 0 50G 0 part
└─zd48p3 230:51 0 556M 0 part
qemu-img info vm-711-disk-0
image: vm-711-disk-0
file format: raw
virtual size: 500 GiB (536870912000 bytes)
disk size: 0 B
Child node '/file':
filename: vm-711-disk-0
protocol type: host_device
file length: 500 GiB (536870912000 bytes)
disk size: 0 B
qemu-img resize --shrink -f raw vm-711-disk-0 448G
qemu-img: Cannot resize device files