Tag Archives: Vcloud

Constantly Syncing Inventory

When performing an upgrade of vCloud Director 1.5 to 5.1 we ran into this issue to do with synchronisation.

Constantly Syncing Inventory

A vCloud Director cell may fail to finish the synchronisation with a vCenter Server.  This is an issue where vCloud Director is constantly stating ‘syncing inventory’ in the vCenters section of the system>Manage & Monitor page.
Syncing Inventory
You may find that a simple restart of the affected cell services may fix the issue.  If you are running a multi-cell environment you can do this by quiescing the currently active cell and then stopping and restarting the vCD services.

First disable the cell and pass the active jobs to the other cells.

Display the current state of the cell to view any active jobs.
#  /opt/vmware/vcloud-director/bin/cell-management-tool -u <USERNAME> cell --status

Then Quiesce the active jobs.
#  /opt/vmware/vcloud-director/bin/cell-management-tool -u <USERNAME> cell --quiesce true

Confirm the cell isn’t processing any active jobs.
#  /opt/vmware/vcloud-director/bin/cell-management-tool -u <USERNAME> cell --status

Now shut the cell down to prevent any other jobs from becoming active on the cell.
#  /opt/vmware/vcloud-director/bin/cell-management-tool -u <USERNAME> cell --shutdown

Then restart the services.
# service vmware-vcd restart

If you are not running multiple cells you can just restart the service but it will cause a loss of service during the restart.  A typical restart takes around 2-5 minutes.  You can monitor the progess of the restart by tailing the cell.log file.
# tail -f /opt/vmware/vcloud-director/logs/cell.log

Once it say’s 100%, it is done.

If restarting the services doesn’t help try rebooting the cell.  Use the same commands as above to pass active tasks over to the other cells first before rebooting.
When the cell restarts check and see if the cell will reconnect and finish the sync.  If not check the log /opt/vmware/vcloud-director/logs/vcloud-container-info.log.  Look for the following error.  ORA-01013: user requested cancel of current operation.

You can do this as follows.
# less /opt/vmware/vcloud-director/logs/vcloud-container-info.log

Then press / and type in “user requested cancel of current operation” to go to the location in the log where this entry is recorded.

The reason for ORA 1013: error can be:

  • caused by the user – actually canceling the operation
  • caused by a response to congruent errors
  • the result of timeouts

When  vCloud Director sync is taking place, after processing the updates vCD performs database insertions.  Sometimes while persisting these updates vCloud Director will stop the sync and restart it, hence the constant sync.

Here is how to get around the issue.
1. Take a snapshot of the cell.
2. Quiesce the services of the cells using the cell-management-tool and then stop the services with service vmware-vcd stop as described above.
3. Open vi and add this line to /opt/vmware/vcloud-director/etc/global.properties
database.defaultQueryTimeout=300

# vi /opt/vmware/vcloud-director/etc/global.properties

4. Start the vCloud Director services again.
# service vmware-vcd start

If you do the above for all cells then the setting should be applied.

How to Upload your own Virtual Machines to the StratoGen vCloud Platform

One of the most common questions our customers ask is ‘How do I upload my own VM images to your platform?’ – here’s a step by step guide.

Step 1 > Have your exported Virtual Machine files ready!

Remember, the StratoGen vCloud Platform will only allow you to upload files in the .OVF format. If you exported your virtual machine in the .OVA format, unfortunately you will need to redo the export process, ensuring you select OVF (Multiple Files option)

Step 2 > Log in to your StratoGen vCloud Director account

Using a supported browser, connect to your URL, as provided by your StratoGen representative at the time of sign up.  Enter your username and password to login to your account.

Step 3 > Select the ‘Catalogs’ tab

The initial homepage for your cloud is displayed. Now click on the ‘Catalogs’ tab.

Step 4> Create a new Organization Catalog

To add your OVFs the files into a catalog, you’ll first need to create one. Click on the green‘+’ to add a new catalog:

New vCloud Catalogue

Give the catalog a name, and step through the Wizard.

Step 5 > Upload OVF Files

One you’ve created your catalog, open it up, click on the upload button and then browse to the location that you exported the VMware Image file to, which in my case was the desktop:

Upload VMware Image OVF File

