VMware Cloud Community
luderitz
Enthusiast
Enthusiast
Jump to solution

Trying to re-signature and mount a datastore

Hi all,

I'm stuck trying to develop a workflow and hoping you can help. We need to make a daily DR copy of a production database and mount that copy on another VM. The database lives on a .vmdk with its own LUN and is heavily utilized, so we can only suspend writes for a couple of minutes.


Here's the high level workflow:

  1. Suspend writes to the database
  2. Create a virtual copy (snapshot) of the LUN on our 3PAR
  3. Resume database writes
  4. Export (present) the virtual copy from the 3PAR to the ESXi cluster
  5. Re-scan storage on all hosts in the cluster
  6. Add the LUN and re-signature the datastore
  7. Mount the VMDK from the new LUN to the test VM

I'm struggling a bit to make the ESXi portion work. I can successfully re-scan the storage on my hosts, but I'm not able to mount and re-signature the newly discovered datastore. Onyx is telling me to use resignatureUnresolvedVmfsVolume_Task but the action fails with “TypeError: Cannot find function resignatureUnresolvedVmfsVolume_Task in object DynamicWrapper (Instance) : [VcHostSystem]-[class com.vmware.vmo.plugin.vi4.model.VimHostSystem]" I'm running vRO/vCO 5.5.2 and don't have the vi4 library installed nor do I have any actions that will re-signature a volume.

So I'm wondering, has ResignatureUnresolvedVmfsVolume_Task been deprecated and replaced by something else? Or does anyone know of a library/plugin I can add to vRO that will give me the ability to re-signature a datastore?

Thank you in advance for any assistance.

Cheers!

Matt Bradford @vmspot www.vmspot.com
Reply
0 Kudos
1 Solution

Accepted Solutions
iiliev
VMware Employee
VMware Employee
Jump to solution

Hi,

From the error message, it seems that you are trying to call resignatureUnresolvedVmfsVolume_Task() method on object of type VcHostSystem; something like that

var task = hostSystem.resignatureUnresolvedVmfsVolume_Task(spec);

The problem is that resignatureUnresolvedVmfsVolume_Task() is not a method in type VcHostSystem, but in type VcHostDatastoreSystem, hence you get this error.

To fix it, you have to get an object of type VcHostDatastoreSystem. Looking in the API Explorer, you should be able to get VcHostDatastoreSystem object from VcHostSystem object via configManager property (which returns object of type VcHostConfigManager) and then datastoreSystem property. Something like the following code:

var task = hostSystem.configManager.datastoreSystem.resignatureUnresolvedVmfsVolume_Task(spec);

I don't have a suitable environment to test it but it should work.

Hope this helps.

View solution in original post

Reply
0 Kudos
3 Replies
iiliev
VMware Employee
VMware Employee
Jump to solution

Hi,

From the error message, it seems that you are trying to call resignatureUnresolvedVmfsVolume_Task() method on object of type VcHostSystem; something like that

var task = hostSystem.resignatureUnresolvedVmfsVolume_Task(spec);

The problem is that resignatureUnresolvedVmfsVolume_Task() is not a method in type VcHostSystem, but in type VcHostDatastoreSystem, hence you get this error.

To fix it, you have to get an object of type VcHostDatastoreSystem. Looking in the API Explorer, you should be able to get VcHostDatastoreSystem object from VcHostSystem object via configManager property (which returns object of type VcHostConfigManager) and then datastoreSystem property. Something like the following code:

var task = hostSystem.configManager.datastoreSystem.resignatureUnresolvedVmfsVolume_Task(spec);

I don't have a suitable environment to test it but it should work.

Hope this helps.

Reply
0 Kudos
luderitz
Enthusiast
Enthusiast
Jump to solution

Hi Ilian,

That worked perfectly and I think I understand how you arrived at the correct answer as well.

Many thanks!!

Matt Bradford @vmspot www.vmspot.com
Reply
0 Kudos
harsha219
Enthusiast
Enthusiast
Jump to solution

This works if we want to do a resignature operation, how do we create datastore on the LUN and keep existing signature? do we specify any param or something?

Reply
0 Kudos