Thursday, March 17, 2011

How to install the Amazon EC2 VM Import Connector for VMware vCenter

Another day, another cloud development! Amazon have released a connector which allows you to V2V your VMware virtual machines to the Amazon cloud! Will there come a day where Amazon VPC (Virtual Private Cloud) reigns supreme and VMware has gone the way of the dodo? Will it be cheaper to pay Amazon a monthly fee rather than put ESXi on a Dell Chicken McPowerEdge? This product reminds me of the old VMware P2V Assistant (the predecessor to VMware Importer/VMware Converter) – clunky but an important element of a greater picture.

After importing a few VMs, I can say the Amazon EC2 VM Import Connector for VMware vCenter feels like a 1.0 product. It’s difficult to use and there’s a few strange design decisions, but one day we’ll be performing V2As (VMware2AmazonEC2) as regularly as we perform P2Vs. 

Anyway, back to reality. There are a few limitations with this tool.

  • The VM must be deployed into a network with a DHCP server! If you don’t have a DHCP server, you can’t deploy this appliance. This is annoying. YOU CANNOT DEPLOY THIS APPLIANCE WITHOUT A DHCP SERVER. You can assign a static IP later, but you need the DHCP server to complete installation.
  • No live conversions. You must power off your virtual machine before importing it to EC2.
  • Any VM you export to EC2 can’t have a virtual disk larger than 1TB
  • The disk of the Amazon EC2 VM Import Connector VM must be large enough to hold an image of the VM you want to export. Do you want to upload a 500gb VM? You’ll need another 500gb of staging space.
  • The Amazon Import Connector requires direct access to the internet. Proxies are not supported.
  • Before you perform your V2V, remember to configure the firewall correctly and enable Remote Desktop access. If you don’t, the V2V will succeed…but you’ll have no way of logging into it! Amazon doesn’t have a ‘remote console’ function yet.
  • On a slow internet connection? You have 7 days to upload your VM. That’s not a problem if you have a fast internet connection in a country with an Amazon datacentre (United States, Ireland, Singapore, Japan) but you might be waiting awhile if you’re in Australia!

To install the Amazon EC2 VM Import Connector for VMware vCenter (that’s a mouthful), perform the following tasks.

  1. Download the Amazon EC2 VM Import Connector for VMware vCenter OVA.
    At the time of writing, the latest version is Amazon-EC2-VM-Import-Connector.ova (version 1.01)
  2. In vCenter, click File then Deploy OVF Template…
  3. In the Source screen, click Browse… and select the OVA you have downloaded.

    Deploy OVF template: select the source location
  4. On the OVF Template Details, confirm you have enough disk space then click Next.

    Deploy OVF Template: Verify OVF template details
  5. On the Name and Location screen, enter the name of the VM and select an inventory location then click Next.

    Deploy OVF Template: Name and Location
  6. On the Host / Cluster screen, select the host and cluster then click Next.

    Deploy OVF Template: Which host?
  7. On the Datastore screen, select where you want to place the Amazon VM. emember, the VM is 1gb thin-provisioned and a 250gb thick-provisioned. Click Next to continue.

    Deploy OVF template: select datastore
  8. On the Disk Format screen, select whether you want the Amazon VM to be thick or thin-provisioned. If unsure, choose thick. Click Next to continue.

    Deploy OVF template: select disk format
  9. On the Network Mapping screen, select the destination network you want the Amazon VM to connect to, then click Next.

    Deploy OVF template: select network mapping
  10. On the Ready to Complete screen, click Finish to deploy the Amazon VM.

    Deploy OVF template: ready to complete
  11. When the deployment has completed, click Close.

    Deploy OVF Template: deployment completed successfully
  12. In the vCenter client, power on the Amazon VM.
    Interestingly, it appears to be a FreeBSD VM.

    Amazon EC2 VM Import Connector-1.0.1
  13. Right-click on the VM and click Open Console.
    You can see the Amazon VM starting up. Upon startup, it will attempt to get a DHCP IP address. If you don’t use DHCP, this will time out.

    DHCP discovery

    The VM will eventually reach a login screen which has a Management Website and Management Password. Record these two details for later.

    If you don’t have DHCP on your network and get a 172.x.x.x address, you will not be able to proceed - turn off the VM now and put a temporary DHCP server on your network!

    Amazon S3 Import Connector - website and password details
  14. Open a web browser and browse to the management website listed.
    Enter the Management Password then click Login.

    Amazon EC2 VM Import Connector for VMware vCenter web interface
  15. If you don’t want to use DHCP, perform the following tasks.

    Click on the Network tab then click Static Config.
    Amazon EC2 VM Import Connector for VMware vCenter network configuration

    Enter your networking details then click Configure Static IP

    Amazon EC2 VM Import Connector for VMware vCenter static network configuration

    When the networking details have been saved, a green box will appear. Click the Click to Manage link to return to the main screen.

    Amazon EC2 VM Import Connector for VMware vCenter network configuration - static IP configuration successful
  16. Click the vCenter tab then click Register.
    Enter the vCenter IP/Hostname and the username and password of a user account with access to vCenter, then click Register Connector with vCenter.

    Connector registration with vCenter

    If you enter an incorrect hostname, you will get the error message x is not a valid value for vCenter IP/Hostname.

    is not a valid value for vCenter IP/Hostname

    If you enter an incorrect username or password, you will get the error message The Username and/or Password is not correct.

    The Username and/or Password is not correct.

    If you enter a correct account that doesn’t have privileges, you’ll get the error message An Unknown error occurred. Please try again.

    An unknown error occurred. Please try again.

    If all your details are correct, you’ll get the message vCenter Connector registered with the vCenter Server successfully.

    vCenter Connector registered with the vCenter Server successfully.

    When you’re successful, you’ll receive the usual certificate warning. Install the certificate and click Ignore.

    The usual vCenter certificate warning
  17. Click on the Status tab. All elements should be marked as [OK].

    Amazon EC2 VM Import Connector Status
  18. Close the web page.
  19. Close and reopen vCenter.
  20. Open the vCenter Plug-in Manager (Plug-ins > Manage Plug-ins)

    Confirm that the EC2 Conversion Plug-in (version 0.5) is installed. There is no need to enable it.

    EC2 Conversion Plug-in in the VMware Plug-in Manager
  21. Click on any VM in your environment.
    There should be an additional tab at the top.

    Additional Import to EC2 tab on VM

