Link to home
Start Free TrialLog in
Avatar of jskfan
jskfanFlag for Cyprus

asked on

extend windows partitions in Vmware

First I want to know how to create a second partition in windows
Second, ifI have partitions C: and D: on the same physical disk how can I extend either of them?

Thanks
SOLUTION
Avatar of ola_erik
ola_erik

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of SysExpert
SysExpert
Flag of Israel image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
To answer your first question of creating a partition, what you're really wanting to do there is add a virtual disk to your VM. Right-click on the VM in question, select Edit Settings. Then click the Add button to add a new Hard Disk. You will need to have the space you want to add on your datastore. In the Add Hard Disk wizard, select the datastore you want to create storage (a virtual disk) from, choose the size of the disk/partition, then finish. You have to do this all with the VM powered down. When you power it back on, go into Disk Mgmt (if Windows VM), and Initialize the new disk, then format it. I would also....before formatting it, to 'align the disk' properly. You can use diskpart to do that as well. Again, that's only for a newly installed partition/volume, not for your system volume.

Regards,
~coolsport00
Avatar of jskfan

ASKER

first how to create an additional partition from Disk Management as show in the attached file.
Second if You are in front of VMware server or ESX , could you please post screenshots on how to create and extend a second partition?
Partition.png
You don't create a partition on a VM via Disk Mgmt. As mentioned above, you shut down the VM and 'add' a Hard Disk (virtual disk) to the VM. Then, power on the VM and go into Disk Mgmt and you'll see an 'unallocated' disk. Right-click on it and choose to Initialize, if the Initialize wizard doesn't automatically pop up on its own. Once you Initialize it, go into diskpart via cmd line and align the disk properly. After that, right-click on the partition in Disk Mgmt and choose to format it. Give it a drive letter and volume name if desired and format it as NTFS. That's pretty much it. That's how you create a 2nd partition. It's a whole separate disk. In your screenshot, you have 1 disk/array and partitions allocated on it. What I'm suggesting is not creating a partition on 1 disk/array, but a new hard disk. You partition differently in a VM than you do on a phys box. Each partition in a VM is really its own 'disk', and it's shown that way in Disk Mgmt. If you have a 2nd partition already created and want to add space to the virtual disk/partition, what you do is power down the VM, click on the hard disk you want to extend in the list of 'hardware' and modify the disk space to the size you want. Boot up the VM, go into a cmd prompt, and extend the disk with the cmds listed in the MS KB I posted...it gives step by step of what you need to type, altho no screenshots.

If you use the GParted tool instead of using diskpart (and you certainly can do so), you can use their documentation on how to extend a disk...their doc does have screenshots I believe.
http://gparted.sourceforge.net/larry/resize/pdf/Resizing.pdf
You download the GParted iso file and connect it to the VM. Restart your VM so it boots to the ISO and then use the document to resize the disk (again, this is done after adding the disk space in the VM's Edit Settings area).

~coolsport00

Avatar of jskfan

ASKER

In VMware environment you can just add a virtual Disk and make it a second partition. Correct?

But on a physical machine that has one hard drive and one partition C: with OS and Apps on it, how can you create a partition D:

Thanks
1. Yes.
2. If you use all your drive for the OS install, as specified when you do the install (you can select to use entire disk or part of it), you can't. When you do your OS (Windows) install, only select the amt you want for your OS, the rest of the space is unallocated and displayed as such in Disk Mgmt. You can create partitions in Disk Mgmt as I specified above (right-click on unallocated space and create partition, then format and assign letter, etc.).

~coolsport00
Avatar of jskfan

ASKER

It needs to be cleared up a little bit.
When I add a virtual disk to the Virtual Machine, let 's say it used to have C:,D:, now I added E:
How can extend D: to E: and will have one big D: ?

You can't do that in a VM. You can't combine virtual disks/volumes in a VM so they become one. You just add space to the volumes is all. So, if you add E:, but need more space for D:, you power down the VM and add disk space to the hard disk that is the D: drive. You then go into the guest OS and extend the volume size using diskpart (or other 3rd party tool) as mentioned above.

Hope that helps.
~coolsport00
You have to think of storage a bit differently in a VM than in a phys box. Think of the volumes you create in a VM like adding a single physical disk in a phys box. When you add a hard disk (virtual disk) to a VM, you allocate space to it and all of it is used. You can allocate say 50GB, but configure it such that only 30GB is used so that later down the road you may potentially extend that volume.

Actually, for the most part, partitioning a single array or disk in a phys box has mostly been done away with, unless you need a dual boot system. I don't hear much about folks creating separate partitions any longer, but some still do.

~coolsport00
Typo above...I meant to say "you *CAN'T* allocate say 50GB, ......"..  Sorry about that. :)

~coolsport00
Avatar of jskfan

ASKER

Ok Let's say i  have a VM with a pretty big Virtual disk allocation.
I  install OS and create 2 partions on it C: and D:  (D:for data).
D: is running out of space and the only option I think of is adding a a Virtual disk
and use for instance Gparted to extend the D: to the new Virtual Disk.
I am not sure if this is correct ???
Does VMware has a built in feature that can do the partition extension ?


No, you don't need to add another virtual disk in this case...you already have it created. What you need to do is just  what is referenced in the VMware KB I provided above - you power down the VM and add storage space to that 2nd hard disk (it shows as 'hard disk' in the list of hardware in the VM -> Edit Settings screen). Then, in the guest OS, you can use the built-in diskpart cmd in Windows to extend the drive to the newly configured storage space and that's it. You don't need any 3rd party tool. You need a 3rd party tool only for the system partition (C: drive) of a Windows OS. VMware doesn't have a tool to add space to a volume within a guest OS. In their KB, they reference the options you have (diskpart, GParted, Paragon, etc.).

You add another virtual disk (hard disk) in a VM if you want separate volumes/drives (E:, F:, etc.). If you already have a drive, you extend it by powering down the VM and add space to that particluar hard disk in the VM's Edit Setting area.

Hope that helps.

Regards,
~coolsport00
Avatar of jskfan

ASKER

do you have a snapsjot of these steps take from VM KB you mentioned above.???


1.Open VMware Infrastructure (VI) Client and connect to VirtualCenter or the ESX host.
2.Right-click the virtual machine.
3.Click Edit Settings.
4.Select Virtual Disk.
5.Increase the size of the disk.
6.Follow the steps in Increasing the size of a disk partition (1004071) so the guest operating system is aware of the change in disk size
Avatar of jskfan

ASKER

sorry for the typo (snapshot)
I'm sorry...I don't..sorry :( The closest I could find for you is here:
http://mattiasgeniar.be/2010/08/27/increase-a-vmware-disk-size-vmdk-formatted-as-linux-lvm/ (1st 2 screenshots), and here:
http://thevlab.net/vmware/tips-and-tricks/extending-a-vsphere-win2k3-os-drive/; but instead of using extpart, use the windows built-in tool, diskpart. If the volume is the C: drive, you'll have to use a 3rd party too.

Regards,
~coolsport00
Avatar of jskfan

ASKER

thanks guys