I'm going to preface this, that I'm trying to work within the confines of our current eco-system (ie: trying to ONLY use AL2). We have a very specific use-case in which we are converting a vmdk that gets generated from an AMI and gets downloaded to an EC2 for some additional processing.
Part of this process is using qemu-img to convert it to a raw image format, then attempting to use zerofree to make it smaller (and of course, create the revised vmdk after the fact). There are reasons in which I'm not allowed to go into detail. What doesn't work:
amazon-linux-2 & centos in AWS. Specifically, no matter what, zerofree compalains:
sudo qemu-img convert -f vmdk -O raw myvmdk.vmdk myvmdk.img
sudo losetup --show -Pf myvmdk.img
/dev/loop0
sudo zerofree /dev/loop0p1
zerofree: failed to open filesystem /dev/loop0p1
This EXACT same process in local debian bases, local fedora, cloud fedora, and aws ubuntu work JUST FINE. I've tried downloading some RPM's, but that is dependency hell. I've tried doing some upgraded versions through EPEL and COPR, etc. Same issue.
Anyone have any ideas or anything of where I would maybe look?