Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Div
classabiheader

API Reconfigure Tutorial 2

...

classtocc

Table of Contents

Overview

This simple walkthrough shows how to reconfigure a VM, in this case we will add a volume of external storage using the API. The basic procedure for adding a volume to a VM is:

  1. Retrieve the VM
  2. Retrieve an available volume 
  3. Add the volume to the VM
  4. Reconfigure the VM

 

Prerequisites

This tutorial should be used in a test environment. You can set up the following basic environment in the GUI and then work on the tutorial using the API. After you have finished, you should see the new volume on your VM.

Environment

You To work through this tutorial, you will need the following prerequisites:

  • A deployed VM that is powered off
    the VM used in this tutorial is configured with the following disks:
  • disk1 - system hard disk on the hypervisor datastore
  • disk2 - a volume attached to the VM, unless you are working with hot-add and hot-reconfigure on ESXi. A VM with a volume attached.
  • A storage device and a volume that is not attached to a VM
    • Tip: for a test system, enable the creation of small volumes through the GUI by setting sizes of 0.1, 0.2 GB in Configuration view
  • The API ID number of your enterprise and datacenter
  • Privileges as described below
    if A user with appropriate privileges. If you are a CLOUD_ADMIN or ENTERPRISE_ADMIN user, no extra privileges are required

In an Abiquo test environment you can do these steps using the Abiquo GUI

...

Privileges Required

This tutorial is designed to be used by an Enterprise Administrator or Cloud Administrator in a test environment. 

...

...

    • VDC_

...

    • MANAGE_

...

    • STORAGE

    • ROLE_VDC_MANAGE_VAPP

...

    • ROLE_VAPP_

...

    • CUSTOMISE_

...

    • SETTINGS

Preparation

First, you can use the AllVirtualMachinesResource to retrieve all your VMs. 

...