Add Disk To VM
Script to add a Hard disk to an existing VM
This is for demonstration purposes only.
I did not do a whole lot of sanity checking, etc.
This will not add more than 15 disks to a VM
To do that the VM needs an additional scsi controller
and I have not yet worked through that
Community contributed samples for the pyVmomi library.
The pyVmomi library itself is hosted here: https://github.com/vmware/pyvmomi/
The community samples website is here: http://vmware.github.io/pyvmomi-community-samples/
The samples contained here in are provided as-is from contributors around the pyVmomi community. They are intended as learning tools and may vary in quality. Any developer may contribute, enhance, or alter the samples. Ownership of any submitted sample reverts to the project itself
Sample Ownership and Copyright Licenses
- the community creates the samples and the project retains ownership of the samples
- the community curates the samples and licenses the samples under the project license
- all samples are distributed under the root project license
- A copyright line may be added if you contribute a change of more than 10 lines
Writing good samples:
- A good sample shows how to do one thing and only one thing at a time.
- A good sample follows good and consistent code style see: pep8.
- When arbitrary choices are made, a good sample chooses the simplest default.
- Samples must be willing to teach programming as well as the API!
Please conform to pep8 standards. Check your code by running the pep8 tool. https://pypi.python.org/pypi/pep8
- Follow the GitHub process
- please use one branch per sample or change-set
- please use one commit and pull request per sample
- if you include a license with your sample, use the project license