Book Image

VMware vCloud Director Cookbook

By : Daniel Langenhan
Book Image

VMware vCloud Director Cookbook

By: Daniel Langenhan

Overview of this book

VMware vCloud Director is an enterprise software solution that enables the building of secure, private clouds by pooling together infrastructure resources into virtual data centers. The tool enables self-service via a web interface to reduce the management overhead and offers amazing possibilities for production and development environments. Thus, the tool will ensure efficient management of resources with data center efficiency and business agility. "VMWare VCloud Director Cookbook" will cover a lot of ground, ranging from easy to complex recipes. It will not only dive into networks, data-stores, and vApps, but also cover vCloud design improvements, troubleshooting, and the vCloud API. "VMWare VCloud Director Cookbook" is split into different sections, each of which deals with a special topic in vCloud - from networks, to vApps, to storage and design. This book contains over 80 recipes with the difficulty levels ranging from simple to very advanced. You will learn how to automate vCloud easily and quickly with the API, and also learn how to isolate a vApp and still fully access it without risking the network. Design considerations that need to be addressed while deploying the vCloud and more will also be looked into. "VMWare VCloud Director Cookbook" will make your life as an admin a lot easier by providing you with some good recipes that have been proven to work in small to large enterprises.
Table of Contents (16 chapters)
VMware vCloud Director Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Appendix
Index

Adding ISO files to vCD automatically


Here is a good programming idea that you can now create. It's not easy, but a neat challenge and a very useful little program to have a go at.

Getting ready

Choose a language or tool of your choice. If you don't have a preferred one, think about which system will interact with the program or which platform you will be running the script under.

How to do it...

First, we need to define what the program should do:

  • We want to upload a .iso file from the local disk of your desktop

  • We want to add the .iso file to a catalog in vCloud

Here are the programming steps you need to do:

  1. Create an object that contains the media filename and location as well as the type ISO.

  2. Get the OvDC reference where the catalog we want to upload is stored.

  3. Get the catalog reference.

  4. Upload the media to the catalog.

  5. Wait for the task to finish.

How it works...

To learn a programming language and an API is hard. The first reference you should consult is the API reference of vCloud. I normally start...