[New Feature]: Ability to specify Generation 1 or Generation 2 #1527
-
DescriptionHey there! I'm looking to automate creation of images for several different SKUs, and everything is working great - thank you very much for your help earlier! I need to be able to create VMs that are in Legacy boot mode or UEFI. boot mode. I believe the only way to achieve this is to create generation 1 (Legacy boot mode) or generation 2 (UEFI boot mode) VMs. I do not believe it is currently possible to specify the generation of the VM. Is there a workaround in the interim to permit creation of 4 VMs in Generation 1 mode and the rest of my need (8 VMs) in generation 2 mode? If not, would this be possible to achieve through some scripted methodology? |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 7 replies
-
I may have found a temporary workaround - I'm testing it as a theory right now. I'm pre-creating the generation 1 VM before creating the lab definition and installing the lab
|
Beta Was this translation helpful? Give feedback.
-
Hi @JacobPitcher-EEG this is possible using our config mgmt: # one time
Set-PSFConfig -Module 'AutomatedLab' -Name SupportGen2VMs -Value $false
# Permanent
Set-PSFConfig -Module 'AutomatedLab' -Name SupportGen2VMs -Value $false -PassThru | Register-PSFConfig |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
In any case, I've got the following log output to share from a couple test runs (I commented out the UEFI ones to force it to try the legacy mode ones, which is why there are multiple runs:
|
Beta Was this translation helpful? Give feedback.
-
Thoughts on how one might accomplish this process with a legacy mode image/vm? |
Beta Was this translation helpful? Give feedback.
Thanks for you research, @JacobPitcher-EEG. It's been a while since we have written the code and it's also been a while since I needed a gen1 VM.
We cannot use a GPT base disk with Gen1 VMs.
New-LWReferenceVHDX
supports creating MBR base disks. When referencing to that MBR base creating a Gen1 VM works.