Quantcast
Channel: VMware Communities : Discussion List - vSphere Management SDK
Viewing all 1375 articles
Browse latest View live

Personality

$
0
0

Is there any way to customize the personality of a vm by injecting data into its file system at creation phase?

For example,if you want to insert ssh keys, set configuration files, or store data that you want to retrieve from inside the vm.


Creating custom attributes using pyvmomi

$
0
0

Creating a custom attribute using the perl sdk looks like this:

 

 

$customFieldMgr->AddCustomFieldDef(name => $cfkey, moType => 'VirtualMachine'); 


Doing the same in python using pyvmomi creates a traceback:


>>> customFieldMgr.AddCustomFieldDef(name = cfkey, moType = 'VirtualMachine')

Traceback (most recent call last):

  File "<stdin>", line 1, in <module>

  File "pyVmomi/VmomiSupport.py", line 553, in <lambda>

    self.f(*(self.args + (obj,) + args), **kwargs)

  File "pyVmomi/VmomiSupport.py", line 361, in _InvokeMethod

    map(CheckField, info.params, args)

  File "pyVmomi/VmomiSupport.py", line 936, in CheckField

    % (info.name, info.type.__name__, valType.__name__))

TypeError: For "moType" expected type type, but got str

 

 

So whats wrong here?

 

BTW: does someone know a source of examples using pyvmomi?

 

 

Mathias

How to import an ova image using VISDK

$
0
0

I understand that ova is an archive format of the ovf image. Basically it's a tarball of the files in the ovf image. Is there any API in VISDK to take an ova file directly from a remote server? An ova file can be really huge. Assuming the ova file is located on an FTP server. It'd become really inefficient if it requires download the huge ova file before import.

 

 

Thanks!

How to specify entities when calling queryperf

$
0
0

The docs (vSphere Documentation Center) say 'As a general rule, specify between 10 and 50 entities in a single call to the QueryPerf method."

 

How does one attach multiple eneties to queryspec?

 

Thanks in advance,

 

A

retrievepropertiesEx crash if called from multiple threads

$
0
0

Hi Experts,

 

i am using the createpropertycollector to create the propertycollector object. This is per-thread basis.

 

if each thread calls up the  retrieveproperties(...), then there would be crash. How to avoid this ?

 

Is it the problem with the vSphere 5.5 API ?

 

 

Thanks in advance.

 

--

Balaga

Have server to download files

$
0
0

Is it possible to have the vSphere server to download files based on an asynchronos request?

For instance, if I want to create a VM from an external image.

So make a request to vSphere server and pass a url, then have vSphere server to download it.

Vijava as an OSGi bundle

$
0
0

Hi there,

 

Do we have Vijava.jar available as an OSGi-fied bundle that can deployed on the vSphere Web Client?

 

Thanks,

Bhrami

Create VMDK via RDM to iSCSI target using SOAP API

$
0
0

We are attempting to create a vmdk that points to an iSCSI target via a RDM. Our goal is to have this process be 100% automated via the SOAP API, but cannot find the necessary function calls within the API to create the vmdk. We can do so manually by connecting to the ESX host and using the vmkfstools command, but this requires that SSH be enabled on the host and we would definitely prefer not to have to do that. Our hope is that the API would allow us to do the same commands, but does not appear to have support for this use case.

 

 

Is this possible using the API, or is there a different path we could take that would result in the same goal?


vmkfstools through API

$
0
0

I was wondering if there is a way to run vmkfstools through an api call. specifically I need the -r command.

How to get all ESX hosts from a vcenter

$
0
0

Hi, how do you get all esx hosts from a vcenter? I can navigate via MOB (/mob/?moid=HostProfileManager) which lists my clusters and I can then click through on those to see the hosts but I cant work out how to use the api to do this?

 

I dont need code examples just a top level of what method needs to be called will suffice!

 

Thanks

Static iSCSI Target - after rescan, determine /vmfs/devices/disks entry

$
0
0

If I add a static iSCSI target via the command line, and then do a rescan, i can see a new entry appear in /vmfs/devices/disks. This is great, however, very unreliable once more than one static target is added, you would have no idea which disk is associated with which target. Is there a way through either the CLI or API that allows you to see which disk maps to which static target?

 

I am using this to create vmdk's and need to know without a doubt which disk points to which target.

 

Thanks.

RecommendDatastores for Create machine fails with an Internal Server Error Occured: optional value not set

$
0
0

Hi,

I am trying to create a virtual machine in a cluster using a storage pod cluster.
I am getting an error when calling the RecommendDatastores.
The error looks like this:
Internal Server Error Occured: optional value not set
I have no idea what is the value that is missing.

