VMware Cloud Community
Eichenbaum
Contributor
Contributor

VcHostDatastoreSystem

I'm attempting to resignature a LUN as one step of a larger workflow (being built) that will add the LUN and ultimately import the VMs contained on the LUN. Essentially, a DR swing from one datacenter to another.

I've identified the method VcHostDatastoreSystem.resignatureUnresolved/VmfsVolume_Task() using the API explorer but can't seem to determine how to access VcHostDatastoreSystem and I've found no reference info in searches that address resignature via vCO.

Thoughts/ideas?


Reply
0 Kudos
3 Replies
tschoergez
Leadership
Leadership

Hi,

you can get the VcHostDatastoreSystem from the configManager of an ESXi HostSystem.

So the "path" would be

myEsxHostSystemObject.configManager.datastoreSystem   //with myEsxHostSystemObject of type VcHostSystem.

For these things I recommend to use the webbased vSphere API Reference vSphere 5.5 Documentation Center rather than the API Explorer in vCO, because it shows you the 'this object type is an attribute of these other types'

Cheers,

Joerg

Reply
0 Kudos
Eichenbaum
Contributor
Contributor

I'm back to trying to sort this bit out... few observations/questions...

The below call to method queryAvailableDisks.. works (uses datastoreSystem)

var hostDatastoreSystem = VcPlugin.toManagedObject(vcHost,vcHost.configManager.datastoreSystem);

var allHostDisks = hostDatastoreSystem.queryAvailableDisksForVmfs(null);

As does the below call to medhod queryUnresolved...

var qryUnresolved = hostDatastoreSystem.queryUnresolvedVmfsVolumes();

So shouldn't the call to method resignatureUnresolved... also work?

var task = vcHost.configManager.datastoreSystem.resignatureUnresolvedVmfsVolume_Task();

Instead, I get error:

Attribute xsi:nil not allowed on element resolutionSpec, which is not nillable.

while parsing call information for method ResignatureUnresolvedVmfsVolume_Task
at line 1, column 227

while parsing SOAP body
at line 1, column 213

while parsing SOAP envelope
at line 1, column 38

while parsing HTTP request for method resignatureUnresolvedVmfsVolume
on object of type vim.host.DatastoreSystem
at line 1, column 0 (Workflow:listVMFS / Scriptable task (item0)#7)

Onyx outputs:

// ------- ResignatureUnresolvedVmfsVolume_Task -------

var resolutionSpec = new VcHostUnresolvedVmfsResignatureSpec();

resolutionSpec.extentDevicePath = System.getModule("com.vmware.onyx").array(String, 1);

resolutionSpec.extentDevicePath[0] = "/vmfs/devices/disks/naa.600144f09324421900005266a6550002:1";

managedObject.resignatureUnresolvedVmfsVolume_Task(resolutionSpec); // HostDatastoreSystem

From the Onyx output, would the two resolutionSpec lines be disregarded? Certainly the onyx module wouldn't be required...

If I don't want to specify which volume (eg I don't know the full disk path) can I have it resignature any/all disks it finds?

Reply
0 Kudos
Mzampo
VMware Employee
VMware Employee

Hello

Reply
0 Kudos