Protecting Virtual Machines from a vCenter Server : Replication From a Protected Site vCenter Server to a Recovery Site Microsoft Azure : Converting Premium Virtual Machines for Protection
  
Converting Premium Virtual Machines for Protection
 
The Premium to Standard Conversion tool enables replicating and failing over Premium VMs in Azure. The tool clones the Premium Managed VMs and creates the same VM with Standard Storage disks, which the ZCA will then be able to protect.
The Premium to Standard Conversion tool is installed on the Azure ZCA machine as part of the ZVM installation.
The tool requires the user to enter input parameters which are then parsed and validated. Once the input parameters are validated, the application starts running. The conversion process then begins for each of the Premium VMs received in the input parameters.
 
GLOSSARY:
Premium VM: A Premium VM is when the original VM has all its disks on Premium Managed storage.
Note: We do not support conversion of VMs with disks on Premium Storage account.
Standard VM: A Standard VM is a copy made of the Premium VM, where the disks are copied from Premium Managed storage to the ZCA’s Standard Storage account.
 
IMPORTANT:
Note that running the Premium to Standard Conversion tool will cause your Premium VM to be powered off.
To convert Premium VMs for protection:
1. From the Azure ZCA machine, locate the Premium to Standard Conversion tool folder from under the main ZVM installer folder.
2. Download and extract the Convert Premium VM tool files.
3. Copy the name of the tool (exe. file).
4. Open the Command Prompt window and paste the name of the tool (exe. file) to the command.
5. There are two ways to insert parameters; either as flag arguments or as a path to a .json file that contains the input parameters.
The following parameters need to be entered:
User Name & Password: These are the same credentials used in the ZCA installation.
Region Id: The region in which the VM to be converted resides.
Subscription Id: The subscription in which the VM to be converted resides.
VM Identifiers: The list of VMs that need to be converted. If more than one VM needs to be converted, the VM Identifiers should be separated with commas.
The VM identifier should be copied from the Premium VM properties (Properties tab > Resource ID.)
Storage Account Name: The storage account as defined for the ZCA.
Container Name: The name of the container in the Standard Storage Account where the new volumes will be stored.
 
NOTE:
You can view argument examples within the Command Prompt window by entering the help argument (e.g. ‘-h’)
 
FLAG ARGUMENTS RUNNING EXAMPLE:
-u username@microsoft.com -p 12345678 -s f241xxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx -r “West Europe” --vms /subscriptions/f241xxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourceGroupName/providers/Microsoft.Compute’virtualMachines/Win2016Vm,subcriptions/f241xxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourceGroupName/providers/Microsoft.Compute/virtualMachines/WindowsS2016 -sa storageaccountname -c containername
 
.JSON FILE EXAMPLE:
Path to a .json file argument:
ConvertPremiumVm C:\jsonFolder\inputFile.json
(If the .json file within the folder contains the .exe file of the application, you can just insert the name of the .json file, without the application name)
.json file content:
{
"UserName": "name@gmail.com",
"Password": "123456",
"SubscriptionId": "f241xxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"RegionId": "West Europe",
"VMsIdentifiers": [
"/subscriptions/f241xxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/namerglocal/providers/Microsoft.Compute/virtualMachines/PremiumVmTest",
"/subscriptions/f241xxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/namerglocal/providers/Microsoft.Compute/virtualMachines/PremiumVmTest1"
],
"StorageAccountName" : "namelocal1",
"ContainerName" : "vhds"
}
 
NOTE:
Do not perform any actions on the VMs that are converting until the conversion process is completed.
6. The information is parsed and the log files are printed and saved to the Premium to Standard Conversion tool folder. The conversion process is performed for each VM sequentially. The following occurs:
The Premium VM is turned off (if necessary).
The VM’s volumes are copied into the Standard Storage account as defined in the Storage Account Name parameter. The copy is done sequentially.
The Premium VM NICs are detached and receives a NIC with a single IP, regardless of its original NIC/IP configuration.
A new VM is created in the Standard Storage account, with the identical NICs as defined in the original VM.
The name of the new VM is “<original_name>-Standard” with the new standard volumes attached to it.
7. Create a VPG with the new Standard Storage VMs to start protecting them. See Protecting From a Microsoft Azure Site - To a Microsoft Azure Recovery Site.
 
NOTE:
Upon failing over the Standard VM, only one IP address is assigned to the recovered VM. Any additional network configurations should be entered manually.
 
Undo Process
If there is a failure in one of the phases during the conversion process, the system will automatically rollback to the previous state.
If at least one volume cannot be copied, all volumes that have already been copied to the Standard VM are deleted. The Premium VM is then powered on again (only if the VM was powered on in its original state).
In some cases the system won’t succeed to automatically rollback, for example, if the tool’s application crashes. You can open the log entries to see which undo operations are left to execute. In this case, you need to manually rollback to the previous state, as required at each stage, depending where the failure occurred.
To manually rollback:
1. Detach the NICs from the Standard VM and attach it to the powered down Premium VM.
2. Delete the new primary NIC that was created for the Premium VM.
3. Remove disks from the Standard Storage account.
4. Power on the Premium VM (if necessary).