I was trying to get this to work, but can’t.
Below is one of the templates I ended up with, rest set from GUI
The RAW bit was added by me following i.e. this: https://chrisirwin.ca/posts/discard-with-kvm/
CONTEXT = [
NETWORK = "YES",
SET_HOSTNAME = "$NAME",
SSH_PUBLIC_KEY = "hellomeow" ]
CPU = "1"
DISK = [
CACHE = "writeback",
DEV_PREFIX = "sd",
DISCARD = "unmap",
IMAGE = "HardenedBSD 11.0",
IMAGE_UNAME = "oneadmin" ]
GRAPHICS = [
LISTEN = "0.0.0.0",
TYPE = "VNC" ]
LOGO = "images/logos/hardenedbsd.png"
MEMORY = "768"
NIC = [
NETWORK = "net",
NETWORK_UNAME = "oneadmin" ]
OS = [
ARCH = "x86_64" ]
RAW = [
DATA = "<controller type='scsi' index='0' model='virtio-scsi'>
<driver queues='2' />
</controller>",
TYPE = "kvm" ]
If I check from within the OS I get indicated there’s no support for trim/unmap/discard/bunnies.
Does one of you have discard tested working? Is the GUI setting supposed to really be enough?
From what I saw it won’t switch to virtio-scsi, which quite a few places tell us to be needed.
Consider this solved.
Hopefully that’ll will now enable me to flatten ZFS based qcow2 images.
that would make the FreeBSD/HardenedBSD images lose about
4GB of size.
and THAT would make the marketplace downloads faster once I submit them
and THAT would make me happy
To repack the qcow2 images you can use qemu-img convert to qcow2, it skips non used blocks. And even better for marketplace is compressing the result qcow2:
Thank you for the exact command.
I think I had tried trimming it with something else (the one you gave a talk about) but it did not work due to ZFS not having freed the space yet. Even heavy compression did not help at all. That’s the fun part of CoW filesystems