I wonder if you can you give me some pointers or some troubleshooting tips?
Are there any logs that may help?
Should I try to configure the server to use HTTP and spy the SOAP messages?


Code transcript for creating the virtual machine using storage DRS


private void createVMDRS()
        {

            _service = cb.getServiceConnectionV25()._service;
            _sic = cb.getServiceConnectionV25().ServiceContent;
            ManagedObjectReference dcmor = null;
            ManagedObjectReference storagePodmor = null;
            ManagedObjectReference computeResourcemor = null;
            ManagedObjectReference resourcePoolmor = null;
            ManagedObjectReference vmFoldermor = null;

            // get the datacenter and the vm folder
            String dcName = cb.get_option("datacentername");
            if (!string.IsNullOrEmpty(dcName))
            {
                dcmor
                    = cb.getServiceUtilV25().GetDecendentMoRef(null, "Datacenter", dcName);

                if (dcmor == null)
                {
                    Console.WriteLine("Datacenter " + dcName + " not found.");
                    return;
                }
                else
                {
                    //get the vm folder
                    ObjectContent[] objArray = cb.getServiceUtilV25().GetObjectProperties(_sic.propertyCollector, dcmor, new string[] { "vmFolder" });
                    if (objArray.Length > 0)
                    {
                        vmFoldermor = (ManagedObjectReference)objArray[0].propSet[0].val;
                    }
                    else
                    {
                        Console.WriteLine("vmfolder not found.");
                        return;
                    }
                }
            }
            else
            {
                Console.WriteLine("datacentername user option is null or empty!");
                return;
            }

            // get the storage pod
            String storagePodName = cb.get_option("storagepodname");
            if (!string.IsNullOrEmpty(storagePodName))
            {
                storagePodmor = cb.getServiceUtilV25().GetDecendentMoRef(dcmor, "StoragePod", storagePodName);
                if (storagePodmor == null)
                {
                    Console.WriteLine("StoragePod " + storagePodName + " not found");
                    return;
                }
            }
            else
            {
                Console.WriteLine("storagepodname user option is null or empty!");
                return;
            }

            // get the computeresourcename (cluster)
            String computeResourceName = cb.get_option("computeresourcename");
            if (!string.IsNullOrEmpty(computeResourceName))
            {
                computeResourcemor = cb.getServiceUtilV25().GetDecendentMoRef(dcmor, "ClusterComputeResource", computeResourceName);
                if (computeResourcemor == null)
                {
                    Console.WriteLine("ComputeResourceName " + computeResourceName + " not found");
                    return;
                }
                //get the resource pool
                ObjectContent[] objArray = cb.getServiceUtilV25().GetObjectProperties(_sic.propertyCollector, computeResourcemor, new string[] {

"resourcePool" });
                if (objArray.Length > 0)
                {
                    resourcePoolmor = (ManagedObjectReference)objArray[0].propSet[0].val;
                }
                else
                {
                    Console.WriteLine("ResourcePool not found");
                    return;
                }
            }
            else
            {
                Console.WriteLine("computeresourcename user option is null or empty!");
                return;
            }


            // For create machine
            // the  Folder, ConfigSpec, ResourcePool and HostSystem parameters are expected
            // in the StoragePlacementSpec
            StoragePlacementSpec storageSpec = new StoragePlacementSpec();
            storageSpec.type = "create";
            storageSpec.resourcePool = resourcePoolmor;
            storageSpec.folder = vmFoldermor;
        
            // Storage DRS
            storageSpec.podSelectionSpec = new StorageDrsPodSelectionSpec();
            //user selected SDRS pod for the vm
            storageSpec.podSelectionSpec.storagePod = storagePodmor;

            // podSelectionSpec.initialVMConfig
            storageSpec.podSelectionSpec.initialVmConfig = new VmPodConfigForPlacement[1];
            storageSpec.podSelectionSpec.initialVmConfig[0] = new VmPodConfigForPlacement();
            storageSpec.podSelectionSpec.initialVmConfig[0].storagePod = storagePodmor;
            storageSpec.podSelectionSpec.initialVmConfig[0].storagePod.type = "StoragePod";
            storageSpec.podSelectionSpec.initialVmConfig[0].disk = new PodDiskLocator[1];
            storageSpec.podSelectionSpec.initialVmConfig[0].disk[0] = new PodDiskLocator();
            storageSpec.podSelectionSpec.initialVmConfig[0].disk[0].diskId = -48;
            storageSpec.podSelectionSpec.initialVmConfig[0].disk[0].diskBackingInfo = new VirtualDiskFlatVer2BackingInfo();
            ((VirtualDiskFlatVer2BackingInfo)storageSpec.podSelectionSpec.initialVmConfig[0].disk[0].diskBackingInfo).fileName = "";
            ((VirtualDiskFlatVer2BackingInfo)storageSpec.podSelectionSpec.initialVmConfig[0].disk[0].diskBackingInfo).diskMode = "persistent";
            ((VirtualDiskFlatVer2BackingInfo)storageSpec.podSelectionSpec.initialVmConfig[0].disk[0].diskBackingInfo).thinProvisioned = true;
            ((VirtualDiskFlatVer2BackingInfo)storageSpec.podSelectionSpec.initialVmConfig[0].disk[0].diskBackingInfo).eagerlyScrub = false;
        
            // configSpec
            storageSpec.configSpec = new VirtualMachineConfigSpec();
            storageSpec.configSpec.name = cb.get_option("vmname");
            storageSpec.configSpec.version = "vmx-08";
            storageSpec.configSpec.guestId = "windows7Server64Guest";
            storageSpec.configSpec.files = new VirtualMachineFileInfo();
            storageSpec.configSpec.files.vmPathName = "";
            storageSpec.configSpec.numCPUs = 1;
            storageSpec.configSpec.memoryMB = 1024;
            storageSpec.configSpec.firmware = "bios";

            // add devices to the machine
            storageSpec.configSpec.deviceChange = new VirtualDeviceConfigSpec[5];


            // add cd rom
            storageSpec.configSpec.deviceChange[0] = new VirtualDeviceConfigSpec();
            storageSpec.configSpec.deviceChange[0].operation = VirtualDeviceConfigSpecOperation.add;
            storageSpec.configSpec.deviceChange[0].device = new VirtualCdrom();
            storageSpec.configSpec.deviceChange[0].device.key = -44;
            storageSpec.configSpec.deviceChange[0].device.backing = new VirtualCdromRemotePassthroughBackingInfo();
            ((VirtualCdromRemotePassthroughBackingInfo)storageSpec.configSpec.deviceChange[0].device.backing).deviceName = "";
            ((VirtualCdromRemotePassthroughBackingInfo)storageSpec.configSpec.deviceChange[0].device.backing).exclusive = false;
            storageSpec.configSpec.deviceChange[0].device.connectable = new VirtualDeviceConnectInfo();
            storageSpec.configSpec.deviceChange[0].device.connectable.startConnected = false;
            storageSpec.configSpec.deviceChange[0].device.connectable.allowGuestControl = true;
            storageSpec.configSpec.deviceChange[0].device.connectable.connected = false;
            storageSpec.configSpec.deviceChange[0].device.controllerKey = 201;
            storageSpec.configSpec.deviceChange[0].device.unitNumber = 0;


            // add floppy
            storageSpec.configSpec.deviceChange[1] = new VirtualDeviceConfigSpec();
            storageSpec.configSpec.deviceChange[1].operation = VirtualDeviceConfigSpecOperation.add;
            storageSpec.configSpec.deviceChange[1].device = new VirtualFloppy();
            storageSpec.configSpec.deviceChange[1].device.key = -45;
            storageSpec.configSpec.deviceChange[1].device.backing = new VirtualFloppyRemoteDeviceBackingInfo();
            ((VirtualFloppyRemoteDeviceBackingInfo)storageSpec.configSpec.deviceChange[1].device.backing).deviceName = "";
            storageSpec.configSpec.deviceChange[1].device.connectable = new VirtualDeviceConnectInfo();
            storageSpec.configSpec.deviceChange[1].device.connectable.startConnected = false;
            storageSpec.configSpec.deviceChange[1].device.connectable.allowGuestControl = true;
            storageSpec.configSpec.deviceChange[1].device.connectable.connected = false;


            storageSpec.configSpec.deviceChange[2] = new VirtualDeviceConfigSpec();
            storageSpec.configSpec.deviceChange[2].operation = VirtualDeviceConfigSpecOperation.add;
            storageSpec.configSpec.deviceChange[2].device = new VirtualLsiLogicSASController();
            storageSpec.configSpec.deviceChange[2].device.key = -46;
            ((VirtualLsiLogicSASController)storageSpec.configSpec.deviceChange[2].device).busNumber = 0;
            ((VirtualLsiLogicSASController)storageSpec.configSpec.deviceChange[2].device).sharedBus = VirtualSCSISharing.noSharing;


            // add network
            storageSpec.configSpec.deviceChange[3] = new VirtualDeviceConfigSpec();
            storageSpec.configSpec.deviceChange[3].operation = VirtualDeviceConfigSpecOperation.add;
            storageSpec.configSpec.deviceChange[3].device = new VirtualE1000();
            storageSpec.configSpec.deviceChange[3].device.key = -47;
            storageSpec.configSpec.deviceChange[3].device.backing = new VirtualEthernetCardNetworkBackingInfo();
            ((VirtualEthernetCardNetworkBackingInfo)storageSpec.configSpec.deviceChange[3].device.backing).deviceName = "VM Network SQA";
            storageSpec.configSpec.deviceChange[3].device.connectable = new VirtualDeviceConnectInfo();
            storageSpec.configSpec.deviceChange[3].device.connectable.startConnected = true;
            storageSpec.configSpec.deviceChange[3].device.connectable.allowGuestControl = true;
            storageSpec.configSpec.deviceChange[3].device.connectable.connected = true;
            ((VirtualE1000)storageSpec.configSpec.deviceChange[3].device).addressType = "generated";
            ((VirtualE1000)storageSpec.configSpec.deviceChange[3].device).wakeOnLanEnabled = true;


            // add disk
            storageSpec.configSpec.deviceChange[4] = new VirtualDeviceConfigSpec();
            storageSpec.configSpec.deviceChange[4].operation = VirtualDeviceConfigSpecOperation.add;
            storageSpec.configSpec.deviceChange[4].fileOperation = VirtualDeviceConfigSpecFileOperation.create;
            storageSpec.configSpec.deviceChange[4].device = new VirtualDisk();
            ((VirtualDisk)storageSpec.configSpec.deviceChange[4].device).capacityInKB = 1048576;
            storageSpec.configSpec.deviceChange[4].device.key = -48;
            storageSpec.configSpec.deviceChange[4].device.controllerKey = -46;
            storageSpec.configSpec.deviceChange[4].device.unitNumber = 0;
            storageSpec.configSpec.deviceChange[4].device.backing = new VirtualDiskFlatVer2BackingInfo();
            ((VirtualDiskFlatVer2BackingInfo)storageSpec.configSpec.deviceChange[4].device.backing).fileName = "";
            ((VirtualDiskFlatVer2BackingInfo)storageSpec.configSpec.deviceChange[4].device.backing).diskMode = "persistent";
            ((VirtualDiskFlatVer2BackingInfo)storageSpec.configSpec.deviceChange[4].device.backing).thinProvisioned = true;
            ((VirtualDiskFlatVer2BackingInfo)storageSpec.configSpec.deviceChange[4].device.backing).eagerlyScrub = false;


            // get recommened datastores call throws an error
           // The error looks like this:
          // Internal Server Error Occured: optional value not set
           StoragePlacementResult storagePlacementRes = _service.RecommendDatastores(_sic.storageResourceManager, storageSpec);
           if (storagePlacementRes.recommendations.Length > 0 )
           {
               string[] key = new String[1];
               key[0] =  storagePlacementRes.recommendations[0].key;
               _service.ApplyStorageDrsRecommendation_Task(_sic.storageResourceManager, key);
           }
           return;

}

 

