VMware Cloud Community
Maelito77
Contributor
Contributor
Jump to solution

How to remove a hard disk from a VM

Hi

I have installed a Windows server 2003 x64 Virtual Machine and gave it 4 x hard disks:

     C:\ System

          D:\Data

               E:\More Data

                    F:\Backup of data

Now I dont need to use the F:\Backup of data so I want to remove it both from VMware and from Windows.

How can do this in a safe way?

Thanks, Maelito

Maelito
0 Kudos
1 Solution

Accepted Solutions
arturka
Expert
Expert
Jump to solution

Maelito77 wrote:

I just did a test on a VM on ESXi3.5 U4 and there is no option to remove the disk while the VM in hot. Only when I power off the VM.

that's correct, in VI 3.5 you cannot remove HDD on running VM but on vSPhere 4.X you can, which version you have in PROD ?

Cheers

Artur

Visit my blog

Please, don't forget the awarding points for "helpful" and/or "correct" answers.
VCDX77 My blog - http://vmwaremine.com

View solution in original post

0 Kudos
12 Replies
vmroyale
Immortal
Immortal
Jump to solution

Hello.

Identify the drive in Windows and match it up with the one in the VM properties.  Select the disk in the VM properties (Edit Settings) and then remove it.

Good Luck!

Brian Atkinson | vExpert | VMTN Moderator | Author of "VCP5-DCV VMware Certified Professional-Data Center Virtualization on vSphere 5.5 Study Guide: VCP-550" | @vmroyale | http://vmroyale.com
arturka
Expert
Expert
Jump to solution

Hi

Is F partition occupy whole VMDK or VMDK is shared with another partition ?

If it occupy whole VMDK:

  1. Put it offline in Disk manager on VM guest OS
  2. edit virtual hardware of VM, mark proper disk and remove it from hardware inventory (be very careful with that option)

Cheers

Artur

Visit my blog

Please, don't forget the awarding points for "helpful" and/or "correct" answers.
VCDX77 My blog - http://vmwaremine.com
MauroBonder
VMware Employee
VMware Employee
Jump to solution

hi,

If you don´t have access (Read/Write) in this disk, you can go to edit settings click in desired disk and Remove.

You there two options.

- remove from virtual machine (this disk keep existing in datastore)

- remove from virtual machine and delete files (will erase this disk)

if you have access, you can shutdown this vm and remove


Please, don't forget the awarding points for "helpful" and/or "correct" answers. 

Mauro Bonder - Moderator

*Please, don't forget the awarding points for "helpful" and/or "correct" answers. *Por favor, não esqueça de atribuir os pontos se a resposta foi útil ou resolveu o problema.* Thank you/Obrigado
0 Kudos
jose_maria_gonz
Virtuoso
Virtuoso
Jump to solution

Hello,

Edit our VM´s settings and clic on remove disk from virtual machine.

PD. You can even do it while the VM is online.

Rgds,

J.

My Company http://www.jmgvirtualconsulting.com

My Blog http://www.josemariagonzalez.es

My Virtualization Web TV Show http://www.virtualizacion.tv

0 Kudos
Maelito77
Contributor
Contributor
Jump to solution

What about the disk in Windows?

     If I remove from VM (Edit Settings > Select Hard disk > Remove) how will Windows handle this? Will I need to reboot the server? Should this be done with the VM powered off?

Thanks, Maelito

Maelito
0 Kudos
arturka
Expert
Expert
Jump to solution

Hi

You do not have to reboot a server, disk will disappear from OS,

Cheers

Artur

Visit my blog

Please, don't forget the awarding points for "helpful" and/or "correct" answers.
VCDX77 My blog - http://vmwaremine.com
0 Kudos
Maelito77
Contributor
Contributor
Jump to solution

I just did a test on a VM on ESXi3.5 U4 and there is no option to remove the disk while the VM in hot. Only when I power off the VM.

Maelito
0 Kudos
golddiggie
Champion
Champion
Jump to solution

As long as the drive doesn't have something on it that's being accessed at the time, you should be fine doing it hot. Refresh the Disk Management MMC and the now removed drive should also go away. Same thing when you open up the computer (to see the connected drives), a simple refresh is all that should be needed. IF there's something on the volume being accessed when you go to remove it, you could have issues. In that case, you'll want to migrate the files to another volume (if you haven't already) and then remove it.

IME, you don't need to shut down the VM in order to add/remove drives. Sometimes you do when you're using the VM to extend the drive from another VM, you need to reboot the helper VM.

0 Kudos
arturka
Expert
Expert
Jump to solution

Maelito77 wrote:

I just did a test on a VM on ESXi3.5 U4 and there is no option to remove the disk while the VM in hot. Only when I power off the VM.

that's correct, in VI 3.5 you cannot remove HDD on running VM but on vSPhere 4.X you can, which version you have in PROD ?

Cheers

Artur

Visit my blog

Please, don't forget the awarding points for "helpful" and/or "correct" answers.
VCDX77 My blog - http://vmwaremine.com
0 Kudos
Maelito77
Contributor
Contributor
Jump to solution

Ah I see, Im good now.

On ESX 4 I can remove while hot, but on ESX3.5 I cant.

Thanks for your help guys.

Maelito
0 Kudos
jose_maria_gonz
Virtuoso
Virtuoso
Jump to solution

That´s right.

I thought you had already ESX/ESXi 4.x Smiley Wink

Rgds,

J.

My Company http://www.jmgvirtualconsulting.com

My Blog http://www.josemariagonzalez.es

My Virtualization Web TV Show http://www.virtualizacion.tv

0 Kudos
JohnPritchard
Contributor
Contributor
Jump to solution

Good thread to help me better understand removing the disk from the VM.  I have a problem where my datastore is full.  Will this relieve my data store so another VM using it will be able to use it (i.e. I have two VMs using the same data store)?  Do I need to select the 'delete files' option to make that happen?  Thanks.

John

0 Kudos