# kldload ext2fs
# mdconfig image.vhd
md0
# gpart show md0
# mount -t ext2fs /dev/md0p2 /mnt
# umount /mnt
# mdconfig -du md0
No problem. Tested on a 13.2-RELEASE, amd64 raw image (build from source):Can you do the same with the FreeBSD RAW virtual machine images? Load into mdconfig and mount?
# mdconfig vm.raw
md0
# gpart show md0
=> 3 12649619 md0 GPT (6.0G)
3 123 1 freebsd-boot (62K)
126 66584 2 efi (33M)
66710 2097152 3 freebsd-swap (1.0G)
2163862 10485760 4 freebsd-ufs (5.0G)
# mount /dev/md0p4 /mnt
# mount | grep /mnt
/dev/md0p4 on /mnt (ufs, local, soft-updates)
I can't imagine how the VM can be resized smaller when the UFS file system on the raw image itself can't be shrunk (it can only be grown).I needed an amd64 image to burn to eMMC and discovered we don't have a GENERIC-SD image for amd64.
I thought about using one of the raw VM images and resizing it smaller.
VMTARGETS= vm-image
VMFORMATS?= vhd vmdk qcow2 raw
VMSIZE?= 5120m
SWAPSIZE?= 1g
VMBASE?= vm