-
Notifications
You must be signed in to change notification settings - Fork 80
Import OVA to Azure
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:
-
Microsoft Virtual Machine Converter 3.0 - https://www.microsoft.com/en-us/download/details.aspx?id=42497
-
Powershell on windows 2012 (win7 doesn't include the relevant packages, installing them is a nightmare, don't even try)
-
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.
- Make sure you have OVA with NooBaa installed on it.
- Make sure the Guest OS on the ESX is CentOS, otherwise MS tool will not be able to export it.
- 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/
- 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
-
Double click on azure.pfx and follow the wizard, all with default. It will install the certificate in the personal certificate store.
-
Open IE -> tools -> internet options-> content -> certificates -> trusted Root Certification Autorities - import - provide azure.cer
-
open azure old portal https://manage.windowsazure.com -> Settings-> management certificates (tab) -> upload. Provide the azure.cer
-
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.
-
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)
-
In my case, the tool always managed to convert, but also failed to upload. Therefor I used Azure CLI.
-
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!