Select ONLY the .ovf file – the export process will have created a couple of other files but you don’t need to worry about these – the import process will pick them up:

Upload OVF

Click the ‘upload’ button in the catalogue wizard, and then wait for the import to the catalog to complete:

Upload VMware Image 4

The time taken to upload the Image will depend on the size, and the speed of your upload connection.

Step 6 > Deploy Virtual Machine from uploaded image

Once the upload has completed we are then able to deploy the .ovf into your vCloud Virtual Datacentre. In my demo account, I already have a couple of vApps set up, so I’m going to add the uploaded VM to one of my existing vApps.

To do this, open up the vApp, and then click on the ‘Add Virtual Machine’ button. The catalog wizard should pop up, defaulting to the catalog that you just created, and you should see your virtual machine in it. Select the VM, then click the ‘Add’ button and then click ‘Next’:

Deploy VMware Image 1

In the next step we need to give the VM a network connection – choose either the Direct Internet Connection for external connectivity, or import into an existing Internal Network structure – if applicable. Once the network has been added, click next through to the end of the wizard, and the VM Image will begin deploying. If I go back to my vApp diagram I can see the uploaded image is now deployed in my vApp alongside the other servers which were there previously:

Deployed VMware Image

That’s it! I can now power up the machine, and my VMware Image has been moved from my local cloud onto the StratoGen VMware Hosting platform.

Troubleshooting File Uploads

If you experience issues trying to upload .OVF files, they will most likely be caused by browser incompatibilities or Java related issues.

Browser Compatibility List (Correct for vCloud Director 1.5.1)

This table outlines support for browsers on Microsoft Windows operating systems:

This table outlines support for browsers on Linux operating systems:

Java Version 7 Issues

We have seen various issues with browsers using Java version 7. Typical problems include the ‘browse’ button not working when trying to load the file selector. If you experience a similar issue we recommend that you install and use Java JRE version 6 instead*. It is best to install the 32Bit and 64Bit versions. You can download the latest Java 6 from this URL:

http://www.oracle.com/technetwork/java/javase/downloads/jre-6u32-downloads-1594646.html

*Please check that this won’t impact any existing applications that you already have installed.

How to Offer Software Trials with StratoGen VMware Hosting & vCloud Director

StratoGen has recently been approcached by a number of ISVs looking for ways to offer cost effective trials of their server based software applications.  We all know that the best way to get prospects hooked on your product or VMware Hosting 7 Day Free Trialservice is to let them try it, preferably for free.  Once they have experienced your product first hand, they are much more likely to convert into a paying customer.  But we also know that conducting these trials can be expensive and in these tough times we all need to minimise our cost of sale.

So the team at StratoGen set about thinking of new & innovative ways to do this with the platform and tools that we already have in place.  Here’s where StratoGen VMware Hosting with vCloud Director comes in.

The most recent requirement was to be able to automatically spin up a trial VM instance with the ISV application on it, and for the trial to automatically expire after a defined period.

The solution was this:

  1. Create a ‘Pay As You Go’ (PAYG) Virtual Datacentre on the StratoGen VMware Hosting platform – PAYG customers pay for resources by the hour as they are consumed.
  2. Set the Runtime & Storage leases to the required software trial length, as defined by the ISV (this can be set to as short as 1 hour)
  3. Create a vApp template containing a Virtual Machine pre loaded with the ISV application
  4. Call on the vCloud API to deploy the trial machine from the vApp Template (eg from a web signup form)
  5. Pull IP address information for the deployed VM out of the vCloud API and pass this back to the trialist so they can access the VM with the trial software on it

With the Runtime & Storage leases set to the required trial length, the trial VM will automatically power off and be deleted when the lease expires, thus minimising the cost of the trial for the ISV.

In this particular scenario, a trial VM needed 2 x vCPU, 4GB RAM and 50GB storage.  The ISV wanted their trial to last for 2 hours just to give their customers a taste.

The cost of the infrastructure for this trial – just over US$1!

A neat solution requiring little or no custom integration, other than a little development into the vCloud API.

If you like the sound of this, there is plenty of documentation on the vCloud API which you can find on VMware’s website here

And of course if you want to test vCloud API integration you can do so with a StratoGen VMware Hosting 7 Day Free Trial