Skip to content

[New Feature]: Ability to specify Generation 1 or Generation 2 #1527

Closed Answered by raandree
JacobPitcher-EEG asked this question in Q&A
Discussion options

You must be logged in to vote

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.

Set-PSFConfig -Module 'AutomatedLab' -Name SupportGen2VMs -Value $false

New-LabDefinition -Name Legacy1 -DefaultVirtualizationEngine HyperV -VmPath E:\AL

$baseDiskPath = 'E:\AL\2016-0.vhdx'
$osName = 'Windows Server 2016 Datacenter (Desktop Experience)'
$os = Get-LabAvailableOperatingSystem | Where-Object OperatingSystemName -eq $osName

if (-not (Test-Path -Path $baseDiskPath)) {
    Ne…

Replies: 5 comments 7 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@JacobPitcher-EEG
Comment options

@nyanhp
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
5 replies
@nyanhp
Comment options

@JacobPitcher-EEG
Comment options

@JacobPitcher-EEG
Comment options

@raandree
Comment options

Answer selected by JacobPitcher-EEG
@JacobPitcher-EEG
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #1526 on May 22, 2023 12:27.