Quantcast
Channel: VMware Communities : All Content - vSphere Management SDK
Viewing all 1860 articles
Browse latest View live

How to add an item to "Tasks (Console)" of vSphere Web Client

$
0
0

Hi all,

 

I am a total newbie in VMware SDK developing. I am trying to track action progress for my extension (plugin) using the Task Console but I could not find any sample code to help. I tried to piece the following code together but it was not working (no errors either). I am using vSphere Web Client version 6.0.

 

        ServiceContent service = getServiceContent(serverGuid)

        // create task manager

        // ManagedObjectReference taskMgrRef = service.getTaskManager();

        // create scheduled task manager

        ManagedObjectReference scheduledTaskMgrRef = service.getScheduledTaskManager();

      

        // root folder

        ManagedObjectReference rootFolder = service.getRootFolder();

      

        // create scheduled task

        ScheduledTaskSpec scheduledTaskSpec = new ScheduledTaskSpec();

        scheduledTaskSpec.setName("TEST_SCHEDULE");

        scheduledTaskSpec.setEnabled(Boolean.TRUE);

        scheduledTaskSpec.setDescription("addAppliance-scheduledTask");

        // set action

        CreateTaskAction action = new CreateTaskAction();

        action.setTaskTypeId("TEST_SCHEDULE_sampletask");

        scheduledTaskSpec.setAction(action);

        // set scheduler

        OnceTaskScheduler onceTaskScheduler = new OnceTaskScheduler();

        scheduledTaskSpec.setScheduler(onceTaskScheduler);

        // set scheduler

        OnceTaskScheduler onceTaskScheduler = new OnceTaskScheduler();

        scheduledTaskSpec.setScheduler(onceTaskScheduler);

      

        ManagedObjectReference scheduledTask = null;

        try {

              scheduledTask = _vimPort.createObjectScheduledTask(cheduledTaskMgrRef, rootFolder, scheduledTaskSpec);

        } catch (DuplicateNameFaultMsg | InvalidNameFaultMsg | RuntimeFaultFaultMsg e) {

                                                                                                            
             String errorMessage =                                 String.format( 
    "An Exception Occurred while getCustomFieldDefs " +
    "in addDatastore call, details - %s.",
    e.getMessage());
                                                                      
      logger.log(Level.SEVERE, errorMessage);
      throw new VMwareRequestException(errorMessage);
      }  

 

  

 

Is there anything wrong in the code? I am also confused that should I use task manager or scheduled task manager?

Could anybody help me on that?

Thanks in advance!


How to get IP address of vCenter Server?

$
0
0

I want to get IP address of vCenter Server from my plugin. But from vimObjectReferenceService, I only can get host name of vCenter Server (something like vc01.example.local). Is there anyway to get IP address of vCenter Server? Thank you!

lock vsepehe

$
0
0

Hello

we used vcenter server lock it

We removed it vcenter

but not unlock server on vcenter

now we can not login to vSphere it massage locked

please help me

Can i upload a file in DataStoreBrower with vSphere Web Service Api For Java?

How to create a VI 2.5 client plugin

$
0
0

This is not a replacement for the white paper I am writing that describes VI client plugin development. Consider this a "BSG: Razor" tactic. Yes, the real product is coming, this is just to tide you over

 

