Finally the Azure Site Recovery service can be reached from the new Azure Portal and the ARM way of doing things! It has been possible to use ASR with PowerShell and the new ARM way for some months but only for a subset of the site recovery services (VMM/Hyper-V).
Not a day to soon! I have a customer that we have engaged in the CSP program and as that is based on the new, the old ASR was not possible to use with that subscription and use another subscription just for ASR sucks..
As you can see on the following screendump I go into the “Getting Started” to select scenario and then follow the guide to complete and in the case with physical and VMware I need to install a process/configuration server on-premise.
Once installed on a Windows 2012 R2 server I connect it to the ASR with the registration file,
One thing to think about using this service is that the process server will if you do not go in and configure the bandwidth settings eat all available internet capacity as my customer so nicely explained…
Configure this to something that works for both you and the company, and with the enhanced ASR where you do not need additional servers in Azure you find this setting in the backup properties.
It is quite easy to start and protecting your workloads and remember that the first 30 days are free 🙂
During the day I have been digging into the Microsoft Operations Management Suite which is a collection of cloud services that you can get for a quite reasonable price.
The different services included is Log Analytics, Security, Automation, Availability.
I have registered my on premise Windows Servers in the log analyzer and started uploading logs getting a nice overview with several out of the box solutions that will give you a heads up on areas in your environment that needs attention…
So how about the automation? I have already been using the automaton for different services within Azure but in this case I wanted to see how I could utilize the Hybrid worker and the VMware environment residing there.
With the release of VMware PowerCLI 6 some of the stack are remade as PowerShell Modules.
So if I configure a hybrid worker on premise with the PowerCLI installed I can then utilize that in a runbook that as an example takes an input variable VMName and restarts the VM (in this case I do it without being nice and asking for a shutdown but just pulling the plug)
And here is the runbook:
And here I start the runbook with the variable,
And as you can see in the vSphere Client my VM winrecover restarts
This can of course be made a bit more complex and also as you can see in the Azure automation view, scheduled. So if you have something that needs to be automated at 11 PM every night within your VMware vSphere environment it can be done by Azure Automation and Hybrid workers..
A colleague asked me if there was an easy way to reconfigure VM´s that was on different hosts with PowerCLI, for some reason the VM´s had been configured with too many vCPU´s and the customer wanted a way to reconfigure the running VM´s.
I made a very easy PowerCLI script to solve this, maybe there is other solutions that might be better/more beautiful but this one solved the issue 🙂
You save this as a script and then run it with the starting name of the VM´s you want to configure, and as you can see you have to already have connected to the vcenter with Connect-VIServer before running it:
There where some bashing on the net when the VMM 2012 R2 was released and the P2V functionality was removed from that version and some crazy ideas using a secondary VMM 2012 SP1 to do the P2V migrations and then importing into the VMM 2012 R2 was suggested, well that time is now no more now 🙂
The installation is quite straightforward with the msi and just a simple wizard.
Once installed You can start exploring the new options including the new P2V.
When doing a P2V the MVMC will install an agent on the source and when doing a P2V the source have to be online during the migration.
And then you go through the wizard and start the conversion
Once it is finished, you find the VM in your Hyper-V host and can start it, but beware that the wizard does not ask if you want to shut down your source after migration so that is something you have to take care of before starting that P2V´d VM
But wait you say, I have 100 vm´s and will die if I use the wizard for all of them! Then you can use the PowerShell module and automate the conversion:
The operating systems that is supported migrating with the MVMC are (although only Windows with the P2V):
And as you can see I managed to add the vCenter Server and after adding a ESXi host the view in VMM looks like this
Checking it in PowerShell, I can see that it looks and reports in the same manner as the 5.1 vCenter that I have registered
And after some VM massage I can see that basic tasks as starting, stopping and also taking snapshots works as intented through the vCenter 5.5.
Of course new features introduced in vCenter 5.5 and ESXi 5.5 for the VM´s will not work and there might be other things that also can have issues, I will continue to explore and if I find anything that seems to be a showstopper I will do a followup blog post.
This evening (in my timezone) Microsoft released the new version of the Microsoft Virtual Machine Converter 2.0 that has the functionality to also migrate VM´s to Azure in the wizard. I wanted to take that path for a spinn to test and see how that worked.
There are still some things to think about when using the tool,
it still uses ovf export
the VM in VMware is offline during the copy of the vmdk data (it creates a VHD for Azure, but if you choose a Hyper-V host you can set it to create a VHDX instead), this can with large amounts of data take some time and will consume space on the converter server.
The VM´s Windows OS has to be joined in a Active Directory domain, and the account being used has administrative rights in the VM to successfully uninstall VMware tools during conversion.
No EFI support, meaning that the VM´s in your vSphere has to be setup with BIOS to be able to convert (Windows 2012 and later is from a best practice in VMware configured with EFI), but UEFI support is only on VM´s i generation 2 and Azure does not have that, at least not yet..
So how does it work in a migration from a VMware VM to Azure, well first of all in the wizard I select to migrate to Azure
Then I will add some information for the connection to my Azure subscription (yes I have done some editing in the image so not the whole world reading my blog would se my cert thumbprint and sub id)
After that I select what storage account I want the VHD to be transferred to (smart to think twice to select the storage account in the region where you have the network configured if you are using site 2 site vpn and such 😛 ).
Then I connect to either vCenter or an ESXi and select what VM I want to convert
After that I either use the already entered credentials or other and the state of the source VM for a successful VMware tools uninstall and as it is being migrated to Azure I do not get the option to select state of the destination VM (that can of course if used with the Azure PowerShell module and MVMC module be automated)
For the MVMC to succeed in its task to move the VM to Azure it has to store the VHD somewhere before moving it up to the cloud, the little caveat here is that it will create a fixed size vhd so bare that in mind when selecting the drive so you have space!
Then it´s time to kickoff the conversion
And as you can see in my vCenter the conversion is under its way
And then after some waiting the conversion and the upload to azure has completed,
Now I can enter the Azure management portal and create a VM and from the gallery select this disk disk_testmigrate_00_os.vhd , as the MVMC creates a disk pointer from the storage blob (the VHD) I do not need to do that part.
And then I can connect to the VM
Apparently I had some issues creating the VM as a Basic but using standard it worked nicely and as you can see I managed to get an RDP session to it.. So it was not lost in the cloud as in this Dilbert cartoon 😛
Today Microsoft released the long awaited new version of the Virtual Machine Converter (the 1.0 version could be integrated with MAT but had limits in both VMware and Hyper-V latest releases). Microsoft has also released a new version of the MAT (migration automation toolkit) that supports the MVMC 2.0 to automate the migration!
New Features in MVMC 2.0
MVMC 2.0 release of MVMC includes the following new features:
Converts virtual disks that are attached to a VMware virtual machine to virtual hard disks (VHDs) that can be uploaded to Windows Azure.
Provides native Windows PowerShell capability that enables scripting and integration into IT automation workflows.
Note The command-line interface (CLI) in MVMC 1.0 has been replaced by Windows PowerShell in MVMC 2.0.
Supports conversion and provisioning of Linux-based guest operating systems from VMware hosts to Hyper-V hosts.
Supports conversion of offline virtual machines.
Supports the new virtual hard disk format (VHDX) when converting and provisioning in Hyper-V in Windows Server® 2012 R2 and Windows Server 2012.
Supports conversion of virtual machines from VMware vSphere 5.5, VMware vSphere 5.1, and VMware vSphere 4.1 hosts Hyper-V virtual machines.
Supports Windows Server® 2012 R2, Windows Server® 2012, and Windows® 8 as guest operating systems that you can select for conversion
I have had the pleasure to find a new book about PowerCLI that have been released.
Learning PowerCLI by Robert van den Nieuwendijk
The book has 10 chapters and is truly a bible for a VMware Admin that wants to learn how to utilize PowerCLI in their environment. The book covers the latest version of PowerCLI and PowerShell v3.
If you are new to PowerShell and PowerCLI the first chapters gives you great guidance in how to do basic things and once you feel comfortable you can continue with the other chapters and start automating your daunting tasks as a VI Admin!
I have done some magic with PowerCLI and I can recommend you to add it to your shelf to be comfortable in your career 🙂
The last two days I was on the road and presented my session on migrate to Hyper-V and that on the Nordic System Center Summit that was hosted by my company Lumagate. We visited both Stockholm and Oslo.
Both Travis Wright and Chris Ross from Cireson was with us and had some really interesting sessions!
In my presentation I described the different ways to migrate and how to prepare for a large migration and that in different ways of automation.