When you move your Windows VPS to a larger offer, the virtual disk grows immediately on the hypervisor side. Windows does not notice on its own: your C: drive keeps its original size and the extra space shows up as unallocated. Nothing is lost, it simply has to be attached.
Why does Windows not extend the partition on its own?
A disk and a partition are two different things. The hypervisor gives you a bigger disk, as if empty shelves had been added above a cupboard. The C: partition is still sized as before: nobody told it to occupy the free shelves. That instruction is what you are about to give.
What should I do before extending a partition?
Take a snapshot and close whatever writes to the disk: any partition work deserves a safety net.
- Take a snapshot from the Snapshots tab of your service. Any partition work deserves a safety net.
- Connect over RDP with an administrator account.
- A disk can only grow: shrinking it is not possible without a reinstall.
How do I extend the C: volume with Disk Management?
This is the normal route, with no risk and no external tool.
- Press
Win + R, typediskmgmt.msc, confirm. - Find the C: drive and, to its right, the hatched Unallocated area.
- Right-click C: then Extend Volume.
- Keep the default size (it takes all available space) and finish the wizard.
The new size applies immediately, with no reboot.
Why is “Extend Volume” greyed out?
Windows can only extend a partition into free space located immediately to its right. Windows images often place a small recovery partition (WinRE, 500 MB to 1 GB) right after C:. It acts as a wall: the unallocated space exists, but it sits on the other side.
That wall has to go.
How do I extend the partition with diskpart?
By opening a command prompt as administrator, then checking the disk before extending it.
Open a command prompt as administrator, then:
diskpart
list disk
select disk 0
list partition
Read the output before anything else. You need two numbers:
- the one for C:, the largest primary partition;
- the one for the Recovery partition that follows it.
A typical output looks like this:
Partition ### Type Size Offset
------------- ---------------- ------- --------
Partition 1 System 100 MB 1024 KB
Partition 2 Reserved 16 MB 101 MB
Partition 3 Primary 40 GB 117 MB
Partition 4 Recovery 523 MB 40 GB
Here C: is partition 3 and recovery is partition 4. Deleting the latter loses the Windows recovery environment, not your data: the system boots and runs normally without it.
select partition 4
delete partition override
select partition 3
extend
exit
Use the numbers from your list partition output, not the ones in the example.
Is there a By-Hoster script that does it?
The same procedure is also available as a script:
curl -o resize.bat https://byh.fr/resize.txt && call resize.bat
It performs exactly method 2, but without asking anything: it selects disk 0, deletes partition 4, then extends partition 3. It is only correct if your machine has that exact layout.
Run list partition before using it. If partition 4 on your machine is not the recovery partition, it will be deleted all the same, along with its contents.
How do I check that the extension worked?
Open File Explorer, This PC: the size of C: should reflect the new disk. From the command line:
diskpart
list volume
What if the unallocated space does not appear?
Three things to try, from the simplest to the most technical:
- Reboot the machine, then reopen
diskmgmt.msc. - In Disk Management, use the Action menu then Rescan Disks.
- If the space is still missing, the offer change may not have reached the machine. Open a ticket stating the expected size and the observed size.