-
-
Notifications
You must be signed in to change notification settings - Fork 360
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Error when attempting to add a VM with Add-LabMachineDefinition #1572
Comments
I tried with another ISO as well, I still get the same error: PS C:\Users\svang> Get-Lab
Lab Name: BasementLab (HyperV)
LabFilePath: C:\ProgramData\AutomatedLab\Labs\BasementLab\Lab.xml
VM Path: C:\AutomatedLab-VMs
Machines: 3
Domains: 1
Networks: 1
PS C:\Users\svang> Add-LabMachineDefinition -Name "WIN10" -Memory 1GB -OperatingSystem 'Windows 10 Enterprise Evaluation' -Verbose
VERBOSE: [10:03:48][Write-LogFunctionEntry] Add-LabMachineDefinition Entering... (Name=WIN10,Memory=1073741824,OperatingSystem=Windows 10 Enterprise Evaluation,Verbose=True)
VERBOSE: [10:03:48][Write-LogFunctionEntry] Get-LabDefinition Entering... )
VERBOSE: [10:03:48][Write-LogFunctionEntry] Get-LabDefinition Entering... )
VERBOSE: [10:03:48][Write-ScreenInfo] Adding Hyper-V machine definition 'WIN10'
VERBOSE: [10:03:48][Write-ScreenInfo] 10:03:48|00:11:48|00:00:00.000| - Adding Hyper-V machine definition 'WIN10'
10:03:48|00:11:48|00:00:00.000| - Adding Hyper-V machine definition 'WIN10'
VERBOSE: [10:03:48][Write-LogFunctionEntry] Get-LabDefinition Entering... )
VERBOSE: [10:03:48][Write-LogFunctionEntry] Get-LabDefinition Entering... )
Exception: Lab is already imported. Please create a new lab definition by calling New-LabDefinition before adding machines Using the
@raandree maybe you can point me in the right direction? I am a bit blocked unfortunatley :( |
Did you get anywhere with this? I am running into the same problem working to get portable training environments for my colleagues. |
hey @dkettman I actually did. You actually should use
|
Sorry for my late answer. @Stephanevg, is the issue solved for you? |
Description
Hi,
I do have a an existing lab which a provisioned a few days back. I wanted to add an additional VM to it (a WIN11 machine) to do tests on that specific OS.
When I try, to use Add-LabMachineDefinition I get the following message back.
When I launch New-LabDefintion it actually proposes to create a new lab. Which is not what I want, and I specifically do not want to lose my existing lab. I would like to ADD a vm to it, and not add a second lab next it.
The documentation does not indicates that that is a mandatory step, and it would make sense to me that we could add VM's to an existing loaded (or not) lab.
Steps to reproduce the issue
PowerShell Version
AutomatedLab Version
The text was updated successfully, but these errors were encountered: