Menu
  • HOME
  • TAGS

how to find vmware/vsphere templates with java api

java,virtual-machine,vmware,vsphere

To check a VM is template or not. You can check for vm_obj.config.template . The VirtualMachine manged object has the property config which is of type VirtualMachineConfigInfo . And in the VirtualMachineConfigInfo you can find the boolean template property....

VmWare vSphere: send automatically mail/notification on event

vmware,vsphere

Haven't done it myself but according to the documentation: In the Actions tab of the Alarm Settings dialog box, click Add to add an action. In the Actions column, select Send a notification email from the drop-down menu. In the Configuration column, enter recipient addresses. Use commas to separate multiple...

How to get server information from VMware

server,vmware,vsphere,powercli

After digging into the system and many hours of research I found the solution. I just wish VMWare would make it easier to retrieve data or at least improve the manual. The following code creates two files; one with the server information and another one with Uptime information. Get-VM |...

VM gets an APIPA after Reboot

ip,vmware,windows-server-2008-r2,vsphere,vcenter

Solution 1: Disable and Enable the NIC - most of the times this should solve the issue. Solution 2 : Create the following registry key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters Do a reboot. Solution 3 : remove the NIC, reboot the vm and add the NIC back....

Rename VM in vCenter

virtual-machine,vsphere

Renaming the VM will not change the file names in the datastore. You can find more information here: VMWare KB...

Is there any ways to get drive information of each vmware in Vmware ESX via Vsphere SDK with Java?

java,vmware,drive,vsphere,esx

Answer: `GuestInfo info = vm.getGuest(); (vm means VirtualMachine object.) GuestDiskInfo[] dInfos = info.getDisk(); if (dInfos != null) { System.out.println("Disk Info"); for (GuestDiskInfo dInfo : dInfos) { System.out.println(" Capacity(GB):"+dInfo.getCapacity()/1024/1024/1024); System.out.println(" Free(GB):"+dInfo.getFreeSpace()/1024/1024/1024); System.out.println(" Disk Path:"+dInfo.getDiskPath()); System.out.println("============"); } }` **Important: Firstly need to install vmware tools on each guest os machine. From this...

Enable Management API in VMWare vSphere Hypervision

vmware,vsphere,esxi,hypervisor

You must pay to use any write mode operations in the vSphere API. If you run the HostSystem in demo mode which works for 60 days you can use the full API, the same goes for vCenter, but after those 60 days are up you will loose the write mode...

Subprocess fails to print esxcli namespace correctly

python,subprocess,vmware,vsphere

With your code, you're saying that fifth argument to the executable should be the string "network vswitch standard portgroup add". In order to pass that on the command line, it has to be quoted. Instead, you should make those be separate arguments, just like they would be on the command...

ruby fog vsphere output listing proc object

ruby,linux,gem,fog,vsphere

You can simply call the proc to retrieve the data: my_data['mac_addresses'].() If fog is able to collect the data at this point, it will return the mac address, else it will return nil. Foq uses this technique to lazily evaluate some attributes that might not be available during compile time...

One execution per Windows VMware VM as Jenkins slaves?

jenkins,virtual-machine,vsphere

Turns out the version of the vSphere plugin I was using was outdated, this bug problem is fixed in the newer version

How to write vSphere scripts and execute them remotely

linux,bash,automation,vmware,vsphere

VSphere api: https://pubs.vmware.com/vsphere-55/index.jsp?topic=%2Fcom.vmware.wssdk.apiref.doc%2Fright-pane.html There are plenty of implementations, one of them being PYSphere in python: https://code.google.com/p/pysphere/ or Java: http://vijava.sourceforge.net/...

Retrieve runtimeInfo from a VM with Vsphere in Fog (Ruby)

ruby,vmware,fog,vsphere

I find a way to bypass the "protected", I dont think this is good practice but it's working without using monkey patch: vm = vsphere.send :get_vm_ref, vm_id ...