Congratulations, you have installed the EC2 importer!

In the next article in this series, I’ll actually perform a V2V to Amazon!

12 comments:

  1. Thank you! This was an excellent walkthrough and made it very easy.

    ReplyDelete
  2. I kept getting "username and password are not correct" even though the password was correct. I'm not certain but I suspect the error was because the password used dollar signs for special characters.

    ReplyDelete
  3. Hi,
    is there any way to modify the webserver password and web management IP.

    Thanks
    Yoga

    ReplyDelete
  4. Very helpful guide me through a couple of rough spots. Unfortunately, I'm running into a big ole error message when attempting to register. Wondering if this means anything to anyone:

    Error: Attribute xsi:nil not allowed on element _this, which is not nillable.

    while parsing call information for method RegisterExtension
    at line 1, column 227

    while parsing SOAP body
    at line 1, column 213

    while parsing SOAP envelope
    at line 1, column 38

    while parsing HTTP request for method registerExtension
    on object of type vim.ExtensionManager
    at line 1, column 0

    ReplyDelete
    Replies
    1. same problem here

      Delete
    2. Any fixes for this error message yet??

      Delete
    3. I believe this error message is caused if you try to connect to ESXi, as opposed to vCenter Server, which is an actual server you can run ON your ESXi box (It is used to manage multiple ESXi's). You can download it as an OVA trial from vmware, then tell the VM Import tool to connect to IT, instead of your ESXi itself.

      Delete
  5. Hi,
    The install went on well and i can see the 'Import to EC2' option in vCenter, but if i click on it, i keep getting authorization failure (this user is not authorized to use the service.

    Thanks
    Amit

    ReplyDelete
    Replies
    1. I am having the same issue... I know the issue it needs the Amazon credentials but where do you apply them? Has anyone ever used this tool to do an import?

      Delete
    2. ****UPDATE**** I found out in a AWS forum tha the connector only works with Vmware 4.0 - 4.1 I happen to be running 5.1 :-(

      Delete
  6. I logged in as root and ran sysinstall to update the IP to a static one.
    Rebooted and the web services are not starting (no answer on port 80/443)
    I'm logged in as root - how do I manually start the webservices?
    I'm not seeing any obvious apache/tomcat/other web service rc.d script

    thanks

    ReplyDelete
  7. hi, i have an error while registering to vcenter

    ( Error: Attribute xsi:nil not allowed on element _this, which is not nillable. while parsing call information for method RegisterExtension at line 1, column 227 while parsing SOAP body at line 1, column 213 while parsing SOAP envelope at line 1, column 38 while parsing HTTP request for method registerExtension on object of type vim.ExtensionManager at line 1, column 0)

    Please help

    ReplyDelete