Looking for a little help
I uploaded the QEMU VM image from
Kali.org to the default data store.
The image file qcow2 size was about 15 Gb.
Once uploaded , The default data store on the other hand takes up 80 GB.
When I run the image, 63 GB is free space and and near about 17 GB is used inside the VM.
I have tried to install from the ISO a couple of million times on disk sizes as big as 60 GB, but it always fails, the VM however runs fine except for the mammoth disk size.
Any advice on the matter would be greatly appreciated, a more reasonable disk size would be advantageous.
I didn’t use kali image before, but probably they need that amount of disk, also depends on your datastore storage backend. We use ceph so all the images are always converted to raw.
Maybe you can try to shrink the Kali image before uploading it to opennebula datastore. There are several wikis that explains how to do that with a qcow image for kvm:
In this article we see how expand or shrink a qcow2 disk image and how to "sparsify" it to reclaim unused space on it. W also see how to manage the partitions layout of a disk image from the host system, connecting it by using the NBD protocol.
Est. reading time: 10 minutes
I hope this will help.
Thank you very much for the response, I will certainly give it a try.
Another option is to configure the VM disk as virtio-scsi[*] and enable trim/discard. Then use fstrim inside the guest(Kali) to tell the block layer that the free space in the (guest) filesystem is indeed “free” so it will free the disk space taken by the backing qcow2 file too.
[*] The discard option virtio-block backed disks works in recent qemu-kvm too. But you need to check does it works in your case first.
Hope this helps.
Thank you very much, I will give it a try.
Really appreciate the advice