1
0
mirror of https://github.com/vmware/vsphere-automation-sdk-python.git synced 2024-11-24 02:19:58 -05:00
vsphere-automation-sdk-python/samples/vsphere/vcenter/vm/README.md
Tianhao He 92c794364d Mis changes
1. Use '_' to replace ' ' for objects in testbed.py
2. Update the path in README
3. Add README to sso and lib folder
2017-01-24 15:28:39 -08:00

46 lines
2.6 KiB
Markdown

This directory contains samples for vCenter virtual machine APIs:
1. Virtual machine Create, Read and Delete operations:
* Create a virtual machine with system provided defaults - create/create_default_vm.py
* Create a basic virtual machine - create/create_basic_vm.py
* Create a exhaustive virtual machine - create/create_exhaustive_vm.py
2. Virtual machine power lifecycle (requires an existing virtual machine):
* Manage virtual machine power state - power.py
3. Update virtual machine hardware settings (requires an existing virtual machine):
* Configure virtual SATA adapters of a virtual machine - hardware/adapter/sata.py
* Configure virtual SCSI adapters of a virtual machine - hardware/adapter/scsi.py
* Configure the booting settings for virtual machine - hardware/boot.py
* Configure the boot devices used by a virtual machine - hardware/boot_device.py
* Configure CD-ROM devices for a virtual machine - hardware/cdrom.py
* Configure CPU settings for a virtual machine - hardware/cpu.py
* Configure disk settings for a virtual machine - hardware/disk.py
* Configure virtual ethernet adapters of a virtual machine - hardware/ethernet.py
* Configure Floppy settings for a virtual machine - hardware/floppy.py
* Configure Memory settings of a virtual machine - hardware/memory.py
* Configure Parallel ports for a virtual machine - hardware/parallel.py
* Configure Serial ports for a virtual machine - hardware/serial.py
You have two options to run samples inside this package:
1. Run the whole sample suite which contains all vcenter samples using main.py
in samples.vsphere.vcenter.setup package.
Please see the README in the setup package for detailed steps.
2. Run an individual sample in an existing environment.
You can either pass the testbed settings through command line
arguments or specify them in setup.py in the setup package.
For example, to run the create_default_vm sample in the samples.vsphere.vcenter.vm.create package:
* $ cd /path/to/vsphere-automation-sdk-python-samples/bin
* Run the sample with the testbed settings specified in setup.py in a Linux machine:
$ ./run_sample.sh ../samples/vsphere/vcenter/vm/create/create_default_vm.py -v
* Or specify the credentials using command line parameters:
$ ./run_sample.sh ../samples/vsphere/vcenter/vm/create/create_default_vm.py -s <server> -u <username> -p <password> -v