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

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

vSphere Management SDK url is just blank page

$
0
0

I'm trying to get started using the vSphere API, reading the document at the link below I should be able to browse to my vcenter using "sdk" in the URL but it's blank. Also I read that you have to download the root certificates, but that link is not where this document claims it is. I'm using 5.5

https://vdc-download.vmware.com/vmwb-repository/dcr-public/2d445149-7707-4c7d-98a7-9f00394b7df2/7322d611-ef3b-454a-ab63-ad3302d8b218/SDK/vsphere-ws/docs/SDK-README.html

Do I need to enable this SDK in vCenter?

How we can retrieve list of objects filtered by property in vSphere API?

$
0
0

I need the ability to filter what objects should fall to collection when retrieving objects in vSphere API, but can`t find any information about it in documentation.

Only using PropertyCollector to filter what properties may be in result vSphere Documentation Center.

What about API functionality like this? vSphere Documentation Center

For example I need get only VMs with specific name or state, or any other property.

Is there such an opportunity?

Programming / Scripting Language used for vSphere Management

$
0
0
We wanted to better understand what language you use or would like to us to develop vSphere Management Applications. Thanks for your time

Impact of vCenter plugin to vCenter's performance

$
0
0

Dear all

We have a vCenter plugin, which do a lot of work (calculate, create new thread ...). So I wonder does that impact much to performance of vCenter Server? Is there any document which mention about that?

Thanks for your help.


Console Proxy for VS6.5 (pre-authenticated)

$
0
0

Hi all, 

We are in the process of upgrading our/planning the rollout of 6.5 - currently on 5.5.

With the loophole of having the webconsole on the jetty powered service being closed - where by you could generate the console session tickets etc and chuck an (unauthenticated) user at that endpoint granting them access to the console. As this is now behind the authenticated /vsphere-client/ or /ui/ apps on the appliance this no longer works. Up until now we had been doing that and using IIS ARR to reverse proxy the requests into our infrastructure. 

I have an almost working solution but need some help with generated (for the lack of a better term) and application session token aka. what ends up as the JSESSIONID in your client cookie.

I have tried generating sessions via the restful api and using that ID as the value but it doesnt seem to accept them which in a way makes sense, different systems (ish). 

I am guessing i need to look into the SSO SDK but struggling with where to start - i even tried automating / mimicking the login to the various pages - following redirects and eventually posting the credentials to the SSO page so i could capture the JSESSIONID but still a work in progress/there has to be a better way.

FYI my new console proxy solution involves the standard looking URL for the new 6.5 /webconsole.html pages excepts switches out the domain for a proxy site running nginx, we also add an additional sessionid query string value and i have nginix add / append this to the reverse proxy request as well as have a set-cookie header back to the client.

Can someone point me in the right direction here/have any experience doing the same thing?

Performance Manager returning no data - C#, vSphere 6.5

$
0
0

Hi all,

I have code that works fine with vSphere 5, 5.5 and 6.0 that will return me performance stats with no problem. As soon as I point it at a 6.5 environment I get nothing returned by any object for any counter.

I have used powershell to query the 6.5 vCenter (not an appliance) and it returns data correctly.

Is there any changes that I have missed for 6.5 which could stop me getting performance data from vCenter? It is hard for me to post code as it is entwined with some complex methods etc.

Thanks,

Paul

"A WebService annotation is not present on class: com.vmware.vim25.VimPortType" error with vim25.jar from vSphere 6.5 HTML SDK

$
0
0

Hi,

We have a vSphere HTML SDK plugin developed using vSphere 6.5 SDK. One of the dependencies for our plugin is vim25.jar (from the libs folder of vSphere 6.5 HTML SDK).

Our plugin gets loaded successfully on the vSphere Client. However, when we click on the plugin and when our main page loading occurs we hit an exception (as below). Since the call is failing inside vim25.jar, I was suggested to ask this in this forum than vSphere SDK forum.

The very first call to getVimPort is failing. Could you please let us know if you have any suggestions to fix this or if you need any further info?

 

com.sun.xml.internal.ws.model.RuntimeModelerException: A WebService annotation is not present on class: com.vmware.vim25.VimPortType
at com.sun.xml.internal.ws.model.RuntimeModeler.buildRuntimeModel(RuntimeModeler.java:254)
at com.sun.xml.internal.ws.db.DatabindingImpl.<init>(DatabindingImpl.java:85)
at com.sun.xml.internal.ws.db.DatabindingProviderImpl.create(DatabindingProviderImpl.java:59)
at com.sun.xml.internal.ws.db.DatabindingProviderImpl.create(DatabindingProviderImpl.java:43)
at com.sun.xml.internal.ws.db.DatabindingFactoryImpl.createRuntime(DatabindingFactoryImpl.java:105)
at com.sun.xml.internal.ws.client.WSServiceDelegate.buildRuntimeModel(WSServiceDelegate.java:875)
at com.sun.xml.internal.ws.client.WSServiceDelegate.createSEIPortInfo(WSServiceDelegate.java:892)
at com.sun.xml.internal.ws.client.WSServiceDelegate.addSEI(WSServiceDelegate.java:855)
at com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:435)
at com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:404)
at com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:386)
at javax.xml.ws.Service.getPort(Service.java:119)
at com.vmware.vim25.VimService.getVimPort(Unknown Source)
at com.mycompany.vsphere.ObjectStoreManager.getVimPort(ObjectStoreManager.java:82)

 

Regards,
Sunil

Thick Provision Eager Zeroed

$
0
0

Ciao a tutti sono un nuovo utente e sto studiando vmware. Quali sono i vantaggi nell'usare  Thick Provision Eager Zeroed Thick Provision Lazy Zeroed e Thin Provision?

 

Perchè usare una modalità piuttosto di un'altra?

 

Quando è consigliabile usarle?

 

Dove posso trovare queste risposte in rete?

 

Trovo solo scritto cosa sono ma non dicono quando e perchè usare una piuttosto dell'altra

 

Spero in una risposta

 

Ciao!

I need help, thank you all guys: [ cannot run the demo code according to the SSO programming guide]

$
0
0

1) I have configured 2 vcenters, xx.xx.xx.180,  xx.xx.xx.182,  and the SSO server: xx.xx.xx.181, like this:

ssss.png

 

2) according to  the programming guide(http://pubs.vmware.com/vsphere-60/topic/com.vmware.ICbase/PDF/sso_prog_guide_6_0.pdf )  , we can get token from sso server, like this:

1111.png

 

3)but i can't run the demo code, i got this error:

my command line: run.bat com.vmware.sso.client.samples.AcquireBearerTokenByUserCredentialSample https://192.168.21.181/sts/STSService username passs

222.png

i don't understand why got this error, i can visit the sso url through: https://192.168.21.181/sts/STSService

121212.png

finnaly i found out the reason why I got the 404 error,  because of the code in  demo:

Bu I don't know how to fix it..

 

 

 

I don't think i missed any steps,  pls  help  me,  thanks!!!

Need help, Unable to find some information using vim25 SDK

$
0
0

Hi, Guys,

We used to use powerCLI to collect some useful information from vSphere, and now we want to find the same information using vim25 SDK, but we are not able to find the following items.

Can anyone help to tell if they are available in SDK, if so, where can I find them?

 

Thanks

 

 

column1: the powerCLI command we use.

column2: the attribute we cannot find in SDK correspondingly.

column3: a sample value for this attribute from powerCLI output.

 

 

$(Get-VMHost | Where-Object {$_.ConnectionState -eq 'Connected' -and $_.Version -eq '6.0.0'} | % {

$esxcli = Get-EsxCli -VMHost $strVMHostName.Name

    New-Object psobject -Property @{

"strVMHostName" = $_

"hostname" = ($esxcli.system.hostname.get()).hostname

"lockmode" = $esxcli.storage.vmfs.lockmode.list()}})

ATSCompatible

FALSE

ATSIncompatibilityReason

Device does not support ATS

ATSUpgradeModes

None

LockingMode

ATS+SCSI

 

Get-Cluster | Get-VM | Sort Name | Get-HardDisk | Select Parent,Name,CapacityGB,DiskType,

ScsiCanonicalName,FileName | FT -AutoSize

DiskType

Flat

 

        $HostVIBs = $esxcli.software.vib.list() |

            Where-Object {$_.Name -like "*vem*" } | Select-Object Name,Version,Vendor,ID

VEM version

v172-5.2.1.3.1.3.0-3.2.1

 

 

$(Get-VM | where { $_.PowerState -eq “PoweredOn”} | %{$strVMName = $_.Name Get-Stat -Entity $_ -Stat Cpu.Ready.Summation -RealTime | Group-Object -Property MetricID | %{New-Object -TypeName PSObject -Property @{VMName = $strVMName; MetricId = $_.Name; AvgValue = ($_.Group | Measure-Object -Property Value -Average).Average Units = ($_.Group | %{$_.Unit} | Select -Unique) -join "," } | Select VMName,MetricId,AvgValue,Units ## end new-object}} | Sort-Object -Property MetricID,AvgValue,VMName -Descending)

MetricID

  1. cpu.ready.summation

AvgValue

  1. 179.5944134

Units

millisecond

 

 

 

$(Get-VMHost | Where-Object {$_.ConnectionState -eq 'Connected'} | % {

$strVMHostName = $_

$esxcli = Get-EsxCli -VMHost $strVMHostName.Name

$hostname = $esxcli.system.hostname.get() | select -ExpandProperty Hostname

$esxcli.storage.core.device.list() | select @{N="hostname";E={$hostname}}, Vendor, Model, Device, Size, NoofoutstandingIOswithcompetingworlds, VAAIStatus | FT -AutoSize})

NoofoutstandingIOswithcompetingworlds

32

 

 

 

 

$(Get-VMHost | Where-Object {$_.ConnectionState -eq 'Connected'} | % {

$strVMHostName = $_

$esxcli = Get-EsxCli -VMHost $strVMHostName.Name

$esxcli.system.hostname.get() | select -ExpandProperty Hostname

$esxcli.system.module.parameters.list("fnic")

})

fnic_fc_trace_max_pages

fnic_max_qdepth

0

fnic_trace_max_pages

fnic_max_qdepth

 

fnic_trace_max_pages

 

heap_initial

 

heap_max

 

skb_mpool_initial

 

  1. driver. skb_mpool_max

 

 

 

$(Get-VMHost | Where-Object {$_.ConnectionState -eq 'Connected'} | % {$strVMHostName = $_; $esxcli = Get-EsxCli -VMHost $strVMHostName.Name

$esxcli.system.hostname.get() | select -ExpandProperty Hostname;$esxcli.system.settings.advanced.list() | select Path, IntValue | where {$_.Path -eq '/DataMover/MaxHWTransferSize'}})

MetricID,AvgValue,VMHostName -Descending)

Path

/DataMover/MaxHWTransferSize

 

IntValue

4096

 

 

vSphere 6.0 Task and events notification

$
0
0

Hi ,

Is there a way where we can subscribe to the events and task status and vSphere can notify us when the event/task happens/completes.

 

My goal is to get the notifications from vSphere tasks and events , without having to poll for task/events from vSphere.  I am thinking of exposing an endpoint by extending the interface from vSphere management SDK (6.0)  and configure that endpoint in vSphere  , and get notified on tasks and events as it happens on vSphere instead of me polling the vSphere.

 

I am not sure if it is possible , any help/sample/documentation is appreciated.

 

Thanks

-Sada


Getting the details of a VM's host

$
0
0

Hi,

 

I'm trying to get the host details related to a VM, so that I can construct a link to the Web console. Code:

if (dp.getName().equals("runtime")) {                VirtualMachineRuntimeInfo runtimeInfo = (VirtualMachineRuntimeInfo) dp.getVal();                ManagedObjectReference hostInfo = runtimeInfo.getHost();                getInfoHote(hostInfo);  public String getInfoHote(ManagedObjectReference hostInfo) {

 ManagedObjectReference propColl = serviceContent.getPropertyCollector();

    try {      List<String> vmList = new ArrayList<String>();      vmList.add("HostSystem");      ManagedObjectReference cViewRef = vimPort.createContainerView(hostInfo,          serviceContent.getRootFolder(),          vmList,          true);           ObjectSpec oSpec = new ObjectSpec();      oSpec.setObj(cViewRef);      oSpec.setSkip(true);      TraversalSpec tSpec = new TraversalSpec();      tSpec.setName("traverseEntities");      tSpec.setPath("view");      tSpec.setSkip(false);      tSpec.setType("ContainerView");      oSpec.getSelectSet().add(tSpec);      PropertySpec pSpec = new PropertySpec();      pSpec.setType("HostSystem");      pSpec.getPathSet().add("config");      PropertyFilterSpec fSpec = new PropertyFilterSpec();      fSpec.getObjectSet().add(oSpec);      fSpec.getPropSet().add(pSpec);      List<PropertyFilterSpec> fSpecList = new ArrayList<PropertyFilterSpec>();      fSpecList.add(fSpec);      RetrieveOptions ro = new RetrieveOptions();      RetrieveResult props = vimPort.retrievePropertiesEx(propColl,fSpecList,ro);

 

But I'm getting:

 

com.sun.xml.internal.ws.fault.ServerSOAPFaultException: Client received SOAP Fault from server: The request refers to an unexpected or unknown type. Please see the server log to find more detail regarding exact cause of the failure.

 

What I'm doing wrong?

Repository [MavenCentral ou autre] to add the management SDK as a dependency

$
0
0

Hello,

I'm trying to learn gradle for my project and I would add the VMware SDK Management 6.5 (vim25.jar) as a gradle dependency. However, i don't find in any repository (jcenter, mavenRepository) this sdk.

Is it possible to add this sdk or just the vim25.jar in a central repository ?

Thank you to take a few time to answer me.

Having problem with downloading plugin resource bundles, when the port number of vCenter is not default port (443).

$
0
0

We have installed a vCenter in PORT - 441.

We are trying to register a plugin (com.vitallabs.storApp.TasksAndEvents) for displaying Task and Events with properties: eventList, faultList, taskList

When we tried to register our plugin the resource bundle is not getting downloaded properly.

When we read virgo logs for the plugin, we came across the following lines:

 

[2017-08-09T12:32:51.710+05:30] [WARN ] cm-catalog-manager-pool-1704 70000427 100013 200003 com.vmware.vise.vim.cm.CmCatalogManager                           ResourceBundle https://10.10.2.14/catalog/com.vitallabs.storApp.TasksAndEvents_catalog.zip download failedjava.net.ConnectException: Connection refused: connect

[2017-08-09T12:32:51.710+05:30] [INFO ] cm-catalog-manager-pool-1704 70000427 100013 200003 com.vmware.vise.vim.cm.CmCatalogManager                           download time (ms) for the resource bundle C:\ProgramData\VMware\vCenterServer\cfg\vsphere-client\cmCatalog\com.vmware.ciscom.vitallabs.storApp.TasksAndEvents.zip,https://10.10.2.14/catalog/com.vitallabs.storApp.TasksAndEvents_catalog.zip: 1082

[2017-08-09T12:32:51.710+05:30] [WARN ] cm-catalog-manager-pool-1704 70000427 100013 200003 com.vmware.vise.vim.cm.CmCatalogManager                           Failed to download C:\ProgramData\VMware\vCenterServer\cfg\vsphere-client\cmCatalog\com.vmware.ciscom.vitallabs.storApp.TasksAndEvents.zip from https://10.10.2.14/catalog/com.vitallabs.storApp.TasksAndEvents_catalog.zip

 

But when we tried to run the url with port number i.e., "https://10.10.2.14:441/catalog/com.vitallabs.storApp.TasksAndEvents_catalog.zip", we are able to download the Resource Bundle file.

This also perfectly works fine if vCenter is deployed in default port number.

 

Any idea why vCenter is not adding port number to the catalog path before downloading resource bundle?

vRealize, vRO: How to get the current VM CPU? overallCpuUsage always showing 0 MHz

$
0
0

I´ve been doing stuff with vRO + NSX, and while most of the stuff is working great, I havent found a way to get the VM runtime info correctly.

 

This is a call I´m using:

inputVM.summary.quickStats.overallCpuUsage;

 

But when I bring up a new Linux, or Windows, and it´s been 3 days - I still always get 0 MHz... Any ideas wht I´m doing wrong?

Getting real -time VM CPU usage using VMWare Infrastructre SDK 2.5

$
0
0

 

I searched the SDK for a long time, but still get no luck. Could any one please give me some hints?

 

 

 

 

 

Thanks,

 

 

Qian

 

 

Viewing all 1860 articles
Browse latest View live


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