Increase drive space qcow2

Majerus

Renowned Member
Jun 16, 2011
19
0
66
Looking over the wiki I did not see any information on increasing the disk space for the guest OS. I have a server 2008 installed with 100GB of space on the drive in the .qcow2 file system. I am looking to increase the amount of space the os has assigned to it. I would to know how to go about doing this. Thanks for any help.
 
Looking over the wiki I did not see any information on increasing the disk space for the guest OS. I have a server 2008 installed with 100GB of space on the drive in the .qcow2 file system. I am looking to increase the amount of space the os has assigned to it. I would to know how to go about doing this. Thanks for any help.
Hi,
Code:
qemu-img resize filename [+ | -]size
should work. After that powercycle of the VM.

Udo
 
Ok so I ran qemu-img resize /var/lib/vz/images/103/vm-103-disk-1.qcow2 + 200G and "image resized" was returned. I had the guest OS shutdown and after running the command booted the guest os checked disk manager and did not see any extra space. I then proceeded to rebooting the entire cluster with still no luck. Any other thoughts?
 
Ok so I ran qemu-img resize /var/lib/vz/images/103/vm-103-disk-1.qcow2 + 200G and "image resized" was returned. I had the guest OS shutdown and after running the command booted the guest os checked disk manager and did not see any extra space. I then proceeded to rebooting the entire cluster with still no luck. Any other thoughts?
Hi,
reboot of the cluster won't help ;-)

I'm not sure if the space between + and 200G makes trouble.
What shows "qemu-img info /var/lib/vz/images/103/vm-103-disk-1.qcow2" ?

If you boot an cd-iso inside the VM (gparted or an othe linux live-cd) do you see an bigger disk (fdisk -l)?

Udo
 
After running /var/lib/vz/images/103/vm-103-disk-1.qcow2 +200G with out the space i was able to reboot the server and then extend the drive. I ran qemu-img info /var/lib/vz/images/103/vm-103-disk-1.qcow2 and received this.

image: /var/lib/vz/images/103/vm-103-disk-1.qcow2file format: qcow2
virtual size: 300G (322122547200 bytes)
disk size: 8.8G
cluster_size: 65536

any reason why the webUI did not update the new drive size?
 
Well looks like it took a little while to pull the new drive size into the web ui but it now shows 300GB. Thank you very much Udo I appreciate the help.
 
After running /var/lib/vz/images/103/vm-103-disk-1.qcow2 +200G with out the space i was able to reboot the server and then extend the drive...
Hopefully you mean the win-server inside the VM for reboot and not the proxmox-server. Normaly it's should be enoug to switch of the VM, resize and switch on the VM (and extend inside the VM).

Udo
 
I only had to reboot the windows server not the entire cluster :D. If i had to reboot the cluster every time I needed to add storage that would be pretty rough. Thanks again for the help.