Skip to content
movitto edited this page Jan 15, 2013 · 4 revisions

VSphere Setup

vSphere setup instructions

  • You should have 1 Datacenter[1] created in vSphere
  • You should have at least 1 Datastore[2] created in this Datacenter[1]
  • You should have user with right necessary to execute Virtual Machine[3] tasks created
  • You should mark at least 1 Virtual Machine[3] as a Template in order to be able to clone it

Initial Configuration

The aeolus-configure utility can be used to configure VMware for you. But first, you must edit the config files it uses.

Edit /etc/aeolus-configure/nodes/vsphere_configure and fill in the appropriate values. ie:

$ sudo cat /etc/aeolus-configure/nodes/vsphere_configure 
 ---
parameters:
 enable_https: true
 enable_security: false
 package_provider: rpm
classes:
 aeolus::conductor:
 aeolus::image-factory:
 aeolus::iwhd:
 aeolus::deltacloud::core:
 aeolus::profiles::vsphere:
 instances:
 default:
 # Uncomment and provide values to match your vSphere environment.
 # Values below are examples.
 deltacloud_provider: vcenter.au.aeolusproject.org
 username: Administrator
 password: “REDACTED”
 datastore: storage1-nfs
 network_name: “VM Network”

Then, run aeolus-configure -p vsphere to apply the settings.

This will configure deltacloud and create the provider Conductor. You can verify that this was functional by logging into Conductor and ensuring that the vSphere provider is added under Administer / Providers. From there you will also need to create a provider account.

Architecture of vSphere driver:

  • Realm is mapped to VMWare Datastore[2] object which is referenced by Datacenter[1].

  • Hardware Profiles are generated statically:

  • small = Correspond to 1 CPU and 256MB of RAM

  • medium = Correspond to 1 CPU and 512MB of RAM

  • large = Correspond to 2 CPU and 1024MB of RAM

  • x-large = Correspond to 4 CPU and 2048MB of RAM

  • unknown = Set for an instance launched manually with custom properties.

  • Image is representation of an Template[3] which is created by STOPPED virtual machine. You can create a Template using vSphere Client or via Deltacloud API using ‘Create Image’ operation on STOPPED instance.

  • Instance represents a virtual machine. Virtual machines[3] are collected from all Datacenters[1] and Datastores[2]. Instance has correct mapping to Realm and can be operated using ‘start’, ‘stop’, ‘reboot’ and ‘destroy’ operation. When a new instance is being created, ‘realm_id’ parameter indicate on which Datastore will be new instance placed. Also it will take a ResourcePool[4] defined by Datacenter on which is Datastore located.

Image Building and Pushing

Images can be built and pushed through Conductor. Go to Administer -> Environments -> New Image to start the process.

To build from the command line, use aeolus-image; an example is listed below. Before you push, wait for the build to complete by monitoring /var/log/imagefactory.log. Building an image expects ‘vsphere’ as the target type, and pushing expects the provider name you entered when creating the provider account.

VMware Tools

You’ll need to include the VMware Tools repo in the image template, and also specify the “vmware-tools-esx-nox” package for installation .

This runs an agent in each guest, communicating useful information back to vCenter and Aeolus.

For example, the IP address of the guest, so you can connect to it via SSH .

Having the guest agent installed also lets you reboot guests through Aeolus. Without it, rebooting isn’t supported.

If someone tests it with other Fedora versions, please update this page with info on whether it works or not.

Examples:

# aeolus-image build --target vsphere--template
~/template.tpl --environment default

Target Image: decd1c78-2f4b-4281-a2e1-b899da2991ef
Image: 627c7e7e-df14-45b9-a1d6-4ebd70c4a417
Build: 20c1c4b3-8dad-40ca-9710-1dec244a7b9a
Status: BUILDING
Percent Complete: 0

# aeolus-image push --account
<vsphere provider account name in conductor> --image
627c7e7e-df14-45b9-a1d6-4ebd70c4a417

 Provider Image: 0f72a62c-489d-4904-a837-23edaef16ec4
 Image: 627c7e7e-df14-45b9-a1d6-4ebd70c4a417
 Build: 20c1c4b3-8dad-40ca-9710-1dec244a7b9a
 Status: PUSHING
 Percent Complete: 0

Image template examples:

Template with VMware Tools included

<template>
 <name>RHEL_VMWareTools</name>
 <os> 
 <name>RHEL-6</name> 
 <version>1</version>
 <arch>x86_64</arch>
 <rootpw>customPassword</rootpw>
 <install type="url">

<url>[http://customServer/released/RHEL-6-Server/6.1/x86\_64/os/](http://customServer/released/RHEL-6-Server/6.1/x86_64/os/)</url>
 </install>
 </os>
 <description>RHEL61 x86\_64 and VMWareTools</description>
 <repositories>
 <repository name='vmwareTools'>

<url>[http://packages.vmware.com/tools/esx/latest/rhel6/x86\_64/](http://packages.vmware.com/tools/esx/latest/rhel6/x86_64/)</url>
 <signed>False</signed>
 </repository>
 </repositories>
 <packages>
 <package name='vmware-tools-esx-nox'/> 
 </packages>
</template>

Template with a custom application included

<template>
 <name>tmpl1</name>
 <description>foo</description>
 <os>
 <name>Fedora</name>
 <arch>x86\_64</arch>
 <version>14</version>
 <install type="url">

<url>[http://download.fedoraproject.org/pub/fedora/linux/releases/14/Fedora/x86\_64/os/](http://download.fedoraproject.org/pub/fedora/linux/releases/14/Fedora/x86_64/os/)</url>
 </install>
 </os>
 <repositories>
 <repository name="custom">

<url>[http://repos.fedorapeople.org/repos/aeolus/demo/webapp/](http://repos.fedorapeople.org/repos/aeolus/demo/webapp/)</url>
 <signed>false</signed>
 </repository>
 </repositories>
</template>

6. Create a deployable and start the VM

Go to Administer -> Environments -> Images, and select the image you would like the deploy. A deployable can be created by clicking on the “New Deployable from Image” button. You will then see a form where you enter a name, select the hardware profile, and the catalog. A deployable is created when you save.

You will then see the deployable page. Use the “Launch” button to start a VM. It is activated if the image has been built and pushed to a provider.

If you encounter problems, the Common Error Messages page may be helpful.

External Links and References

[1] http://www.vmware.com/support/developer/vc-sdk/visdk41pubs/ApiReference/vim.Datacenter.html

[2] http://www.vmware.com/support/developer/vc-sdk/visdk41pubs/ApiReference/vim.Datastore.html

[3] http://www.vmware.com/support/developer/vc-sdk/visdk41pubs/ApiReference/vim.VirtualMachine.html

[4] http://www.vmware.com/support/developer/vc-sdk/visdk41pubs/ApiReference/vim.ResourcePool.html#field_detail

Clone this wiki locally