How to extend disksize in virtual Windows server

Written by - 0 comments

Published on - Listed in Windows VMware Virtualization


There are several possibilities to extend/increase the disk or partition size on a Windows server but we do all realize that downtime is no good time. To avoid a reboot or another kind of downtime, it is possible to extend the disk dynamically. 

In this example I show how to do this on a virtual Windows server (on VMware ESX/i). The data partition (not C: !) will be extended. The data partition will be extended from 70GB to 71GB.

1. Extend the virtual harddisk in vSphere client while the machine is running. Just go to Edit Details, select the harddisk and extend the size.

2. On the virtual server launch the command line (cmd.exe) and launch diskpart.

3. List your disks:

DISKPART> list disk

  Disk ###  Status      Size     Free     Dyn  Gpt
  --------  ----------  -------  -------  ---  ---
  Disk 0    Online       20 GB      8033 KB
  Disk 1    Online      71 GB      1028 MB

As you already see, diskpart shows the correct size of the disk (I added 1GB in vSphere client).

4. Select the hard disk which you want to expand. In my case this is disk 1 which contains the data partition:

DISKPART> select disk 1
Disk 1 is now the selected disk.

5. Now we have to list the existing partitions on this disk:

DISKPART> list partition

  Partition ###  Type              Size     Offset
  -------------  ----------------  -------  -------
  Partition 1    Primary           70 GB    32 KB

The partition (NTFS) is still on 70GB. Therefore it needs to be extended to use the full disk size (or the wanted size).

6. Now we have to select the wanted partition:

DISKPART> select partition 1
Partition 1 is now the selected partition.

7. We get some detailed information about the selected partition before we extend the partition:

DISKPART> detail partition

Partition 1
Type  : 07
Hidden: No
Active: No

Volume ###  Ltr  Label        Fs     Type        Size     Status     Info
  ----------  ---  -----------  -----  ----------  -------  ---------  --------
* Volume 2     D  APPS&DATA       NTFS   Partition   70 GB  Healthy

8. To extend the partition to use the full hard disk space just enter the following command:

DISKPART> extend disk 1
DiskPart successfully extended the volume.

9. Now we check again the details of the partition to see what happened:

DISKPART> detail partition

Partition 1
Type  : 07
Hidden: No
Active: No

Volume ###  Ltr  Label        Fs     Type        Size     Status     Info
  ----------  ---  -----------  -----  ----------  -------  ---------  --------
* Volume 2     D  APPS&DATA       NTFS   Partition   71 GB  Healthy

Congratulations! The partition has been extended! And this without a reboot!
Windows will also show the new partition size in My Computer:


Add a comment

Show form to leave a comment

Comments (newest first)

No comments yet.

RSS feed

Blog Tags:

  AWS   Android   Ansible   Apache   Apple   Atlassian   BSD   Backup   Bash   Bluecoat   CMS   Chef   Cloud   Coding   Consul   Containers   CouchDB   DB   DNS   Database   Databases   Docker   ELK   Elasticsearch   Filebeat   FreeBSD   Galera   Git   GlusterFS   Grafana   Graphics   HAProxy   HTML   Hacks   Hardware   Icinga   Influx   Internet   Java   KVM   Kibana   Kodi   Kubernetes   LVM   LXC   Linux   Logstash   Mac   Macintosh   Mail   MariaDB   Minio   MongoDB   Monitoring   Multimedia   MySQL   NFS   Nagios   Network   Nginx   OSSEC   OTRS   Office   PGSQL   PHP   Perl   Personal   PostgreSQL   Postgres   PowerDNS   Proxmox   Proxy   Python   Rancher   Rant   Redis   Roundcube   SSL   Samba   Seafile   Security   Shell   SmartOS   Solaris   Surveillance   Systemd   TLS   Tomcat   Ubuntu   Unix   VMWare   VMware   Varnish   Virtualization   Windows   Wireless   Wordpress   Wyse   ZFS   Zoneminder