What is a generation 1
Convert Hyper-V Generation 1 VM to Generation 2 VM
I am always asked how a generation 1 VM can be converted into a generation 2 VM under Hyper-V. Officially this is not possible:
However, if the guest operating system in the VM to be converted meets the requirements for a generation 2 VM:
The Convert-VMGeneration Script from John Howard (Senior Program Manager in the Hyper-V Team at Microsoft) can help in many cases. The script can be found under the following link:
It is important to mention that neither Microsoft nor John Howard provide support for this script, i.e. you should ensure that your VMs and your entire environment are adequately backed up before you start the conversion.
First the VM to be converted has to be started. There must be in an administrative prompt via the command:
reagentc / disable
Deactivate the Recovery Agent console:
Then the guest operating system in the VM must be shut down.
A PowerShell window with administrative rights must now be started on the Hyper-V host.
There, by entering:
Set-ExecutionPolicy –ExecutionPolicy unrestricted
the execution policy adjusted:
The conversion process can then be started by entering the following:
. \ convert-vmgeneration.ps1 -VMName "WS2012R2Gen1" -Path W: \ VMs
In my example, the VM with the name "WS2012R2Gen1" is converted and the generation 2 VM is to be stored under "W: \ VMs":
The script creates a new generation 2 VM which takes over the settings of the original generation 1 VM. A new virtual hard disk is also created for the new generation 2 VM. In order to transfer the data from the virtual hard disk of generation 1 VM to the virtual hard disk of generation 2 VM, both virtual hard disks are mounted on the host:
Check the mounted hard disks on the host system as indicated in the output of the conversion script:
In my example, disk 3 will be completely overwritten - so please manually check whether this is correct via e.g. the disk management.
After confirming with "Y" the script continues to work. Depending on the data volume and storage throughput, it will now take some time for the conversion to be completed.
After completing the process, there is a new virtual machine of type Generation 2 - in my example "WS2012R2Gen1 (Generation 2):
The original generation 1 VM is retained, but should be deleted after the generation 2 VM has been successfully tested.
Now start the generation 2 VM created by the conversion and log in. Open a command prompt in the VM console and execute the following command:
reagentc / enable
- How prestigious is UC Berkeley
- Does the Christian God have a wife?
- Which country is better Norway or Japan
- What are the traditional foods of Gujarat
- Will Trump's politics overheat the economy
- Milennials Millennials are the next big thing
- How can we avoid crawling
- Which is the worst state of india
- Are the people in Denver reserved
- Why do we follow a fashion
- Is the Trump economy detrimental
- How can the sending of SMS be stopped while driving?
- What is a Vedic wedding
- Where do rich people live in Jakarta
- Will you contribute to a political campaign
- Why is Zomato better than Swiggy
- When should I buy Tata Motors stock?
- Can amblyopia be viewed as a disability
- What sucks about being retired
- What do billionaires think of millionaires?
- Are the free SEO tools good
- Did the Prophet Muhammad curse people
- Which country is better than the USA
- Why is Adele more famous than Pavarotti