Pyvmomi: Unterschied zwischen den Versionen

Aus Xinux Wiki
Zur Navigation springen Zur Suche springen
 
Zeile 10: Zeile 10:
 
*cd pyvmomi/sample
 
*cd pyvmomi/sample
 
=getallvms=
 
=getallvms=
*getallvms.py --host esxi-01.xinux.org --user root --pass secret
+
*python3 getallvms.py --host esxi-01.xinux.org --user root --pass secret
 
  Name      :  db-testsystem
 
  Name      :  db-testsystem
 
  Path      :  [geldspeicher] db-testsystem/db-testsystem.vmx
 
  Path      :  [geldspeicher] db-testsystem/db-testsystem.vmx
Zeile 16: Zeile 16:
 
  State      :  poweredOn
 
  State      :  poweredOn
 
  IP        :  10.81.1.39
 
  IP        :  10.81.1.39
 +
=poweron=
 +
*python3 poweronvm.py --host esxi-01.xinux.org --vmname db-testsystem  --user root --pass secret
 +
Caught vmodl fault : Current license or ESXi version prohibits execution of the requested operation.

Aktuelle Version vom 29. September 2020, 07:04 Uhr

install

  • pip install pyvim

or

  • pip3 install pyvim

samples

community samples

first test

  • cd pyvmomi/sample

getallvms

  • python3 getallvms.py --host esxi-01.xinux.org --user root --pass secret
Name       :  db-testsystem
Path       :  [geldspeicher] db-testsystem/db-testsystem.vmx
Guest      :  Ubuntu Linux (64-bit)
State      :  poweredOn
IP         :  10.81.1.39

poweron

  • python3 poweronvm.py --host esxi-01.xinux.org --vmname db-testsystem --user root --pass secret
Caught vmodl fault : Current license or ESXi version prohibits execution of the requested operation.