I am attaching a zip file with a small example.
I created the example by modifying the vm create example in SDK samples C#.

I tried a few variations of the example above.
I read in the documentation that I should specify the HostSystem.

 

1- I tried to add the HostSystem and I set it to reference the compute cluster.
When I do that I get an error that looks like this:
A specified parameter was not correct.
Storage DRS placement: target host vim.ClusterComputeResource:domain-c26 not connected to pod TestDatastoreCluster

 

2- I tried to add the HostSystem and I set it to reference an host in the cluster instead of the cluster.
When I do that I still get the error:
Internal Server Error Occured: optional value not set

Other ideas?

I tried using the same API RecommendDatastores and ApplyStorageDrsRecommendation_Task
to clone an existing machine using storage DRS. That worked fine. That example is also included in
the zipfile.

 

 

Thanks,

 

Teresa.


Error while Provisioning a VM on Datastore Cluster

$
0
0

Hi, I'm trying to create virtual machine on datastore cluster using  Java API, however I'm getting the following error on the invocation of  "RecommendDatastores" method

 

"A general system error occurred: optional value not set"

 

I'm  not sure what am I missing here, api is not returning the clear  message/error, it seems very ambigous message, how do I know which value  is not set?

Following is the code snippet I'm trying with.

 

 

 

               //This is the storage pod where I want to create a VM

               ManagedObjectReference storagePod = new ManagedObjectReference();
               storagePod.set_value("group-p303");
               storagePod.setType("StoragePod");
              
               StorageDrsVmConfigInfo vmconfigInfo = new StorageDrsVmConfigInfo();
               vmconfigInfo.setBehavior(StorageDrsPodConfigInfoBehavior._automated);
              
               VmPodConfigForPlacement vmPodConfig = new VmPodConfigForPlacement();
               vmPodConfig.setStoragePod(storagePod);
               vmPodConfig.setVmConfig(vmconfigInfo);
              

               //Storage Pod Sslection spec
               StorageDrsPodSelectionSpec storageSelSpec = new StorageDrsPodSelectionSpec();
               storageSelSpec.setStoragePod(storagePod);
               storageSelSpec.setInitialVmConfig(new VmPodConfigForPlacement[]{vmPodConfig});
              


               //Storage Placement spec              
               StoragePlacementSpec placementSpec = new StoragePlacementSpec();
               placementSpec.setConfigSpec(spec);
               placementSpec.setPodSelectionSpec(storageSelSpec);
               placementSpec.setType(StoragePlacementSpecPlacementType._create);
               placementSpec.setFolder(vmFolderMor);
               placementSpec.setHost(hostMOR);
               placementSpec.setResourcePool(poolMOR);                 
              
                 StoragePlacementResult placementRes =  service.recommendDatastores(sic.getStorageResourceManager(),  placementSpec);
                task =  service.applyStorageDrsRecommendationToPod_Task(sic.getStorageResourceManager(),  storagePod/*Storage POD MOR*/,  placementRes.getRecommendations(0).getKey());

