Op 04-09-2023 om 17:13 schreef Granwille Strauss:
Hi
Thank you, in our case, we start our VMs at 60 GB, clients then can
upgrade to 120 GB as the next upgrade. However, clients also have the
option to "Downgrade" back to 60 GB based on their package. Would kinda
not make sense to prohibit clients from doing that, from a legal POV. So
this kinda creates an issue now and its good I tested it out now. I
tried the 'qemu-img resize --shrink /var/lib/libvirt/images/<image>`
and it seems it corrupted the image file. Not sure if it had to be
converted first maybe.
Many providers simply don't allow for an upgrade because it's
technically not feasible with QCOW2.
What you did is not shrink the volume, you only shrank the filesystem
and partition.
I noticed that the images are not saved as .QCOW2 files, can you perhaps
confirm what format they're currently in? I would like to run some more
test and maybe see how well it goes and potentially propose a solution.
If you for example woud use Ceph with RBD you would be able to shrink
the volume.
Wido
On 9/4/23 17:06, Wei ZHOU wrote:
Hi,
Normally cloud providers create vm templates with small size (e.g. 10GB).
When create vm from the template, user can override the root disk size so
that vm have a larger size (e.g. 60GB)
If the vm template has cloud-init installed, it can detect the new disk
size and auto-grow the partition to use the full disk.
In your case, if users pay for only 60GB, resizing to 120GB should be
forbidden.
-Wei
On Mon, 4 Sept 2023 at 16:51, Granwille Strauss
<granwi...@namhost.com.invalid> wrote:
Hi Wido
Thank you. Yes, I only shrink it inside the VM. But still Cloudstack
volume shows 120GB and within the VM lsblk command shows that 120 GB is
available. Since I cannot shrink the volume, how do most providers take
care of this issue? I mean it would be awkward if a client see they can
have 120 GB available when they're paying for 60 GB, for example.[image:
Powered by AdSigner]
<https://www.adsigner.com/v1/c/631091998d4670001fe43ec2/621c9b76c140bb001ed0f818>
--
Regards / Groete
<https://www.namhost.com> Granwille Strauss // Senior Systems Admin
*e:* granwi...@namhost.com
*m:* +264 81 323 1260 <tel:+264813231260>
*w:* www.namhost.com <https://www.namhost.com/>
<https://www.facebook.com/namhost><https://twitter.com/namhost><https://www.instagram.com/namhostinternetservices/><https://www.linkedin.com/company/namhos><https://www.youtube.com/channel/UCTd5v-kVPaic_dguGur15AA>
<https://www.adsigner.com/v1/l/631091998d4670001fe43ec2/621c9b76c140bb001ed0f818/banner>
Namhost Internet Services (Pty) Ltd,
24 Black Eagle Rd, Hermanus, 7210, RSA
The content of this message is confidential. If you have received it by
mistake, please inform us by email reply and then delete the message. It
is forbidden to copy, forward, or in any way reveal the contents of this
message to anyone without our explicit consent. The integrity and
security of this email cannot be guaranteed over the Internet.
Therefore, the sender will not be held liable for any damage caused by
the message. For our full privacy policy and disclaimers, please go to
https://www.namhost.com/privacy-policy
Powered by AdSigner
<https://www.adsigner.com/v1/c/631091998d4670001fe43ec2/621c9b76c140bb001ed0f818>