-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathr.bat~
55 lines (35 loc) · 2.96 KB
/
r.bat~
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
@echo off
rem list help
rem java -cp vim25.jar;classes com.vmware.helper.VimUtil -url https://10.112.188.21/sdk/vimService -u root -p vmware -vminfo test1 guest.ipAddress
rem retrieve guest vm ipaddress property
rem java -cp vim25.jar;classes com.vmware.helper.VimUtil -url https://10.112.188.21/sdk/vimService -u root -p vmware -vminfo test1 guest.ipAddress
rem retrieve guest vm hostname property
rem java -cp vim25.jar;classes com.vmware.helper.VimUtil -url https://10.112.188.21/sdk/vimService -u root -p vmware -vminfo test1 guest.hostName
rem list help
rem java -cp vim25.jar;classes com.vmware.helper.VimUtil -help
rem export vm to a folder
rem java -cp vim25.jar;classes com.vmware.helper.VimUtil -url https://10.112.188.21/sdk/vimService -u root -p vmware -exportVM "kannan-test" "e:\cloudmunch\sample\ovfdir"
rem Creating a new vm
rem java -cp vim25.jar;classes com.vmware.helper.VimUtil -url https://10.112.188.21/sdk/vimService -u root -p vmware -createVM
rem import a ovf file to a target host
rem java -cp vim25.jar;classes com.vmware.helper.VimUtil -url https://10.112.188.21/sdk/vimService -u root -p vmware -importVM 10.112.79.206 "e:\cloudmunch\ovfdir\VMware Workbench 2.1.0.631880\VMware Workbench 2.1.0.631880.ovf" kannan-test
rem Install vmware tools on a virtual machine
rem java -cp vim25.jar;classes com.vmware.helper.VimUtil -url https://10.112.188.21/sdk/vimService -u root -p vmware -installVMTools "kannan-test"
rem Deleting a virtual machine
rem java -cp vim25.jar;classes com.vmware.helper.VimUtil -url https://10.112.188.21/sdk/vimService -u root -p vmware -deleteVM test1
rem Powering on a virtual machine
rem java -cp vim25.jar;classes com.vmware.helper.VimUtil -url https://10.112.188.21/sdk/vimService -u root -p vmware -powerOnVM "kannan-test"
rem Powering off a virtual machine
rem java -cp vim25.jar;classes com.vmware.helper.VimUtil -url https://10.112.188.21/sdk/vimService -u root -p vmware -powerOffVM kannan-test
rem Listing All Hosts to VM mapping
rem java -cp vim25.jar;classes com.vmware.helper.VimUtil -url https://10.112.188.21/sdk/vimService -u root -p vmware -listHost-VMs
rem Listing all VMs on a given host
rem java -cp vim25.jar;classes com.vmware.helper.VimUtil -url https://10.112.188.21/sdk/vimService -u root -p vmware -listVMs 10.112.80.89
rem Listing all hosts
rem java -DlogEnabled=true -cp vim25.jar;classes com.vmware.helper.VimUtil -url https://10.112.188.21/sdk/vimService -u root -p vmware -listHosts
rem Listing all ResourcePools to Virtual Machines mapping
java -cp vim25.jar;classes com.vmware.helper.VimUtil -url https://10.112.188.21/sdk/vimService -u root -p vmware -listRP-VMs
rem Listing all ResourcePools
rem java -cp vim25.jar;classes com.vmware.helper.VimUtil -url https://10.112.188.21/sdk/vimService -u root -p vmware -listResourcePools
rem Listing all VMs, Hosts and ResourcePools
rem java -cp vim25.jar;classes com.vmware.helper.VimUtil -url https://10.112.188.21/sdk/vimService -u root -p vmware -listVMs -listHosts -listResourcePools