In preparation for a SRM project we had to check and migrate all RDM files to VMDK.
Check which VM has RDM using PowerCLI
Get-VM | Get-HardDisk -DiskType “RawPhysical”,”RawVirtual” | Select Parent,Name,DiskType,ScsiCanonicalName,DeviceName
Verify how RDM is connected
Edit the settings of the virtual machine in the VMware web client (while the machine is running) to verify if the RDM is connected physical or virtual.
The field compatibility tells how the RDM is connected, Physical or Virtual
Convert Physical RDM to VMDK
A physical connected RDM cannot be converted online to a VMDK. Before that we need to convert the Physical RDM to a Virtual RDM. (VMware KB)
- Write down the drive letter of the disk in the guest OS
- Stop the Virtual Machine by doing a shutdown of the guest OS
Note-down the LUN ID of the RDM by going into the multipath settings of the RMD connected to the VM
Remove the RDM, and check “Delete fr
Re-Add the RDM but change the compatibility mode to Virtual. Be sure the RDMs are connected to a separate SCSI-Controller (VM-PARAVIRTUAL). Select the same LUN ID as the LUN disconnected.
- Power on the virtual machine
Go into storage management and check if the disk is online. Default it will be offline, bring it back online and connect it to the correct drive letter.
- No your server is up and running with a Virtual RDM wich can be migrated online to a VMDK (see Convert Virtual RDM to VMDK)
Convert Virtual RDM to VMDK
A Virtual connected RDM can be migrated to a VMDK while the machine is running. (VMware KB)
Check if the RDM is connected virtual. Edit the VM settings and check compatibility mode of the disk
Start the Storage migration of the virtual machine
Be sure you change the disk mode to Thin or Thick provisioned.
- If you select “Same format as source” then the RMD link file will be moved and NO migration to VMDK will happen.
If needed you can select this setting for each disk (and VMX config file) if you go into the advanced
Change the setting for each individual disk and start the migration
- After the migration check the disk to see it is a VMDK and not a RDM.
Today I was asked to expand a local datastore of a ESXi 4.1. Expanding a disk is normally no problem when you are able to increate the size of the disk. After increasing the disk size you should be able to increate the partition size.
The ESXi was managed by a vCenter 5.0. On the storage adapter I did a RESCAN data stores after the disk size was increased. Then I went into the DATASTORE properties and I saw following
This above view was via a vCenter connection. Then I found following VMware KB which told me to make a direct connection to the ESXi host. After going to into the datastore properties I found out that I could increase.
When I selected this local datastore and finished the expansion I saw following result in the vSphere Client direct to the ESXi and via vCenter.
Lucky for the customer this expansion went OK.
Hopefully if you have this problem this KB article fixes also your problem.
Gert Van Gorp
I get a lot of questions of students and customers about resizing a virtual disk. This is the reason for this blog.
The following procedure will guide you step by step through the process of resizing (increasing) a disk of a virtual machine.
Before you make virtual hardware changes be sure you have taken a full backup of the virtual machine.
NOTE: If you do not want any troubles only increase the disk size. Decreasing can cause loss of data.
Increase Disk using diskpart
Step 1: Edit the virtual machine settings and increase the size of the disk (VMDK).
Step 2: Open the console of this virtual machine and start a command prompt.
Step 3: Start diskpart and execute following steps.
à this gives you a list of the available partitions
select volume x
à select the partition number you want to increase
à this will add the empty disk space into the partition.
Now the partition has increased in size.
NOTE: On Windows 2008 this can be done via the Device Manager / Storage, but I have seen some weird things like showing incorrect partition sizes.
Increase Disk using Third Party tool
Step 1: Be sure you have a boot image (ISO) of the Acronis Disk Director Tool that supports your guest OS.
Step 2: Boot your virtual machine using the boot image ISO. Use the ESC button during booting your virtual machine to activate the “one time boo menu”
Step 3: Select the partition you want to increase and right mouse click on it. Then select “Resize Volume”
Step 4: Increase the disk space of the selected partitions by decreasing the unallocated space to 0
Step 5: After increasing the partition you have to commit the changes.
Step 6: Now you need to reboot your virtual machine after disconnecting the boot image.