Import OVA to Azure - noobaa/noobaa-core GitHub Wiki

Introduction for the short way (trust me, I tried all)

The basic idea is exporting OVA from ESX, convert it to VHD and upload it to Azure as image.

The best and only way that actually worked for me is by using Windows 2012 machine on ESX and use three main tools:

  1. Microsoft Virtual Machine Converter 3.0 - https://www.microsoft.com/en-us/download/details.aspx?id=42497

  2. Powershell on windows 2012 (win7 doesn't include the relevant packages, installing them is a nightmare, don't even try)

  3. Azure CLI for windows - http://aka.ms/webpi-azure-cli - don't try npm or the others. I tried most. got bugs/issues with each.

Steps

  1. Make sure you have OVA with NooBaa installed on it.
  2. Make sure the Guest OS on the ESX is CentOS, otherwise MS tool will not be able to export it.
  3. There is one Machine on GBIO called NooBaa-Community-Edition-Azure. It's ready. If you need to prepare new image - follow the instructions here https://azure.microsoft.com/en-us/documentation/articles/virtual-machines-linux-create-upload-centos/
  4. Create certificate - Use powershell on windows 2012 and run the following commands:

$cert = New-SelfSignedCertificate -DnsName noobaa.cloudapp.net -CertStoreLocation "cert:\LocalMachine\My"

$password = ConvertTo-SecureString -String noobaa -Force -AsPlainText

Export-PfxCertificate -Cert $cert -FilePath ".\azure.pfx" -Password $password

Export-Certificate -Type CERT -Cert $cert -FilePath .\azure.cer

  1. Double click on azure.pfx and follow the wizard, all with default. It will install the certificate in the personal certificate store.

  2. Open IE -> tools -> internet options-> content -> certificates -> trusted Root Certification Autorities - import - provide azure.cer

  3. open azure old portal https://manage.windowsazure.com -> Settings-> management certificates (tab) -> upload. Provide the azure.cer

  4. Open Microsoft Virtual Machine Converter. Follow the wizard. The subscription-id is the one you can find in the newly created line you got in the management certificates table. The thumbprint is the certificate thumbprint without spaces.

  5. In the next steps you will need to provide storage account, your ESX IP and credential and select azure ready linux (see point number 3)

  6. In my case, the tool always managed to convert, but also failed to upload. Therefor I used Azure CLI.

  7. Open CMD and type the following:

azure config mode asm azure login (follow the instructions)

The following command will upload the image to the blobs storage on Azure.

azure vm image create --blob-url https://<blobs container, simply copy the endpoint from azure portal>.blob.core.windows.net// --os Linux

e.g:

azure vm image create NooBaa05 --blob-url https://noobaaimage.blob.core.windows.net/images/noobaa05.vhd --os Linux c:\temp\MVMC\0\disk-0.vhd

  • The following command will create virtual machine. The location should be the container location.

azure vm create --userName noobaaroot2 --password Passw0rd! --vm-size Small --ssh --location "East US" "NooBaa05" NooBaa05

Done!

⚠️ **GitHub.com Fallback** ⚠️