increase disk size on windows vm

strox84

New Member
Feb 6, 2023
2
0
1
Hi,

im in desperate need of support and I'm hoping someone can help me or guide me in the right direction.

I need to increase the size of my windows vm.

hope to hear from someone soon.

Regads
Shaun
 
  • Like
Reactions: Kingneutron
Expanding the windows partition should work providing you have more than 2GB of free space on your current windows drive.

In my situation I have 900MB so recreating the Windows VM is the only option - even 3rd party software like AEOMI can't extend the partition. I should have known allocating 25GB for Windows 11x64 is barely enough after updates.
 
Expanding the windows partition should work providing you have more than 2GB of free space on your current windows drive.

In my situation I have 900MB so recreating the Windows VM is the only option - even 3rd party software like AEOMI can't extend the partition. I should have known allocating 25GB for Windows 11x64 is barely enough after updates.
What about the recovery partition? Often it is the 3rd partition after UEFI and your windows system partition. Even if you increase your underlying disk, the recovery partition is in the way of any windows system partition resizing. Just delete the recovery partion and you'll be able to resize/expand your windows system partition.
 
Of course, if you don't want to go all Conan the Barbarian on your recovery partition, you can move it. I commonly use an Ubuntu ISO for this; just boot into it on the VM, open GParted, and move the partition to the end of the resized disk.

It's mentioned partway down this, with pictures: https://4sysops.com/archives/move-windows-recovery-partition-using-gparted/

GParted via Ubuntu has been one of my major goto tools for working on all sorts of equipment :)
 
  • Like
Reactions: Kingneutron
Hi to all, I'm not sure the way above works any more. I used to do resizing this way for a long time, but "nowadays" it's just not working any more ... for me :( . Gparted moved recovery partition "successfully", but w11 sees it still on the same previous place: ...

1717148479305.png
1717147863010.png

.... even when gparted deletes this recovery partition -> no change too ... it still appears in win11

Any advice would be very appreciated

Thank you in advance

BR

Tonči
 
Last edited:
Latest info : no ther tools (acronis, aomei, ... ) sees disk at all!
But if we change interface from virtio back to IDE then w11 sees recovery partition at the end and we can increase c: disk. BUT, then it works only in IDE mode and not in Virtio ... If we change to Virtio blue screen appears : no boot device accessible .. etc
 
Latest info : no ther tools (acronis, aomei, ... ) sees disk at all!
But if we change interface from virtio back to IDE then w11 sees recovery partition at the end and we can increase c: disk. BUT, then it works only in IDE mode and not in Virtio ... If we change to Virtio blue screen appears : no boot device accessible .. etc

It's essential if you attach the disk as "virtio" or "SCSI" when you use Virtio-SCSI-Controller (It is somewhat misleading that the Virtio SCSI controller has virtio AND SCSI modes - and that there is also “normal” SCSI controller emulation, which has nothing at all to do with virtio.). They have different drivers in Windows. So if you had your Disk running connected as "virtio", then it won't work as "scsi" - and vice versa. btw. it's recommended to use the disk connected as scsi since virtio will be depricated in future.

If you can't get it running this way, you need to boot into the recovery console (if it's still working on the disk or from a Windows Boot DVD). Then you need to initialize the disk and apply the scsi-virtio drivers:

In this scenario D: is the CD with the virtio-drivers and C: is the windows-partition

Loading the driver so the rescue-system can see the Windows-partition:
Code:
drvload.exe D:\viostor\w10\amd64\vioscsi.inf

Integrate the vioscsi driver into your Windows-Installation:
Code:
 dism /image:c:\ /add-driver /driver:d:\viostor\w10\amd64\vioscsi.inf

Windows should boot now.
 
Last edited:
  • Like
Reactions: Kingneutron
Expanding the windows partition should work providing you have more than 2GB of free space on your current windows drive.

In my situation I have 900MB so recreating the Windows VM is the only option - even 3rd party software like AEOMI can't extend the partition. I should have known allocating 25GB for Windows 11x64 is barely enough after updates.

25GB?! Try more like 80GB minimum just for C: (if you want breathing room) after you install Libreoffice, other useful apps, and most of the goodies from choco

Instead of recreating the VM you might just uninstall some apps, create D: drive and reinstall them to that. And move all your data / My Documents and stuff to D:

Also run a cleaner app and delete IE cache, etc - there's probably a lot of cruft that can be gotten rid of.

Remember, we used to have like 20GB mechanical drives for Windows - the resize app may need a minimum amount of free space, but I should think gparted would be able to resize C: if you boot into systemrescuecd. Never tried it with that tiny amount of free disk space tho

Last resort, try just moving the end of the partition with parted - after snapshot/backup of course:

https://sirlagz.net/2023/07/03/updated-live-resize-lvm-on-linux/

EDIT: I just tested this in a VM, and systemrescuecd + gparted was successfully able to resize an (unmounted) 25GB NTFS partition with ~950MB free space up +2GB. This was a data/test disk, not a full Windows install, so you may need to turn off "fast boot" and hibernation in the VM before trying
 
Last edited:
Hi to all, I'm not sure the way above works any more. I used to do resizing this way for a long time, but "nowadays" it's just not working any more ... for me :( . Gparted moved recovery partition "successfully", but w11 sees it still on the same previous place: ...

View attachment 69045
View attachment 69044

.... even when gparted deletes this recovery partition -> no change too ... it still appears in win11

Any advice would be very appreciated

Thank you in advance

BR

Tonči
From Disk Management, you need to go to Action->Rescan Disks after you make the changes with Gparted. Once you do this, Windows will show partitions in the correct order. I've just checked this on a Windows 11 VM I have and it works without issue.
 
You can also use MiniTool Partition Wizard Free. https://de.minitool.com/partition-manager/partition-wizard-startseite.html

You have to install it inside of your VM.

I had an old version (V9), and it works for my Windows 11 VM. I moved the recovery partition to the end of the virtual drive, then expanded the main partition and pressed "Apply". After that, I immediately saw the new size in computer.
 
Last edited:
  • Like
Reactions: masteryoda
Expanding the windows partition should work providing you have more than 2GB of free space on your current windows drive.

In my situation I have 900MB so recreating the Windows VM is the only option - even 3rd party software like AEOMI can't extend the partition. I should have known allocating 25GB for Windows 11x64 is barely enough after updates.
Saw this overall post and read your response but you can delete the Recovery partition and expand the C Disk into the added space from the resizing tool in Proxmox. Once complete you can recreate the recovery partition.
Open Command Prompt as Admin
Reagentc /disable
diskpart
list disk

select disk that has the OS, usually disk 0
select disk 0
list partition

select partition that has the recovery
select partition #
delete partition override

Go to disk management and expand disk to whatever you want but leave 1024MB. This is usually after using disk expand from Proxmox or if someone split a disk in half.
Create a new simple volume in disk management but do not assign a letter.
Format it to NTFS with a GPT partition.
In diskpart list partitions again
list partition
Confirm the size is 1024MB. Select the partition for recovery.
select partition 4
set id=de94bba4-06d1-4d40-a16a-bfd50179d6ac
gpt attributes=0x8000000000000001

That is 14 0's
exit
reagentc /enable


For MBR set partition ID to 27
set id=27
exit

exit diskpart
reagentc /enable
 

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!