VMware Cloud Community
sigm
Contributor
Contributor

increasing partition size on vm

I haven't had a lot of time to research this, but my supervisor has tried to recently increase the size of the vm's primary partition. He originally powered of the vm and increased the hd size. This led to the same logical volume but he could then add a second partition. He then found that he could export the vm and during the export stages/phases, he had the option to increase the partition and also increase the primary partition at the same time.

Is there an easier/better way to handle this?

Reply
0 Kudos
4 Replies
kryichek
Enthusiast
Enthusiast

There are a couple of ways to increase the size of a existing volume/drive.

You power off the VM.

Log into the Physical host.

Navigate to the physical location on disk.

Use vmkfstools to extend the drive.

Power on the VM

Use diskpart.exe to extend the volume/drive.

I have gloss over some of the steps, for example, using vmkfstools and diskpart. Setup a test vm and practice on it before trying the procedure on a production VM.

Charles Mielak VCP, vExpert
Reply
0 Kudos
Langly
Contributor
Contributor

Further elaboration on the post above:

In the path the vmdk is stored @...

vmkfstools -X 10G serverx.vmdk

-X (capital X) = extend

10G = 10 gigabytes

This example will expand serverx's vmdk to 10 GBs. Boot up, login to the VM and use diskpart (or another 3 party tool, like Acronis Disk Director) to expand the C drive (assuming a windows vm). Hope this helps. -Langly

Reply
0 Kudos
TomHowarth
Leadership
Leadership

Moved to a more appriopiate forum to gain a greate audience for the question

Tom Howarth

VMware Communities User Moderator

Tom Howarth VCP / VCAP / vExpert
VMware Communities User Moderator
Blog: http://www.planetvm.net
Contributing author on VMware vSphere and Virtual Infrastructure Security: Securing ESX and the Virtual Environment
Contributing author on VCP VMware Certified Professional on VSphere 4 Study Guide: Exam VCP-410
Reply
0 Kudos
Texiwill
Leadership
Leadership

Hello,

VMware Converter is one of the easiest ways to handle this problem as it is just point and click with no messy command line or disk part issues. The problem you are faced with is that extending the VMDK does not extend the file system within the VMDK. That you need to do using a different tool to do, something compatible with the file system in use. However, when using VMware Converter and windows VMs this is handled for you.


Best regards,

Edward L. Haletky

VMware Communities User Moderator

====

Author of the book 'VMWare ESX Server in the Enterprise: Planning and Securing Virtualization Servers', Copyright 2008 Pearson Education.

CIO Virtualization Blog: http://www.cio.com/blog/index/topic/168354

As well as the Virtualization Wiki at http://www.astroarch.com/wiki/index.php/Virtualization

--
Edward L. Haletky
vExpert XIV: 2009-2023,
VMTN Community Moderator
vSphere Upgrade Saga: https://www.astroarch.com/blogs
GitHub Repo: https://github.com/Texiwill
Reply
0 Kudos