Home > Work related > How to extend your NTFS partition with a vmdk file on ESXi

How to extend your NTFS partition with a vmdk file on ESXi


 

If you are using a large windows file server on your VMware server you will probably end up with a low disk space warning one day. You could choose to resize a partition in-place there but if something goes wrong you are kinda hosed unless you have a backup. You could copy it but not everyone has that kind of disk space so I like to add an ISCSI datastore to my ESXi server and choose to copy the VM to another datastore first. Then I can try to extend the copied vmdk file using a helper vm. It required a combination of stopping the vm, copying the file, renaming the original vm and bringing the new extended vmdk file online to extend it. Once I verify that everything was working our plan was to then remove the old VM once we were completely sure it was working and to free up the space for other projects.

In ESXi vsphere Shutdown vm

Login to ESXi server using putty

cp /vmfs/volumes/datastore1/WindowsXP /vmfs/volumes/datastore2

image

Here we see the copied file is exactly the same at the original

In ESXi vsphere

Rename Old VM to .old (this changes the VM name not the directory name)

image

Open helper vm and edit settings, close

Open settings again and increase the hard drive to desired size

Attach copied vmdk file from new datastore directory to existing VM as another drive

In helper OS

Open command prompt and type diskpart

List volume

image

Select volume (new volume number)

extend

quit

In ESXi vsphere

Create new VM (custom) with old name and do not attach hard drive

Add hard drive and use existing vmdk from new datastore directory

 

When you boot the machine it might do a check disk to resize the partition or after it boots it might need to restart with the new device added.

Verify IP address assignments make changes after initial boot if you do not assign IP automatically using static DHCP addressing.

Reboot and verify operation and once you are satisfied to can delete the old VM.

Categories: Work related Tags:
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: