Increase drive space qcow2

Majerus

New Member
Jun 16, 2011
19
0
1
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.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!