VMware Cloud Community
alwaysnodowntim
Enthusiast
Enthusiast

How to do delete RDM (physical mode) mapping file via ESXCLI

I made a big booboo!  I deleted a virtual machine from disk but for got to remove the RDM mapping before I did that.  Now I can no longer see the RDMs when I'm trying to map them to a new vm.  I'm sure this is because the ESX server believes that the RDMs are still mapped to the vm that no longer exists due to the vml file.  How do I delete the mapping file via command line.

Reply
0 Kudos
7 Replies
a_p_
Leadership
Leadership

Do you specifically want to do this via esxcli?

Since the mapping file still exists (if I understand this correctly) you can either add the RDM as an existing virtual disk to a helper VM and then remove it again with the "Delete from disk" option selected or you just delete the mapping file from the datastore browser.

André

Reply
0 Kudos
alwaysnodowntim
Enthusiast
Enthusiast

Yes. I tried that but that won't work because the original datastore is no longer attached or exists.  I unpresented that lun and formatted it. oopsie Smiley Wink   Any other suggestion? Thanks for the help man.

Reply
0 Kudos
a_p_
Leadership
Leadership

I never had such a situation, so the following is more a guess. What I think could work, is to create another mapping file manually on the command line, map it to a VM and then delete it. For how to create the mapping file see http://kb.vmware.com/kb/1026256

André

alwaysnodowntim
Enthusiast
Enthusiast

Thanks! I will try that. If it doesn't work, I will try some other things. Of course there are last result things I could do but would rather not result to just blowing the host away and rebuilding it. I'll let you know.

Reply
0 Kudos
alwaysnodowntim
Enthusiast
Enthusiast

I did find a resolution on this.  Somehow the physical rdm's attached themselves to another vm when I deleted the virtual machine without removing them from the original virtual machines file set at that time.  I know, strange behavior right!? Smiley Happy Anyway, I just removed them from the vm that had it attached the correct way, and then added them to the new virtual machine.

Reply
0 Kudos
alwaysnodowntim
Enthusiast
Enthusiast

Deleted RDMs appeared on another machine. RDMs existed the whole time.

Reply
0 Kudos
jeremychivers
Contributor
Contributor

Hi,

I know this thread is a little old now but after reading it you could have used the config.vpxd.filter.rdmFilter in vCentre in order to overide the detault behaviour which is to hide already mapped RDMs. Once you could see it then you could map the RDM to a VM and then re-apply the filter.

Instructions on how to apply the filters can be found here http://www.yellow-bricks.com/2010/08/11/storage-filters/

Regards

Jeremy

Reply
0 Kudos