ymnick's Posts

Understood, thanks!
Thanks, it doesn't fail now, but cannot install due to the following error: Initiated VMware Tools install or upgrade ... Cannot complete operation because VMware Tools is not running ... See more...
Thanks, it doesn't fail now, but cannot install due to the following error: Initiated VMware Tools install or upgrade ... Cannot complete operation because VMware Tools is not running in this virtual machine. I would expect it to install the VMware Tools if not present...
Thank you for your response. I tried the suggested in the documentation arguments before posting my question but it didn't work, perhaps I am not doing it the right way: $target_vm->UpgradeTo... See more...
Thank you for your response. I tried the suggested in the documentation arguments before posting my question but it didn't work, perhaps I am not doing it the right way: $target_vm->UpgradeTools_Task('/S /v "/qn REBOOT=R ADDLOCAL=ALL REMOVE=Hgfs"'); throws the following exception: Error: Failed to handle message: Undefined subroutine &Unexpected arguments: /S /v "/qn REBOOT=R ADDLOCAL=ALL REMOVE=Hgfs" at (eval 82) line 143         VimService::build_arg_string('ARRAY(0xae34d08)', 'HASH(0xae34c88)') called at (eval 82) line 3033         VimService::UpgradeTools_Task('VimService=HASH(0xb187868)', '_this', 'ManagedObjectReference=HASH(0xa8cb7f8)', '/S /v "/qn REBOOT=R ADDLOCAL=ALL REMOVE=Hgfs"', undef) called at .../VICommon.pm line 1699         ViewBase::invoke('VirtualMachine=HASH(0xb4106c8)', 'UpgradeTools_Task', '/S /v "/qn REBOOT=R ADDLOCAL=ALL REMOVE=Hgfs"', undef) called at ...         VirtualMachineOperations::UpgradeTools_Task('VirtualMachine=HASH(0xb4106c8)', '/S /v "/qn REBOOT=R ADDLOCAL=ALL REMOVE=Hgfs"') called at ... Anything obvious I miss?
Could you please clarify what you are referring to by 'GuestOps' and 'RunProgramInGuest'? I am looking how to automate VMware Tools installation on Windows virtual machines using vSphere API with... See more...
Could you please clarify what you are referring to by 'GuestOps' and 'RunProgramInGuest'? I am looking how to automate VMware Tools installation on Windows virtual machines using vSphere API with Perl SDK. Thanks, YM.
VMware Technical Support confirmed the same issue with ESXi hosts 'managementServerIp' summary property for ESXi servers managed by vCenter Server running on a Windows machine. Next step will be ... See more...
VMware Technical Support confirmed the same issue with ESXi hosts 'managementServerIp' summary property for ESXi servers managed by vCenter Server running on a Windows machine. Next step will be to continue troubleshooting it with SDK Support Team. In a meantime I am going to use the following code to extract vCenter management IP address for Windows based vCenters:     my $settings = Vim::get_view(mo_ref => $service_content->setting)->setting;     my $managementServerIp = undef;     foreach my $setting (@$settings) {          if ('VirtualCenter.AutoManagedIPV4' eq $setting->key) {               $managementServerIp = $setting->value;          }     } 
Both vCenter and ESXi servers are 5.5 and it shows 'Unset' for 'managementServerIp' HostListSummary property in vCenter MOB. vCenter is a Windows machine. The same API works when connecting to ES... See more...
Both vCenter and ESXi servers are 5.5 and it shows 'Unset' for 'managementServerIp' HostListSummary property in vCenter MOB. vCenter is a Windows machine. The same API works when connecting to ESXi server MOB, but not when connecting to vCenter MOB and drilling down to the ESXi host object.
Thank you.
Okay, thanks again. Then another question - it goes through Datacenter object to retrieve dvPortgroup, does this mean that the connection must be against vCenter and not ESXi for this to work?
Thanks. And beside that the same technique as in the updateVMPortgroupLS2.pl script above?
Hi Ruben and William, Is this still the best way for updating distributed vswitch portgroup with vSphere API 5.0? Thanks, ymnick
Thank you
Hi William, Virtual machine IP address is available when VMware Tools is installed and virtual machine guest is running. If guest is not running or virtual machine is powered off, the IP addre... See more...
Hi William, Virtual machine IP address is available when VMware Tools is installed and virtual machine guest is running. If guest is not running or virtual machine is powered off, the IP address is unavailable through vSphere API ($vm->guest->ipAddress), but at the same time it is still displayed in the vSphere client. Any idea how vSphere client is making this information available for powered off virtual machines? Thanks, Ymnick
Hi All, StandbyGuest and SuspendVM_Task methods both put the VM into 'suspended' state, and the only difference I noticed is that standby process initiated by StandbyGuest command completes in... See more...
Hi All, StandbyGuest and SuspendVM_Task methods both put the VM into 'suspended' state, and the only difference I noticed is that standby process initiated by StandbyGuest command completes instantly, and then the VM gets suspended 'in the background' without any indication in the vSphere Client UI, while the process started by SuspendVM_Task takes a few long seconds to complete and there is a progress bar in the UI indicating the suspension progress. Is there anything else, except of VMware Tools presence requirement for StandbyGuest? Thanks, Ymnick
This thread answers my question - Install VMware Tools with VMware Sphere SDK. Thanks, Yuri
Hi William, My understanding is that after UpgradeTools_Task method has been called, a user needs to log into VM and to complete the installation process, and I am looking how it can be comple... See more...
Hi William, My understanding is that after UpgradeTools_Task method has been called, a user needs to log into VM and to complete the installation process, and I am looking how it can be completely silenced so no additional action will be required. Is there something in the 'installerOptions' param to allow that functionality? Unfortunately the API doesn't have a very good explanation of this parameter. http://pubs.vmware.com/vsphere-55/index.jsp#com.vmware.wssdk.apiref.doc/vim.VirtualMachine.html#upgradeTools Thanks, Ymnick
Hi Dmitri, I am also using MAC address as VM identifier because: - VM name may not be unique - IP address may change when VM is restarted for example - MoRef id is relative to the parent, a... See more...
Hi Dmitri, I am also using MAC address as VM identifier because: - VM name may not be unique - IP address may change when VM is restarted for example - MoRef id is relative to the parent, and for the same VM it'll be different depending on how it was discovered. What other VM properties you would recommend as identifier? Thanks, Ymnick
Hi All, Can someone please explain why the results below are different and how to get host ip address instead of name when using ESXi API?         Util::connect( "https://$server/sdk", $use... See more...
Hi All, Can someone please explain why the results below are different and how to get host ip address instead of name when using ESXi API?         Util::connect( "https://$server/sdk", $username, $password );         my $service_content = Vim::get_service_content();         my $apiType         = $service_content->about->apiType;         if ( $apiType eq 'VirtualCenter' ) {             my $host_views = Vim::find_entity_views( view_type => 'HostSystem' );             foreach my $host_view (@$host_views) {                                print $host_view->name; # prints ip address                            }         } else {             my $host_view = Vim::find_entity_view( view_type => 'HostSystem' );             print $host_view->name; # prints name for the same host                    } You should be able to observe the same behavior when you browse your vCenter and ESXi hosts from https://<your-vcenter-or-esxi>/mob/. Thanks, Ymnick
Hi All, I want to second this unanswered question - how virtual machine primary IP address is determined when virtual machine has multiple NICs? The closest to what I am looking for is vSp... See more...
Hi All, I want to second this unanswered question - how virtual machine primary IP address is determined when virtual machine has multiple NICs? The closest to what I am looking for is vSphere PowerCLI Reference documentation, which says this: "This cmdlet retrieves the virtual machines on a vCenter Server system. Returns a set of virtual machines that correspond to the filter criteria provided by the cmdlet parameters. For virtual machines with multiple NICs and multiple IP addresses, the IPAddress property of the VMGuest object contains all IP addresses of the virtual machine. The IP at position 0 is the primary IP address." Thank you, Ymnick
Thanks. I also added VMware::VILib; just to see if it'll make it work, otherwise I use VMware::VIRuntime;