To create a VI client plugin you just need to build a .NET library assembly (as opposed to an EXE). Your assembly should reference the following VMware assemblies (by default found in "C:\Program Files\VMware\Infrastructure\Virtual Infrastructure Client\2.5\")

 

- TransportInterfaces.25.dll

- VimSoapService.25.dll

- VimSoapService.25.XmlSerializers.dll

- *VIPlugins.dll

- VirtualInfrastructure.25.dll

- VpxClient.SSPI.dll

 

VIPlugins.dll is the only assembly required, but the plugin you are creating would be pretty bland if you did not reference the rest of the above assemblies.

 

Your assembly should have at least one class that implements the following interface defined in VIPlugins.dll: VMware.VIClient.Plugins.Plugin. Implementing that interface requires your class to implement the following methods:

 

- void Load( VMware.VIClient.Plugins.VIApp viApp )

- void Unload()

 

You could go ahead and compile your assembly, place it and its dependencies in a directory under (by default) "C:\Program Files\VMware\Infrastructure\Virtual Infrastructure Client\Plugins\" and it will show up in the VI client plugin manager.

 

You may be asking yourself, is that it? Hardly. However, the rest of the explanation is at this time best left to code comments. Please visit http://www.lostcreations.com/code/browser/trunk/vmware/viplugins/SVMotion/SVMotion/SVMotionPlugin.cs to see a syntax-colored view of the SVMotion plugin. The code is thoroughly documented and should tell you everything you need to know to write a basic VI client plugin.

 

Hope this helps!

 

Update


I stupidly let lostcreations.com expire, and someone is now squatting on it for $2500. I don't have that money to buy a domain back for sentimental purposes. To that end, I'm attaching the VI Plug-ins Guide for historical purposes.

VSphere Java SDK: How to get the time when Virtual Machine was powered off

$
0
0

VSphere Java SDK: How to get the time when Virtual Machine was powered off

 

For getting Powered on Time, I am using

 

vm.getRuntime().getBootTime().getTime();

 

Problem is as per VM docs bootTime property is erased when Machine State changes from Powered on to off.

 

I tried using recent tasks but vm.getRecentTasks() is not returning any thing.

 

VM here means Virtual Machine Object

How to get VirtualMachine moid

$
0
0

I just started working with the MOB and learning about MOID's. I was hoping to get the VirtualMachine MOID. We have ESXi hosts with free license. Any way to get this? I just want to execute VirtualMachine.Interact.PowerOn and .Suspend.

 

Example:

https://balvmware1/mob/?moid=VirtualMachine

 

Any ideas? Or is this justs available via vcenterserver?

Get specific folder when there are multiple folders with the same name

$
0
0

Hi.

 

I'm trying to resolve a similar issue as described here:

Folder by Path - LucD notes

 

However, I'm trying to use the vSphere API to resolve the issue.

 

Trying to run the following code will display "Not found" when it's trying to find "UniqueFolderName" because FindEntityView will select the "wrong" "CommonFolderName" folder through the the first iteration of the loop.

 

In my environment, there's a "CommonFolderName" at the root Ievel and then another "CommonFolderName" that exists in a different folder at the second-level. l expected FindEntityView to select the "CommonFolderName" at the root level but it's actually selecting the one at the other level.

 

void Main()
{    VimClient client = new VimClient();    client.Login("https://vcenter/sdk/vimService", "username", "password");    string hierarchyPath = "CommonFolderName/UniqueFolderName";    Folder folder = GetFolder(client, null, hierarchyPath);    if (folder == null)    {        Console.WriteLine("Not found");    }    else    {        Console.WriteLine("Found");    }
}



private Folder GetFolder(VimClient client, ManagedObjectReference parent, string hierarchyPath)
{
    Folder folder = null;    string[] parts = new string[] { null };    if (hierarchyPath != null)    {        parts = hierarchyPath.Split(new[] { '/', '\\' });    }    foreach (string part in parts)    {        NameValueCollection folderFilter = null;        if (part != null)        {           folderFilter = new NameValueCollection { { "name", part } };        }        Folder folderPart = (Folder)client.FindEntityView(typeof(Folder), parent, folderFilter, null);        if (folderPart == null)        {            // failed to find folder            return null;        }        folder = folderPart;        parent = folderPart.MoRef;    }    return folder;
}

 

Any ideas?

 

Thank you.


Hello, I have a question about creating users or groups in vCenter Server

$
0
0

Firstly, my main programming language is Java.

Do you guys know how to create a user or group in the vCenter Server instead of ESXi server which to be needed to use HostLocalAccountManager class from vim25

The vCenter Server which holds all the local users and groups refuses to return useful information except of NULL when I invoke HostLocalAccountManager class.

My vCenter Server runs on Linux and its version is 6.0.

I want to create users,groups as I do in vSphere Web Client at the corner of Users and Groups under the Single Sign-On tab which locates in Administration.

I really appreciate your help if you show me the way to deal with it.

Have a nice day!

I have some question about creating users or groups in vSphere Center Server

$
0
0

Firstly, my main programming language is Java.

Do you guys know how to create a user or group in the vCenter Server instead of ESXi server which to be needed to use HostLocalAccountManager class from vim25

The vCenter Server which holds all the local users and groups refuses to return useful information except of NULL when I invoke HostLocalAccountManager class.

My vCenter Server runs on Linux and its version is 6.0.

I want to create users,groups as I do in vSphere Web Client at the corner of Users and Groups under the Single Sign-On tab which locates in Administration.

I really appreciate your help if you show me the way to deal with it.

Have a nice day!

How can I control the vSphere API version?

$
0
0

We have recently upgraded to vSphere 6.0

I failed to access the vSphere 6.0 specific API calls.

According to the documentation, the property that we need to configure for enabling/disabling vSphere HA VM Component Protection service is:

ClusterDasConfigInfo.vmComponentProtecting (disabled/enabled)

This property does exist in the vSphere web services SDK/API version 6.0.2 API, however when we run the code we get an exception that says:

Method not found: 'System.String Vim25Api.ClusterDasConfigInfo.get_vmComponentProtecting()'.

After running the code with a debugger I’ve realized that dynamically the ClusterDasConfigInfo object doesn’t have the vmComponentProtecting property.

However, it does contains the vmMonitoring property and other properties of older versions of vSphere API.

 

I've suspected that, from some reason I'm using a lower API version, so I've checked the AboutInfo object.

This is what I found:

AboutInfo.apiVersion="6.0"

AboutInfo.build="5112529"

AboutInfo.sessioninfo.fullName=VMware vCenter Server 6.0.0 build-5112529

 

I've continued investigating this and I've used Fiddler tool in order to check the actual SOAP requests sent to the server.

 

This is what I came up with:

SOAPAction: "urn:vim25/5.1"

 

This means that although I'm using the vSphere 6.0 API, the actual SOAP request is of version 5.1.

 

The question is how could it be?

How can I control this?

 

This is what I've expected:

SOAPAction:urn:vim25/6.0

 

Many thanks,

Dudi.

C# Using Single SignOn (SSPI) for Virtual Center 2.5.0.119598

$
0
0

I am trying to use passthru authentication using SSPI to work in my c# application. Here is a snippet of the code I am trying to get to work.

 

returns a reference for VMware.Vim.SessionManager

 

VMware.Vim.VimClient vimClient = new VMware.Vim.VimClient();

vimClient.Connect("10.x.x.x", CommunicationProtocol.Https, 443);

 

ManagedObjectReference serviceInstance = new ManagedObjectReference();

serviceInstance.Type = "ServiceInstance";

serviceInstance.Value = "ServiceInstance";

 

SessionManager sm = new SessionManager(vimClient, serviceInstance);

sm.LoginBySSPI(ct_b64, null);

 

I get an exception when I try to call this method LoginBySSPI

 

I am not sure that this is the correct approach, but I really would like to be able to login using single signon in my c# code but not having much success.

This works fine using PowerShell but I want to be able to do this directly using c# without using PS Pipelines.

 

 

Any suggesstions welcome.

 

 

Thanks

How can I control the vSphere Web Services SDK/API version?

$
0
0

We have recently upgraded to vSphere 6.0

I'm using the Web Services SDK for .Net.

I failed to access the vSphere 6.0 specific API calls.

According to the documentation, the property that we need to configure for enabling/disabling vSphere HA VM Component Protection service is:

ClusterDasConfigInfo.vmComponentProtecting (disabled/enabled)

This property does exist in the vSphere web services SDK/API version 6.0.2 API, however when we run the code we get an exception that says:

Method not found: 'System.String Vim25Api.ClusterDasConfigInfo.get_vmComponentProtecting()'.

After running the code with a debugger I’ve realized that dynamically the ClusterDasConfigInfo object doesn’t have the vmComponentProtecting property.

However, it does contains the vmMonitoring property and other properties of older versions of vSphere API.

 

I've suspected that, from some reason I'm using a lower API version, so I've checked the AboutInfo object.

This is what I found:

AboutInfo.apiVersion="6.0"

AboutInfo.build="5112529"

AboutInfo.sessioninfo.fullName=VMware vCenter Server 6.0.0 build-5112529

 

I've continued investigating this and I've used Fiddler tool in order to check the actual SOAP requests sent to the server.

 

This is what I came up with:

SOAPAction: "urn:vim25/5.1"

 

This means that although I'm using the vSphere 6.0 API, the actual SOAP request is of version 5.1.

 

The question is how could it be?

How can I control this?

 

This is what I've expected:

SOAPAction:urn:vim25/6.0

 

Many thanks,

Dudi.

 

Is PerformanceManager thread safe?

AlarmManager.createAlarm() API changes since 6.0

$
0
0
I'm working with vsphere client SDK to integrate functionalities into our management plugin for vmware, recently I find a compatibility issues with API version 6.0 or above:
 
 
Just noticed some changes when I maintain my plugin code for 6.0.  In 5.5 or earlier version, when calling  AlarmManager.createAlarm() and supplied a AlarmSpec with few properties specified, it went through without exceptions, however when I tested it on a 6.0 sdk, it throws null exceptions , attaching my calling stack for reference:
 
com.vmware.vim25.ws.WSClient - Exception caught while invoking method: CreateAlarm
com.vmware.vim25.InvalidRequest: null
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
        at java.lang.Class.newInstance(Class.java:442)
        at com.vmware.vim25.ws.XmlGenDom.fromXml(XmlGenDom.java:219)
        at com.vmware.vim25.ws.XmlGenDom.parseSoapFault(XmlGenDom.java:147)
        at com.vmware.vim25.ws.XmlGenDom.fromXML(XmlGenDom.java:105)
        at com.vmware.vim25.ws.SoapClient.unMarshall(SoapClient.java:212)
        at com.vmware.vim25.ws.WSClient.invoke(WSClient.java:93)
        at com.vmware.vim25.ws.VimStub.createAlarm(VimStub.java:2544)
        at com.vmware.vim25.mo.AlarmManager.createAlarm(AlarmManager.java:151)
        at com.mycompany.myproject.vmware.createAlarmCall...

 

Attaching log from my vcenter: /var/log/vmware/vpxd/vpxd-69.log

 

2017-03-13T20:50:36.018Z info vpxd[7F9F68DE5700] [Originator@6876 sub=vpxLro opID=72c2b2a9] [VpxLRO] -- FINISH task-internal-5248835

2017-03-13T20:50:35.973Z info vpxd[7F9F68EE7700] [Originator@6876 sub=Default opID=7c867ed3] [VpxLRO] -- ERROR task-2362 -- AlarmManager -- vim.alarm.AlarmManager.create: vmodl.fault.InvalidArgument:

--> Result:

--> (vmodl.fault.InvalidArgument) {

-->    faultCause = (vmodl.MethodFault) null,

-->    invalidProperty = <unset>,

-->    msg = ""

--> }

--> Args:

-->

--> Arg entity:

--> 'vim.Datastore:datastore-2571'

--> Arg spec:

--> (vim.alarm.AlarmSpec) {

-->    name = "mydatastore",

-->    systemName = <unset>,

-->    description = "None",

-->    enabled = true,

-->    expression = (vim.alarm.MetricAlarmExpression) {

-->       operator = "isAbove",

-->       type = "vim.Datastore",

-->       metric = (vim.PerformanceManager.MetricId) {

-->          counterId = 280,

-->          instance = ""

-->       },

-->       yellow = 7500,

-->       yellowInterval = <unset>,

-->       red = 8500,

-->       redInterval = <unset>

-->    },

-->    action = (vim.alarm.AlarmAction) null,

-->    actionFrequency = <unset>,

-->    setting = (vim.alarm.AlarmSetting) null,

-->    alarmMetadata = <unset>

--> }

 
Is there any mandatory property of AlarmSpec that I must supply in vsphere client SDK 6.0+? Looks like the SDK has enforced some validation against null value since 6.0+.
 I fulfilled all mandatory fields of an AlarmSpec, please see attachment for more details.
Thanks in advance.

Problem with host name setting when customize a Linux VM

$
0
0

 

I am customizing an existing vm with Linux OS cloned by VC with VMWare SDK. In the customization, I want to set the host name of that vm in the form of FQDN. I can successfully set the host name as “host1” for example. When I power on that vm , I can see that the host name “host1” is set in the file /etc/hostname. However, when I set the host name as “host1.company1.com” for example, I came across the following error message:

A specified parameter was not correct. spec.identity.hostName”.

 

 

 

The snip of the code :

 

 

 

CustomizationFixedName fixedHostName = new CustomizationFixedName(); CustomizationLinuxPrep custLinuxPrep = new CustomizationLinuxPrep(); fixedHostName.setName(“host1.company1.com”);//for exmple custLinuxPrep.setHostName(fixedHostName); custLinuxPrep.setDomain(“company1.com”);… CustomizationSpec customsSpec = new CustomizationSpec();… customsSpec.setIdentity(custLinuxPrep);…service.customizeVMTask(vmMOR, customsSpec);

 

Really appreciated for your help!

 

 

Confusion about documentation regarding ReconfigVM_Task

$
0
0

In the vSphere docs (version 6.5 and earlier), in the section: vSphere API/SDK Documentation > vSphere Management SDK > vSphere Web Services SDK Documentation > vSphere Web Services SDK Programming Guide > Virtual Machine Configuration

 

The end of the first paragraph says:

   However, do not use the VirtualMachine.ReconfigVM_Task call to create or add a disk.

 

Am I missing something, or is this a documentation error? Maybe it meant to say "while the machine is powered on"? (The following paragraphs talk about VM properties that can't be modified while the machine is on).

Map vSphere API privileges to vSphere Web Client UI

$
0
0

Developers who work with the vSphere API (usually in Java or C#) ask how they can map privileges in the API to privilege strings in the vSphere Client. In the table below, ¬ represents indentation for the privilege hierarchy in the UI. Last updated for vSphere 6.5.

 

Privilege in vSphere APILabel in vSphere Client UI
Alarm"Alarms"
Alarm.Acknowledge¬ "Acknowledge alarm"
Alarm.Create¬ "Create alarm"
Alarm.Delete¬ "Remove alarm"
Alarm.DisableActions¬ "Disable alarm action"
Alarm.Edit¬ "Modify alarm"
Alarm.SetStatus¬ "Set alarm status"
Authorization"Permissions"
Authorization.ModifyPermissions¬ "Modify permission"
Authorization.ModifyPrivileges¬ "Modify privilege"
Authorization.ModifyRoles¬ "Modify role"
Authorization.ReassignRolePermissions¬ "Reassign role permissions"
Certificate"Certificates"
Certificate.Manage¬ "Manage certificates"
ComputeResource"Compute resource"
Cryptographer"Cryptographic operations"
Cryptographer.Access¬ "Direct Access"
Cryptographer.AddDisk¬ "Add disk"
Cryptographer.Clone¬ "Clone"
Cryptographer.Decrypt¬ "Decrypt"
Cryptographer.Encrypt¬ "Encrypt"
Cryptographer.EncryptNew¬ "Encrypt new"
Cryptographer.ManageEncryptionPolicy¬ "Manage encryption policies"
Cryptographer.ManageKeyServers¬ "Manage KMS"
Cryptographer.ManageKeys¬ "Manage keys"
Cryptographer.Migrate¬ "Migrate"
Cryptographer.Recrypt¬ "Recrypt"
Cryptographer.RegisterHost¬ "Register host"
Cryptographer.RegisterVM¬ "Register VM"
DVPortgroup"dvPort group"
DVPortgroup.Create¬ "Create"
DVPortgroup.Delete¬ "Delete"
DVPortgroup.Modify¬ "Modify"
DVPortgroup.PolicyOp¬ "Policy operation"
DVPortgroup.ScopeOp¬ "Scope operation"
DVSwitch"Distributed switch"
DVSwitch.Create¬ "Create"
DVSwitch.Delete¬ "Delete"
DVSwitch.HostOp¬ "Host operation"
DVSwitch.Modify¬ "Modify"
DVSwitch.Move¬ "Move"
DVSwitch.PolicyOp¬ "Policy operation"
DVSwitch.PortConfig¬ "Port configuration operation"
DVSwitch.PortSetting¬ "Port setting operation"
DVSwitch.ResourceManagement¬ "Network I/O control operation"
DVSwitch.Vspan¬ "VSPAN operation"
Datacenter"Datacenter"
Datacenter.Create¬ "Create datacenter"
Datacenter.Delete¬ "Remove datacenter"
Datacenter.IpPoolConfig¬ "Network protocol profile configuration"
Datacenter.IpPoolQueryAllocations¬ "Query IP pool allocation"
Datacenter.IpPoolReleaseIp¬ "Release IP allocation"
Datacenter.Move¬ "Move datacenter"
Datacenter.Reconfigure¬ "Reconfigure datacenter"
Datacenter.Rename¬ "Rename datacenter"
Datastore"Datastore"
Datastore.AllocateSpace¬ "Allocate space"
Datastore.Browse¬ "Browse datastore"
Datastore.Config¬ "Configure datastore"
Datastore.Delete¬ "Remove datastore"
Datastore.DeleteFile¬ "Remove file"
Datastore.FileManagement¬ "Low level file operations"
Datastore.Move¬ "Move datastore"
Datastore.Rename¬ "Rename datastore"
Datastore.UpdateVirtualMachineFiles¬ "Update virtual machine files"
Datastore.UpdateVirtualMachineMetadata¬ "Update virtual machine metadata"
EAM"ESX Agent Manager"
EAM.Config¬ "Config"
EAM.Modify¬ "Modify"
EAM.View¬ "View"
Extension"Extension"
Extension.Register¬ "Register extension"
Extension.Unregister¬ "Unregister extension"
Extension.Update¬ "Update extension"
ExternalStatsProvider"External stats provider"
ExternalStatsProvider.Register¬ "Register"
ExternalStatsProvider.Unregister¬ "Unregister"
ExternalStatsProvider.Update¬ "Update"
Folder"Folder"
Folder.Create¬ "Create folder"
Folder.Delete¬ "Delete folder"
Folder.Move¬ "Move folder"
Folder.Rename¬ "Rename folder"
Global"Global"
Global.CancelTask¬ "Cancel task"
Global.CapacityPlanning¬ "Capacity planning"
Global.Diagnostics¬ "Diagnostics"
Global.DisableMethods¬ "Disable methods"
Global.EnableMethods¬ "Enable methods"
Global.GlobalTag¬ "Global tag"
Global.Health¬ "Health"
Global.Licenses¬ "Licenses"
Global.LogEvent¬ "Log event"
Global.ManageCustomFields¬ "Manage custom attributes"
Global.ManagePolicies¬ "Manage policies"
Global.PolicyEditorSuperUser¬ "Policy editor SuperUser"
Global.Proxy¬ "Proxy"
Global.ScriptAction¬ "Script action"
Global.ServiceManagers¬ "Service managers"
Global.SetCustomField¬ "Set custom attribute"
Global.Settings¬ "Settings"
Global.SystemTag¬ "System tag"
Global.VCServer¬ "Act as vCenter Server"
HealthUpdateProvider"Health update provider"
HealthUpdateProvider.Register¬ "Register"
HealthUpdateProvider.Unregister¬ "Unregister"
HealthUpdateProvider.Update¬ "Update"
Host"Host"
Host.Amqp¬ "AMQP"
Host.Amqp.AmqpInteraction¬ ¬ "AMQP interaction"
Host.Cim¬ "CIM"
Host.Cim.CimInteraction¬ ¬ "CIM interaction"
Host.Config¬ "Configuration"
Host.Config.AdvancedConfig¬ ¬ "Advanced settings"
Host.Config.AuthenticationStore¬ ¬ "Authentication Store"
Host.Config.AutoStart¬ ¬ "Virtual machine autostart configuration"
Host.Config.Connection¬ ¬ "Connection"
Host.Config.DateTime¬ ¬ "Change date and time settings"
Host.Config.Firmware¬ ¬ "Firmware"
Host.Config.HyperThreading¬ ¬ "Hyperthreading"
Host.Config.Image¬ ¬ "Image configuration"
Host.Config.Locker¬ ¬ "Locker"
Host.Config.Maintenance¬ ¬ "Maintenance"
Host.Config.Memory¬ ¬ "Memory configuration"
Host.Config.NetService¬ ¬ "Security profile and firewall"
Host.Config.Network¬ ¬ "Network configuration"
Host.Config.Nvdimm¬ ¬ "NVDIMM"
Host.Config.Patch¬ ¬ "Query patch"
Host.Config.PciPassthru¬ ¬ "Change PciPassthru settings"
Host.Config.Power¬ ¬ "Power"
Host.Config.Quarantine¬ ¬ "Quarantine"
Host.Config.Resources¬ ¬ "System resources"
Host.Config.Settings¬ ¬ "Change settings"
Host.Config.Snmp¬ ¬ "Change SNMP settings"
Host.Config.Storage¬ ¬ "Storage partition configuration"
Host.Config.SystemManagement¬ ¬ "System Management"
Host.Hbr¬ "vSphere Replication"
Host.Hbr.HbrManagement¬ ¬ "Manage replication"
Host.Inventory¬ "Inventory"
Host.Inventory.AddHostToCluster¬ ¬ "Add host to cluster"
Host.Inventory.AddStandaloneHost¬ ¬ "Add standalone host"
Host.Inventory.CreateCluster¬ ¬ "Create cluster"
Host.Inventory.DeleteCluster¬ ¬ "Remove cluster"
Host.Inventory.EditCluster¬ ¬ "Modify cluster"
Host.Inventory.MoveCluster¬ ¬ "Move cluster or standalone host"
Host.Inventory.MoveHost¬ ¬ "Move host"
Host.Inventory.RemoveHostFromCluster¬ ¬ "Remove host"
Host.Inventory.RenameCluster¬ ¬ "Rename cluster"
Host.Local¬ "Local operations"
Host.Local.CreateVM¬ ¬ "Create virtual machine"
Host.Local.DeleteVM¬ ¬ "Delete virtual machine"
Host.Local.InstallAgent¬ ¬ "Add host to vCenter"
Host.Local.ManageUserGroups¬ ¬ "Manage user groups"
Host.Local.ReconfigVM¬ ¬ "Reconfigure virtual machine"
ImageLibrary"Image library"
ImageLibrary.Manage¬ "Manage"
Network"Network"
Network.Assign¬ "Assign network"
Network.Config¬ "Configure"
Network.Delete¬ "Remove"
Network.Move¬ "Move network"
Performance"Performance"
Performance.ModifyIntervals¬ "Modify intervals"
Policy"Policy"
Policy.Apply¬ "Apply"
Profile"Host profile"
Profile.Clear¬ "Clear"
Profile.Create¬ "Create"
Profile.Delete¬ "Delete"
Profile.Edit¬ "Edit"
Profile.Export¬ "Export"
Profile.View¬ "View"
Resource"Resource"
Resource.ApplyRecommendation¬ "Apply recommendation"
Resource.AssignVAppToPool¬ "Assign vApp to resource pool"
Resource.AssignVMToPool¬ "Assign virtual machine to resource pool"
Resource.ColdMigrate¬ "Migrate powered off virtual machine"
Resource.CreatePool¬ "Create resource pool"
Resource.DeletePool¬ "Remove resource pool"
Resource.EditPool¬ "Modify resource pool"
Resource.HotMigrate¬ "Migrate powered on virtual machine"
Resource.MovePool¬ "Move resource pool"
Resource.QueryVMotion¬ "Query vMotion"
Resource.RenamePool¬ "Rename resource pool"
ScheduledTask"Scheduled task"
ScheduledTask.Cancel¬ "Cancel task"
ScheduledTask.Create¬ "Create tasks"
ScheduledTask.Delete¬ "Remove task"
ScheduledTask.Edit¬ "Modify task"
ScheduledTask.Run¬ "Run task"
Sessions"Sessions"
Sessions.GlobalMessage¬ "Message"
Sessions.ImpersonateUser¬ "Impersonate user"
Sessions.TerminateSession¬ "View and stop sessions"
Sessions.ValidateSession¬ "Validate session"
StoragePod"Datastore cluster"
StoragePod.Config¬ "Configure a datastore cluster"
StorageProfile"Profile-driven storage"
StorageProfile.Update¬ "Profile-driven storage update"
StorageProfile.View¬ "Profile-driven storage view"
StorageViews"Storage views"
StorageViews.ConfigureService¬ "Configure service"
StorageViews.View¬ "View"
System"System"
System.Anonymous¬ "Anonymous"
System.Read¬ "Read"
System.View¬ "View"
Task"Tasks"
Task.Create¬ "Create task"
Task.Update¬ "Update task"
TroubleShooting"Troubleshooting"
TroubleShooting.all¬ "All"
VApp"vApp"
VApp.ApplicationConfig¬ "vApp application configuration"
VApp.AssignResourcePool¬ "Assign resource pool"
VApp.AssignVApp¬ "Assign vApp"
VApp.AssignVM¬ "Add virtual machine"
VApp.Clone¬ "Clone"
VApp.Create¬ "Create"
VApp.Delete¬ "Delete"
VApp.Export¬ "Export"
VApp.ExtractOvfEnvironment¬ "View OVF environment"
VApp.Import¬ "Import"
VApp.InstanceConfig¬ "vApp instance configuration"
VApp.ManagedByConfig¬ "vApp managedBy configuration"
VApp.Move¬ "Move"
VApp.PowerOff¬ "Power off"
VApp.PowerOn¬ "Power on"
VApp.Rename¬ "Rename"
VApp.ResourceConfig¬ "vApp resource configuration"
VApp.Suspend¬ "Suspend"
VApp.Unregister¬ "Unregister"
VirtualMachine"Virtual machine"
VirtualMachine.Config¬ "Configuration"
VirtualMachine.Config.AddExistingDisk¬ ¬ "Add existing disk"
VirtualMachine.Config.AddNewDisk¬ ¬ "Add new disk"
VirtualMachine.Config.AddRemoveDevice¬ ¬ "Add or remove device"
VirtualMachine.Config.AddRemoveRawDevice¬ ¬ "Add/remove raw device"
VirtualMachine.Config.AdvancedConfig¬ ¬ "Advanced"
VirtualMachine.Config.Annotation¬ ¬ "Set annotation"
VirtualMachine.Config.CPUCount¬ ¬ "Change CPU count"
VirtualMachine.Config.ChangeTracking¬ ¬ "Disk change tracking"
VirtualMachine.Config.DiskExtend¬ ¬ "Extend virtual disk"
VirtualMachine.Config.DiskLease¬ ¬ "Disk lease"
VirtualMachine.Config.EditDevice¬ ¬ "Modify device settings"
VirtualMachine.Config.HostUSBDevice¬ ¬ "Host USB device"
VirtualMachine.Config.ManagedBy¬ ¬ "Configure managedBy"
VirtualMachine.Config.Memory¬ ¬ "Memory"
VirtualMachine.Config.MksControl¬ ¬ "Display connection settings"
VirtualMachine.Config.QueryFTCompatibility¬ ¬ "Query Fault Tolerance compatibility"
VirtualMachine.Config.QueryUnownedFiles¬ ¬ "Query unowned files"
VirtualMachine.Config.RawDevice¬ ¬ "Raw device"
VirtualMachine.Config.ReloadFromPath¬ ¬ "Reload from path"
VirtualMachine.Config.RemoveDisk¬ ¬ "Remove disk"
VirtualMachine.Config.Rename¬ ¬ "Rename"
VirtualMachine.Config.ResetGuestInfo¬ ¬ "Reset guest information"
VirtualMachine.Config.Resource¬ ¬ "Change resource"
VirtualMachine.Config.Settings¬ ¬ "Settings"
VirtualMachine.Config.SwapPlacement¬ ¬ "Swapfile placement"
VirtualMachine.Config.UpgradeVirtualHardware¬ ¬ "Upgrade virtual machine compatibility"
VirtualMachine.GuestOperations¬ "Guest operations"
VirtualMachine.GuestOperations.Execute¬ ¬ "Guest operation program execution"
VirtualMachine.GuestOperations.Modify¬ ¬ "Guest operation modifications"
VirtualMachine.GuestOperations.ModifyAliases¬ ¬ "Guest operation alias modification"
VirtualMachine.GuestOperations.Query¬ ¬ "Guest operation queries"
VirtualMachine.GuestOperations.QueryAliases¬ ¬ "Guest operation alias query"
VirtualMachine.Hbr¬ "vSphere Replication"
VirtualMachine.Hbr.ConfigureReplication¬ ¬ "Configure replication"
VirtualMachine.Hbr.MonitorReplication¬ ¬ "Monitor replication"
VirtualMachine.Hbr.ReplicaManagement¬ ¬ "Manage replication"
VirtualMachine.Interact¬ "Interaction"
VirtualMachine.Interact.AnswerQuestion¬ ¬ "Answer question"
VirtualMachine.Interact.Backup¬ ¬ "Backup operation on virtual machine"
VirtualMachine.Interact.ConsoleInteract¬ ¬ "Console interaction"
VirtualMachine.Interact.CreateScreenshot¬ ¬ "Create screenshot"
VirtualMachine.Interact.CreateSecondary¬ ¬ "Turn on Fault Tolerance"
VirtualMachine.Interact.DefragmentAllDisks¬ ¬ "Defragment all disks"
VirtualMachine.Interact.DeviceConnection¬ ¬ "Device connection"
VirtualMachine.Interact.DisableSecondary¬ ¬ "Suspend Fault Tolerance"
VirtualMachine.Interact.DnD¬ ¬ "Drag and drop"
VirtualMachine.Interact.EnableSecondary¬ ¬ "Resume Fault Tolerance"
VirtualMachine.Interact.GuestControl¬ ¬ "Guest operating system management by VIX API"
VirtualMachine.Interact.MakePrimary¬ ¬ "Test failover"
VirtualMachine.Interact.Pause¬ ¬ "Pause or Unpause"
VirtualMachine.Interact.PowerOff¬ ¬ "Power off"
VirtualMachine.Interact.PowerOn¬ ¬ "Power on"
VirtualMachine.Interact.PutUsbScanCodes¬ ¬ "Inject USB HID scan codes"
VirtualMachine.Interact.Record¬ ¬ "Record session on virtual machine"
VirtualMachine.Interact.Replay¬ ¬ "Replay session on virtual machine"
VirtualMachine.Interact.Reset¬ ¬ "Reset"
VirtualMachine.Interact.SESparseMaintenance¬ ¬ "Perform wipe or shrink operations"
VirtualMachine.Interact.SetCDMedia¬ ¬ "Configure CD media"
VirtualMachine.Interact.SetFloppyMedia¬ ¬ "Configure floppy media"
VirtualMachine.Interact.Suspend¬ ¬ "Suspend"
VirtualMachine.Interact.TerminateFaultTolerantVM¬ ¬ "Test restart Secondary VM"
VirtualMachine.Interact.ToolsInstall¬ ¬ "VMware Tools install"
VirtualMachine.Interact.TurnOffFaultTolerance¬ ¬ "Turn off Fault Tolerance"
VirtualMachine.Inventory¬ "Inventory"
VirtualMachine.Inventory.Create¬ ¬ "Create new"
VirtualMachine.Inventory.CreateFromExisting¬ ¬ "Create from existing"
VirtualMachine.Inventory.Delete¬ ¬ "Remove"
VirtualMachine.Inventory.Move¬ ¬ "Move"
VirtualMachine.Inventory.Register¬ ¬ "Register"
VirtualMachine.Inventory.Unregister¬ ¬ "Unregister"
VirtualMachine.Namespace¬ "Service configuration"
VirtualMachine.Namespace.Event¬ ¬ "Allow notifications"
VirtualMachine.Namespace.EventNotify¬ ¬ "Allow polling of global event notifications"
VirtualMachine.Namespace.Management¬ ¬ "Manage service configurations"
VirtualMachine.Namespace.ModifyContent¬ ¬ "Modify service configuration"
VirtualMachine.Namespace.Query¬ ¬ "Query service configurations"
VirtualMachine.Namespace.ReadContent¬ ¬ "Read service configuration"
VirtualMachine.Provisioning¬ "Provisioning"
VirtualMachine.Provisioning.Clone¬ ¬ "Clone virtual machine"
VirtualMachine.Provisioning.CloneTemplate¬ ¬ "Clone template"
VirtualMachine.Provisioning.ConsolidateDisks¬ ¬ "Consolidate disks"
VirtualMachine.Provisioning.CreateTemplateFromVM¬ ¬ "Create template from virtual machine"
VirtualMachine.Provisioning.Customize¬ ¬ "Customize"
VirtualMachine.Provisioning.DeployTemplate¬ ¬ "Deploy template"
VirtualMachine.Provisioning.DiskRandomAccess¬ ¬ "Allow disk access"
VirtualMachine.Provisioning.DiskRandomRead¬ ¬ "Allow read-only disk access"
VirtualMachine.Provisioning.FileRandomAccess¬ ¬ "Allow file access"
VirtualMachine.Provisioning.GetVmFiles¬ ¬ "Allow virtual machine download"
VirtualMachine.Provisioning.MarkAsTemplate¬ ¬ "Mark as template"
VirtualMachine.Provisioning.MarkAsVM¬ ¬ "Mark as virtual machine"
VirtualMachine.Provisioning.ModifyCustSpecs¬ ¬ "Modify customization specification"
VirtualMachine.Provisioning.PromoteDisks¬ ¬ "Promote disks"
VirtualMachine.Provisioning.PutVmFiles¬ ¬ "Allow virtual machine files upload"
VirtualMachine.Provisioning.ReadCustSpecs¬ ¬ "Read customization specifications"
VirtualMachine.State¬ "Snapshot management"
VirtualMachine.State.CreateSnapshot¬ ¬ "Create snapshot"
VirtualMachine.State.RemoveSnapshot¬ ¬ "Remove snapshot"
VirtualMachine.State.RenameSnapshot¬ ¬ "Rename snapshot"
VirtualMachine.State.RevertToSnapshot¬ ¬ "Revert to snapshot"

SSO Issue with C# .Net

$
0
0

I am trying to get my app to use the Web Services SDK with C# .NET and having issues with SSO. Using Holder of Key User Credentials authentication and following the LoginByToken example in the SDK document zip file.

 

It keeps failing with a "signingKey is not loaded" exception in the "VMware.Binding.WsTrust" namespace Utilities class and ComputeSignature method.. I exported the Root certificates from vCenter and loaded them in my workstations Trusted Certificate store.

 

In the sample doc SamlTokenHelper class and GetCertificate method, I am loading the exported root certificate (.cer file) successfully. It is not returning a private key though which I think is the issue. Here is the GetCertificate method I am implementing:

 

         public static X509Certificate2 GetCertificate(
        {
            string workingDirectory = AppDomain.CurrentDomain.BaseDirectory;
            X509Certificate2 signingCertificate = new X509Certificate2();

            string certificateFile = workingDirectory + "\\Cert\\" + ConfigurationManager.AppSettings["PfxCertificateFile"];

            signingCertificate.Import(certificateFile, "", X509KeyStorageFlags.MachineKeySet);

            return signingCertificate;

        }

 

Mostly used what was in the sample application, just modified the certificate file path. I do notice in the import() method call, the sample is not specifying a private key password. In the WsTrustClientMessageInspector class, it is calling the ComputeSignature method and passing the private key as one of the parameters which is null in my case.

 

                // Compute the signature on the timestamp and body elements.

                var signature = Util.ComputeSignature(soapRequest, keyIdentifier, _certificateToken.Certificate.PrivateKey, bodyId, wsSecurityHeader.Timestamp.Id);

 

I know cer files don't store the private key and need to use pfx files, however, that is not an option if I try to export the root certs from MMC.

 

I very well may not be understanding what cert to use or something along the lines.

 

Anyone have any input?

how to connect/disconnect local usb device to the virtual machine by SDK

$
0
0

Hi,

 

I have several usb devices plugged in my PC machine. By the remote console I can manually connect/disconnect the local usb device to the virtual machine one by one. I'm wondering if there is a way to connect/disconnect all local usb devices by one click. Is this doable by vSphere web client SDK? or other kind of SDK provided by vmware.

 

From the following thread it seems that VMRC SDK can do this, but according the document there is no VMRC SDK for vSphere 6.0 and later version.

 

https://communities.vmware.com/thread/450250

 

Could someone give me some advices on this requirement.

 

Thanks,

Rick

Viewing all 1860 articles
Browse latest View live


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