I read  through the API documentation, for me it looks like whatever is required  is being set.My virtual machine spec has the VMName and its file info  set. I'm not sure what is missing here, could some one help to find out.

 

In  the above snippet "vmconfigInfo" and "vmPodConfig" are set later in the  hopes to resolve the issue, however no luck. Appreciate any quick help.

 

Thanks,

Parash

Dell PowerEdge R420 and ESXi 5.0 VM libraries.

$
0
0

Recently I had a motherboard issue on a Dell PowerEdge R420, Dell came in and replaced the motherboard.  However after that here are the things that happened.  The root password reverted back to default, which I expected.  The bigger issue I saw was the ESXi library had lost all the VMs that were listed/built, but the datastore was there so it was easy to reload the VMs into the library.  My question is why would the library lose the VMs listed by changing the motherboard?

 


Disabling and enabling methods on managed entities

$
0
0

The ManagedEntity object has a disabledMethods field (see http://pubs.vmware.com/vsphere-55/topic/com.vmware.wssdk.apiref.doc/vim.ManagedEntity.html) that lists disabled methods that are blocked on this specific managed entity.

 

I have found some links online (e.g. http://kb.vmware.com/kb/2008957) indicating that VC extensions / solutions can disable and enable methods on specific managed objects, but I've been unable to figure out how to do this.

 

Can anyone describe how one would go about disabling specific methods on managed entities (either through the API or by implementing an extension / solution)?


Starting to learn the SDK... need some help getting the demos working

$
0
0

Hello,

 

     I have had a decent amount of experience working with PowerCLI, but there has been a recent need to pick up the Java SDK. I am running Windows 7 and have downloaded JDK 7, and the SDK package from my local ESXi server, but am having some issues running the examples. Here is some output that has me scratching my head:

 

c:\SDK\JAXWS>run.bat Connect --username eshen --password mypassword --url https://myserver/sdk

WARNING: Java is now set to trust all SSL certificates.

-- VMware samples in Java --

The server at https://usyp-vctr55.kingstonlab.corp:7444/ims/STSService did not respond as expected. Is this a valid URL?Note: SSO connections only work on vCenter SSO enabled products.

Use the --basic-connection switch if you know this is an ESX host.

See the connection.properties file for more instructions.

No valid connection available. Exiting now.

Done.

 

 

It seems like changing the url around a bit always ends up redirectiong to the :7444/ims/STSService address.

When I go to that address, something does pop up, with the source code as follows:

 

<html>
<head><title>
Web Services
</title></head>
<body>
<h1>Web Services</h1>
<table width='100%' border='1'>
<tr>
<td>
Endpoint
</td>
<td>
Information
</td>
</tr>
<tr>
<td>
<table border="0"><tr><td>Service Name:</td><td>{http://docs.oasis-open.org/ws-sx/ws-trust/200512/wsdl}STSService</td></tr><tr><td>Port Name:</td><td>{http://docs.oasis-open.org/ws-sx/ws-trust/200512/wsdl}STSService_Port</td></tr></table>
</td>
<td>
<table border="0"><tr><td>Address:</td><td>https://usyp-vctr55.kingstonlab.corp:7444/sts/STSService</td></tr><tr><td>WSDL:</td><td><a href="https://usyp-vctr55.kingstonlab.corp:7444/sts/STSService?wsdl">https://usyp-vctr55.kingstonlab.corp:7444/sts/STSService?wsdl</a></td></tr><tr><td>Implementation class:</td><td>com.vmware.identity.sts.ws.StsServiceImpl</td></tr></table>
</td>
</tr>
</table>
</body>

</html>

 

 

Can anyone run into a similar issue when starting to learn the SDK?

SRM 5.0 API - Unable to Initiate Recovery Plan.

$
0
0

Forgive me if this is posted in the wrong forum but there doesn't appear to be one specifically for the SRM API.

 

So I've downloaded the WSDL files and compiled them to a C# dll and been able to successfully import them into a project. Using some of the example code in the SDK I was able to connect and retrieve Recovery Plans from my SRM instance but I was unable to initate a test or the actual plan itself. The error given in the vSphere client is "Unable to start the requested operation. Another operation might be in progress".

 

Checking the SRM logs I found this:

 

2012-01-19T14:31:39.502+11:00 [01708 verbose 'ExtApiSoapAdapter.HTTPService'] User agent is 'Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client Protocol 4.0.30319.1)'
2012-01-19T14:31:39.720+11:00 [01708 verbose 'ExtApiSoapAdapter.HTTPService'] HTTP Response: Complete (processed 515 bytes)
2012-01-19T14:31:39.720+11:00 [01708 verbose 'ExtApiSoapAdapter.HTTPService'] User agent is 'Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client Protocol 4.0.30319.1)'
2012-01-19T14:31:39.939+11:00 [02976 verbose 'ExtApiSoapAdapter.HTTPService'] HTTP Response: Complete (processed 675 bytes)
2012-01-19T14:31:39.939+11:00 [02976 verbose 'ExtApiSoapAdapter.HTTPService'] User agent is 'Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client Protocol 4.0.30319.1)'
2012-01-19T14:31:40.157+11:00 [02976 verbose 'ExtApiSoapAdapter.HTTPService'] HTTP Response: Complete (processed 675 bytes)
2012-01-19T14:31:40.157+11:00 [04744 verbose 'ExtApiSoapAdapter.HTTPService'] User agent is 'Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client Protocol 4.0.30319.1)'
2012-01-19T14:31:40.360+11:00 [03568 info 'Recovery' opID=2d41a360] Starting test workflow for plan 0B462228 'Recovery.' (perform sync)
2012-01-19T14:31:40.360+11:00 [03568 verbose 'PropertyProvider' opID=2d41a360] RecordOp ASSIGN: task, recovery-plan-3147
2012-01-19T14:31:40.360+11:00 [03568 info 'DrTask' opID=2d41a360] Starting task 'dr.recovery.RecoveryManager.test23'
2012-01-19T14:31:40.360+11:00 [04744 verbose 'ExtApiSoapAdapter.HTTPService'] HTTP Response: Complete (processed 399 bytes)
2012-01-19T14:31:40.360+11:00 [02976 info 'Recovery' ctxID=6f54b0ee opID=2d41a360] Running test workflow; plan id: recovery-plan-3147
2012-01-19T14:31:40.360+11:00 [02976 info 'Recovery' ctxID=6f54b0ee opID=2d41a360] Plan found, plan id: recovery-plan-3147, name: Recovery.
2012-01-19T14:31:40.360+11:00 [02976 error 'Recovery' ctxID=6f54b0ee opID=2d41a360] Plan recovery-plan-3147 is in an incorrect state, cannot run test workflow (current state: readySending)
2012-01-19T14:31:40.360+11:00 [02976 error 'Recovery' ctxID=6f54b0ee opID=2d41a360] Plan 'Recovery.' failed: (dr.recovery.fault.InvalidRecoveryState) {
[#10] -->    dynamicType = <unset>,
[#10] -->    faultCause = (vmodl.MethodFault) null,
[#10] -->    fromState = "readySending",
[#10] -->    toState = "testInProgress",
[#10] -->    msg = "",
[#10] --> }
2012-01-19T14:31:40.360+11:00 [02976 trivia 'Recovery' ctxID=6f54b0ee opID=2d41a360] Clearing recovery task dr.recovery.RecoveryManager.test23
2012-01-19T14:31:40.360+11:00 [02976 verbose 'PropertyProvider' ctxID=6f54b0ee opID=2d41a360] RecordOp ASSIGN: task, recovery-plan-3147
2012-01-19T14:31:40.360+11:00 [02976 verbose 'PropertyProvider' ctxID=6f54b0ee opID=2d41a360] RecordOp ASSIGN: info.stateInfo.state, recovery-plan-3147
2012-01-19T14:31:40.360+11:00 [02976 verbose 'PropertyProvider' ctxID=6f54b0ee opID=2d41a360] RecordOp ASSIGN: info.stateInfo.cancelingOperation, recovery-plan-3147
2012-01-19T14:31:40.360+11:00 [02976 verbose 'PropertyProvider' ctxID=6f54b0ee opID=2d41a360] RecordOp ASSIGN: info.stateInfo.waitingForUserInput, recovery-plan-3147
2012-01-19T14:31:40.360+11:00 [02976 info 'DrTask' ctxID=6f54b0ee opID=2d41a360] Task 'dr.recovery.RecoveryManager.test23' failed with error: (dr.recovery.fault.InvalidRecoveryState) {
[#10] -->    dynamicType = <unset>,
[#10] -->    faultCause = (vmodl.MethodFault) null,
[#10] -->    fromState = "readySending",
[#10] -->    toState = "testInProgress",
[#10] -->    msg = "",
[#10] --> }
2012-01-19T14:31:40.360+11:00 [02976 verbose 'PropertyProvider' ctxID=6f54b0ee opID=2d41a360] RecordOp ASSIGN: info.error, dr.recovery.RecoveryManager.test23
2012-01-19T14:31:40.360+11:00 [02976 info 'DrTask' ctxID=6f54b0ee opID=2d41a360] Work for task 'dr.recovery.RecoveryManager.test23' completed - new state 'error'
2012-01-19T14:31:40.360+11:00 [02976 verbose 'PropertyProvider' ctxID=6f54b0ee opID=2d41a360] RecordOp ASSIGN: info.state, dr.recovery.RecoveryManager.test23
2012-01-19T14:31:40.360+11:00 [02976 verbose 'PropertyProvider' ctxID=6f54b0ee opID=2d41a360] RecordOp ASSIGN: info.completeTime, dr.recovery.RecoveryManager.test23
2012-01-19T14:31:40.360+11:00 [02976 verbose 'PropertyProvider' ctxID=6f54b0ee] RecordOp ASSIGN: info.progress, dr.recovery.RecoveryManager.test23
2012-01-19T14:31:40.360+11:00 [02976 verbose 'DrTask' opID=2d41a360] Starting VC task 'com.vmware.vcDr.dr.recovery.RecoveryManager.test'
2012-01-19T14:31:40.376+11:00 [00428 verbose 'RecoveryVMODL' ctxID=6f54b0ee opID=7ba5054a] RemotePlanUpdated: [remote recovery-plan-3145]
2012-01-19T14:31:40.376+11:00 [00428 info 'RecoveryVMODL' ctxID=6f54b0ee opID=7ba5054a] RemotePlanUpdated: Updating existing plan
2012-01-19T14:31:40.376+11:00 [00428 trivia 'Folders' ctxID=6f54b0ee opID=7ba5054a] No rename involved in reconfigure of plan Recovery.
2012-01-19T14:31:40.376+11:00 [00428 verbose 'Recovery' ctxID=6f54b0ee opID=7ba5054a] Sync: reflected update:  Local versions: (1,1) Remote versions: (1,0).
2012-01-19T14:31:40.376+11:00 [00428 verbose 'Recovery' ctxID=6f54b0ee opID=7ba5054a] UpdateFromRemoteDelta[recovery-plan-3147] Not a peer update, ignoring delta
2012-01-19T14:31:40.391+11:00 [04748 verbose 'DrTask' opID=2d41a360] Created VC task 'com.vmware.vcDr.dr.recovery.RecoveryManager.test:task-109'
2012-01-19T14:31:40.391+11:00 [00428 verbose 'DrTask' opID=2d41a360] Failing task 'com.vmware.vcDr.dr.recovery.RecoveryManager.test:task-109'
2012-01-19T14:31:40.391+11:00 [04748 warning 'DrTask'] SetProgress failed for task 'com.vmware.vcDr.dr.recovery.RecoveryManager.test:task-109': (vim.fault.InvalidState) {
-->    dynamicType = <unset>,
-->    faultCause = (vmodl.MethodFault) null,
-->    msg = "The operation is not allowed in the current state.",
--> }
Now I watched that field in the database (pdr_planproperties table, state column) and when I initiated the plan through there this column didn't change at all throughout the process. I did notice that there were 2 ways of invoking the plan (the old 1.0 API way and the 5.0 way) however I've tried both and they give the same result.
Here's my code for reference:
          
            ServiceRef = new ManagedObjectReference();
            ServiceRef.type = "SrmServiceInstance";
            ServiceRef.Value = "SrmServiceInstance";
            Service = new SrmService();
            Service.Url = "https://core-srm01:9007";
            Service.Timeout = 600000;
            Service.CookieContainer = new CookieContainer();
            ServicePointManager.ServerCertificateValidationCallback += new System.Net.Security.RemoteCertificateValidationCallback(CertOverride);
            ServiceInstanceContent = Service.RetrieveContent(ServiceRef);
            Service.SrmLoginLocale(ServiceRef, "Administrator", "Password01", null);
            ManagedObjectReference[] Plans = Service.ListPlans(ServiceInstanceContent.recovery);
            foreach (ManagedObjectReference Ref in Plans)
            {
                SrmRecoveryPlanInfo Plan = Service.RecoveryPlanGetInfo(Ref);
                textBox1.Text += (Plan.name + " " + Plan.description + " " + Plan.state);
            }
            SrmRecoveryPlanInfo InitiatePlan = Service.RecoveryPlanGetInfo(Plans[0]);
            InitiatePlan.state = SrmRecoveryPlanRecoveryState.protecting;
            //Service.Start(Plans[0], SrmRecoveryPlanRecoveryMode.test);
            Service.RecoveryPlanStart(ServiceInstanceContent.srmApi, InitiatePlan.name, SrmApiRecoveryMode.test);
With all this in mind I've got the feeling that there's a bug in the SRM API which tries to set the state causing the process to fail. If there's another way to initiate the plan I'll give that a go but as of yet I've been unable to find one.
Thanks for your help with this!

datastore performance from ESXTOP

$
0
0



Hi,


What elements from esxtop do I have to aggregate to see the performance by datastore?


Thanks,



A

Unable to customize Windows during cloning.

$
0
0

I can successfully clone a new Windows VM from a Win 2008 R2 template. However, when I use the following code to customize the VM. It shows the following error message: "A specified parameter was not correct. hostname"

 

The code I am using are:

private CustomizationSpec getCustomizationWindowsSpec() throws Exception { CustomizationSpec customizationSpec = new CustomizationSpec(); CustomizationIdentification id = new CustomizationIdentification(); CustomizationPassword domainAdminPass = new CustomizationPassword(); domainAdminPass.setValue("password"); id.setDomainAdmin("username"); id.setDomainAdminPassword(domainAdminPass); id.setJoinDomain("domain.com"); CustomizationUserData userData = new CustomizationUserData(); CustomizationName name = new CustomizationName(); name.setDynamicType("computername"); userData.setOrgName("compname"); userData.setFullName("admin"); userData.setComputerName(name); userData.setProductId("XXXXX-XXXXX-XXXXX-XXXXX-XXXXX"); CustomizationSysprep custWindowsPrep = new CustomizationSysprep(); custWindowsPrep.setIdentification(id); custWindowsPrep.setUserData(userData); CustomizationGuiUnattended guiUnattended = new CustomizationGuiUnattended(); guiUnattended.setAutoLogon(true); guiUnattended.setAutoLogonCount(1); guiUnattended.setTimeZone(190); custWindowsPrep.setGuiUnattended(guiUnattended); CustomizationDhcpIpGenerator fixIp = new CustomizationDhcpIpGenerator(); CustomizationIPSettings ipSettings = new CustomizationIPSettings(); ipSettings.setIp(fixIp); CustomizationAdapterMapping adapterMapping = new CustomizationAdapterMapping(); adapterMapping.setAdapter(ipSettings); customizationSpec.setIdentity(custWindowsPrep); customizationSpec .setGlobalIPSettings(new CustomizationGlobalIPSettings()); customizationSpec.getNicSettingMap().add(adapterMapping); return customizationSpec; }

 

I can't figure out what is wrong. Anyone please help T_T?

Deploying Windows 2012 R2 virtual machine from template fails with error: Windows could not finish configuring the system. To attempt to resume configuration, restart the computer

$
0
0

We have a ESX1 5.5 installed. Deployment of Windows 2012 R2 virtual template fails to deploy on this ESX with the error "Windows could not finish configuring the system. To attempt to resume configuration, restart the computer"

Does anyone have any idea. We need resolution for this asap.

 

thanks in advance.

Viewing all 1375 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>