VMware vSphere

 View Only
Expand all | Collapse all

How to remove a hard disk from a VM

  • 1.  How to remove a hard disk from a VM

    Posted Aug 01, 2011 04:25 PM

    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



  • 2.  RE: How to remove a hard disk from a VM

    Posted Aug 01, 2011 04:30 PM

    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!



  • 3.  RE: How to remove a hard disk from a VM

    Posted Aug 01, 2011 04:31 PM

    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.


  • 4.  RE: How to remove a hard disk from a VM

    Broadcom Employee
    Posted Aug 01, 2011 04:31 PM

    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



  • 5.  RE: How to remove a hard disk from a VM

    Posted Aug 01, 2011 06:48 PM

    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



  • 6.  RE: How to remove a hard disk from a VM

    Posted Aug 02, 2011 01:27 PM

    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



  • 7.  RE: How to remove a hard disk from a VM

    Posted Aug 02, 2011 01:29 PM

    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.


  • 8.  RE: How to remove a hard disk from a VM

    Posted Aug 02, 2011 01:35 PM

    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.



  • 9.  RE: How to remove a hard disk from a VM
    Best Answer

    Posted Aug 02, 2011 01:41 PM

    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.


  • 10.  RE: How to remove a hard disk from a VM

    Posted Aug 02, 2011 01:35 PM

    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.



  • 11.  RE: How to remove a hard disk from a VM

    Posted Aug 02, 2011 01:45 PM

    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.



  • 12.  RE: How to remove a hard disk from a VM

    Posted Aug 02, 2011 02:58 PM

    That´s right.

    I thought you had already ESX/ESXi 4.x :smileywink:

    Rgds,

    J.

    My Company http://www.jmgvirtualconsulting.com

    My Blog http://www.josemariagonzalez.es

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



  • 13.  RE: How to remove a hard disk from a VM

    Posted Mar 08, 2012 12:17 PM

    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