Skip to content
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]: Unable to deploy lab #1497

Open
aaearon opened this issue Mar 1, 2023 · 15 comments
Open

[Bug]: Unable to deploy lab #1497

aaearon opened this issue Mar 1, 2023 · 15 comments
Assignees
Labels
Stale The item has been there for a while and not updated. Quite soon it will be closed.

Comments

@aaearon
Copy link

aaearon commented Mar 1, 2023

Description

I attempted to install my first lab using the steps provided at https://automatedlab.org/en/latest/Wiki/Basic/gettingstarted/. After I invoke Install-Lab, the base image is created and the virtual machine is created in Hyper V however when connecting to the machine it shows the Microsoft Hyper-V UEFI screen with an error message that no operating sytem was loaded.

I have tried different ISOs (Windows Server 2019, 2022, Windows 11) and have the same experience with all three. I have Hyper-V virtual machines created manually with the same ISOs.

Steps to reproduce the issue

New-LabDefinition -Name GettingStarted -DefaultVirtualizationEngine HyperV

Add-LabMachineDefinition -Name FirstServer -OperatingSystem 'Windows Server 2019 Datacenter Evaluation (Desktop Experience)'

Install-Lab

PowerShell Version

Name                           Value
----                           -----
PSVersion                      7.3.3
PSEdition                      Core
GitCommitId                    7.3.3
OS                             Microsoft Windows 10.0.22621
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

AutomatedLab Version

Name                      Version
----                      -------
AutomatedLab              5.47.0
AutomatedLab.Common       2.3.5
AutomatedLabDefinition    5.47.0
AutomatedLabNotifications 5.47.0
AutomatedLabTest          5.47.0
AutomatedLabUnattended    5.47.0
AutomatedLabWorker        5.47.0
@nyanhp nyanhp changed the title [Bug]: [Bug]: Unable to deploy lab Mar 1, 2023
@nyanhp nyanhp self-assigned this Mar 1, 2023
@nyanhp
Copy link
Member

nyanhp commented Mar 1, 2023

Since I am unable to reproduce this with my en-us ISOs, are you able to let us know which ISO specifically you did try?

@aaearon
Copy link
Author

aaearon commented Mar 1, 2023

Yes, output below:

Get-LabAvailableOperatingSystem -Path C:\LabSources | Select-Object -Property OperatingSystemName,Version,PublishedDate,IsoPath | ft -AutoSize

OperatingSystemName                                            Version         PublishedDate         IsoPath
-------------------                                            -------         -------------         -------
Windows Server 2019 Standard Evaluation                        10.0.17763.3650 11/5/2022 8:14:03 PM  C:\LabSources\ISOs\17763.3650.221105-1748.rs5_release_svc_refresh_SERVER_EVAL_x64FRE_en-us.iso
Windows Server 2019 Standard Evaluation (Desktop Experience)   10.0.17763.3650 11/5/2022 8:19:22 PM  C:\LabSources\ISOs\17763.3650.221105-1748.rs5_release_svc_refresh_SERVER_EVAL_x64FRE_en-us.iso
Windows Server 2019 Datacenter Evaluation                      10.0.17763.3650 11/5/2022 8:10:27 PM  C:\LabSources\ISOs\17763.3650.221105-1748.rs5_release_svc_refresh_SERVER_EVAL_x64FRE_en-us.iso
Windows Server 2019 Datacenter Evaluation (Desktop Experience) 10.0.17763.3650 11/5/2022 7:35:47 PM  C:\LabSources\ISOs\17763.3650.221105-1748.rs5_release_svc_refresh_SERVER_EVAL_x64FRE_en-us.iso
Windows Server 2022 Standard Evaluation                        10.0.20348.169  8/7/2021 1:39:58 AM   C:\LabSources\ISOs\20348.169.210806-2348.fe_release_svc_refresh_SERVER_EVAL_x64FRE_en-us.iso
Windows Server 2022 Standard Evaluation (Desktop Experience)   10.0.20348.169  8/7/2021 1:48:12 AM   C:\LabSources\ISOs\20348.169.210806-2348.fe_release_svc_refresh_SERVER_EVAL_x64FRE_en-us.iso
Windows Server 2022 Datacenter Evaluation                      10.0.20348.169  8/7/2021 1:39:11 AM   C:\LabSources\ISOs\20348.169.210806-2348.fe_release_svc_refresh_SERVER_EVAL_x64FRE_en-us.iso
Windows Server 2022 Datacenter Evaluation (Desktop Experience) 10.0.20348.169  8/7/2021 1:44:10 AM   C:\LabSources\ISOs\20348.169.210806-2348.fe_release_svc_refresh_SERVER_EVAL_x64FRE_en-us.iso
CentOS-7                                                       7.0             10/26/2020 5:26:16 PM C:\LabSources\ISOs\CentOS-7-x86_64-Minimal-2009.iso
Ubuntu-Server 22.04.1 LTS "Jammy Jellyfish"                    22.4            8/9/2022 12:00:00 AM  C:\LabSources\ISOs\ubuntu-22.04.1-live-server-amd64.iso
Windows 11 Home                                                10.0.22621.525  9/25/2022 3:47:30 AM  C:\LabSources\ISOs\Win11_22H2_English_x64v1.iso
Windows 11 Home N                                              10.0.22621.525  9/25/2022 3:46:10 AM  C:\LabSources\ISOs\Win11_22H2_English_x64v1.iso
Windows 11 Home Single Language                                10.0.22621.525  9/25/2022 3:50:17 AM  C:\LabSources\ISOs\Win11_22H2_English_x64v1.iso
Windows 11 Education                                           10.0.22621.525  9/25/2022 3:58:35 AM  C:\LabSources\ISOs\Win11_22H2_English_x64v1.iso
Windows 11 Education N                                         10.0.22621.525  9/25/2022 4:04:13 AM  C:\LabSources\ISOs\Win11_22H2_English_x64v1.iso
Windows 11 Pro                                                 10.0.22621.525  9/25/2022 3:47:30 AM  C:\LabSources\ISOs\Win11_22H2_English_x64v1.iso
Windows 11 Pro N                                               10.0.22621.525  9/25/2022 3:51:26 AM  C:\LabSources\ISOs\Win11_22H2_English_x64v1.iso
Windows 11 Pro Education                                       10.0.22621.525  9/25/2022 3:53:05 AM  C:\LabSources\ISOs\Win11_22H2_English_x64v1.iso
Windows 11 Pro Education N                                     10.0.22621.525  9/25/2022 3:59:09 AM  C:\LabSources\ISOs\Win11_22H2_English_x64v1.iso
Windows 11 Pro for Workstations                                10.0.22621.525  9/25/2022 3:55:50 AM  C:\LabSources\ISOs\Win11_22H2_English_x64v1.iso
Windows 11 Pro N for Workstations                              10.0.22621.525  9/25/2022 4:01:41 AM  C:\LabSources\ISOs\Win11_22H2_English_x64v1.iso

@raandree
Copy link
Member

raandree commented Mar 1, 2023

This sounds weird. Do you have a 2nd host system to try the same deployment? Is the host machine domain joined? Sometimes, group policies impose too many restrictions for AL to work.

@nyanhp
Copy link
Member

nyanhp commented Mar 2, 2023

I am unable to reproduce the issue, even after downloading that specific eval version both on my development machine as well as a standard Hyper-V nested VM on Azure. @aaearon it is important that the base image creation is not cancelled by accident or impeded by an aggressive anti malware tool. AutomatedLab does not recreate the VHD if it finds one at the expected location which is what I suspect may be happening here.

You can verify this by removing the base disk for the OS, for example C:\AUtomatedLabVMs\BASE_WindowsServer2019DatacenterEvaluation_10.0.17763.3650_50.vhdx and then redeploying the lab.

@aaearon
Copy link
Author

aaearon commented Mar 2, 2023

Thanks all for your time investment. A few answers to your questions and some info:

  1. This machine is not domain joined but it is managed by some Intune policies from what I can tell.
  2. I unfortunately do not have access to another host besides a personal PC.
  3. The base image creation appears to be always successful and even when deleting and redeploying there is the same experience of no operating system being found.

Here are some more logs but not sure if they really tell anything more:

PS C:\Users\Tim.Schindler> Install-Lab -Verbose
VERBOSE: [08:18:13][Write-LogFunctionEntry] Install-Lab Entering... (Verbose=True)
VERBOSE: [08:18:13][Write-LogFunctionEntry] Get-LabAvailableOperatingSystem Entering... (NoDisplay=True)
VERBOSE: [08:18:13][Get-LabAvailableOperatingSystem] Found 5 ISO files
VERBOSE: [08:18:13][Write-LogFunctionEntry] Get-LabAvailableOperatingSystem Entering... (NoDisplay=True)
VERBOSE: [08:18:13][Get-LabAvailableOperatingSystem] Found 5 ISO files
08:18:13|00:00:21|00:00:15.184| Estimated (additional) local drive space needed for all machines: 2 GB
08:18:13|00:00:21|00:00:15.203| Location of Hyper-V machines will be 'C:\AutomatedLab-VMs'
VERBOSE: [08:18:13][Write-ScreenInfo] Done
VERBOSE: [08:18:13][Write-ScreenInfo] 08:18:13|00:00:21|00:00:15.237| Done
08:18:13|00:00:21|00:00:15.237| Done
VERBOSE: [08:18:13][Write-LogFunctionEntry] Import-Lab Entering... (Path=C:\Users\Tim.Schindler\.alConfig\Labs\GettingStarted\Lab.xml)
VERBOSE: [08:18:13][Write-LogFunctionEntry] Clear-Lab Entering... )
VERBOSE: [08:18:13][Write-LogFunctionExit] Clear-Lab...leaving...(Time elapsed: 00:00:00:004)
VERBOSE: [08:18:13][Write-LogFunctionEntry] Test-LabHostRemoting Entering... )
VERBOSE: [08:18:14][Write-LogFunctionExit] Test-LabHostRemoting...leaving...(Time elapsed: 00:00:00:064)
VERBOSE: [08:18:14][Write-ScreenInfo] Validating lab definition
VERBOSE: [08:18:14][Write-ScreenInfo] 08:18:14|00:00:21|00:00:00.000| Validating lab definition
08:18:14|00:00:21|00:00:00.000| Validating lab definition
VERBOSE: [08:18:14][Write-LogFunctionEntry] Clear-Lab Entering... )
VERBOSE: [08:18:14][Write-LogFunctionExit] Clear-Lab...leaving...(Time elapsed: 00:00:00:003)
VERBOSE: [08:18:20][Write-ScreenInfo] Success
VERBOSE: [08:18:20][Write-ScreenInfo] 08:18:20|00:00:28|00:00:06.626| - Success
08:18:20|00:00:28|00:00:06.626| - Success
VERBOSE: [08:18:20][Write-ScreenInfo] Lab 'GettingStarted' hosted on 'HyperV' imported with 1 machines
VERBOSE: [08:18:20][Write-ScreenInfo] 08:18:20|00:00:28|00:00:06.703| Lab 'GettingStarted' hosted on 'HyperV' imported with 1 machines
VERBOSE: [08:18:20][Write-LogFunctionExit] Import-Lab...leaving - return value is 'True'...(Time elapsed: 00:00:06:615)
VERBOSE: [08:18:20][Write-LogFunctionEntry] Get-LabVM Entering... )
VERBOSE: [08:18:20][Write-LogFunctionEntry] Get-LabVM Entering... (All=True,IncludeLinux=True)
VERBOSE: [08:18:20][Write-LogFunctionEntry] Update-LabMemorySettings Entering... )
VERBOSE: [08:18:20][Write-LogFunctionEntry] Get-LabVM Entering... (All=True,IncludeLinux=True)
VERBOSE: Perform operation 'Enumerate CimInstances' with following parameters, ''namespaceName' = Root\Cimv2,'className' = win32_operatingsystem'.
VERBOSE: Operation 'Enumerate CimInstances' complete.
VERBOSE: [08:18:21][Write-LogFunctionExit] Update-LabMemorySettings...leaving...(Time elapsed: 00:00:00:050)
VERBOSE: [08:18:21][Write-ScreenInfo] Creating virtual networks
VERBOSE: [08:18:21][Write-ScreenInfo] 08:18:21|00:00:29|00:00:00.000| Creating virtual networks
08:18:21|00:00:29|00:00:00.000| Creating virtual networks
08:18:21|00:00:29|00:00:00.000| - Creating Hyper-V virtual network 'GettingStarted'
08:18:24|00:00:32|00:00:02.925|   - Done
VERBOSE: [08:18:24][Write-ScreenInfo] Done
VERBOSE: [08:18:24][Write-ScreenInfo] 08:18:24|00:00:32|00:00:02.929| - Done
08:18:24|00:00:32|00:00:02.929| - Done
VERBOSE: [08:18:24][Write-LogFunctionEntry] Get-LabVM Entering... (All=True)
VERBOSE: [08:18:24][Write-ScreenInfo] done
VERBOSE: [08:18:24][Write-ScreenInfo] 08:18:24|00:00:32|00:00:02.939| done
08:18:24|00:00:32|00:00:02.939| done
VERBOSE: [08:18:24][Write-ScreenInfo] Creating base images
VERBOSE: [08:18:24][Write-ScreenInfo] 08:18:24|00:00:32|00:00:00.000| Creating base images
08:18:24|00:00:32|00:00:00.000| Creating base images
VERBOSE: [08:18:26][Write-LogFunctionEntry] Get-LabAvailableOperatingSystem Entering... (Path=C:\LabSources\ISOs\17763.3650.221105-1748.rs5_release_svc_refresh_SERVER_EVAL_x64FRE_en-us.iso)
VERBOSE: [08:18:26][Get-LabAvailableOperatingSystem] Found 1 ISO files
VERBOSE: [08:18:26][Write-ScreenInfo] found 21 OS images in the cache
VERBOSE: [08:18:26][Write-ScreenInfo] 08:18:26|00:00:34|00:00:01.870| - found 21 OS images in the cache
08:18:26|00:00:34|00:00:01.870| - found 21 OS images in the cache
VERBOSE: [08:18:26][Write-ScreenInfo] ISO cache seems to be up to date
VERBOSE: [08:18:26][Write-ScreenInfo] 08:18:26|00:00:34|00:00:01.884| - ISO cache seems to be up to date
08:18:26|00:00:34|00:00:01.884| - ISO cache seems to be up to date
08:18:28|00:00:36|00:00:00.000| - Creating base image for operating system 'Windows Server 2019 Datacenter Evaluation (Desktop Experience)'..........
08:21:40|00:03:48|00:03:11.976|   - Finished creating base image
VERBOSE: [08:21:41][Write-ScreenInfo] Done
VERBOSE: [08:21:41][Write-ScreenInfo] 08:21:41|00:03:49|00:03:13.315| - Done
08:21:41|00:03:49|00:03:13.315| - Done
VERBOSE: [08:21:42][Write-ScreenInfo] done
VERBOSE: [08:21:42][Write-ScreenInfo] 08:21:42|00:03:49|00:03:13.322| done
08:21:42|00:03:49|00:03:13.322| done
VERBOSE: [08:21:42][Write-LogFunctionEntry] Get-LabVM Entering... (All=True,IncludeLinux=True)
VERBOSE: [08:21:42][Write-ScreenInfo] Creating Additional Disks
VERBOSE: [08:21:42][Write-ScreenInfo] 08:21:42|00:03:49|00:00:00.000| Creating Additional Disks
08:21:42|00:03:49|00:00:00.000| Creating Additional Disks
VERBOSE: [08:21:43][Write-ScreenInfo] Done
VERBOSE: [08:21:43][Write-ScreenInfo] 08:21:43|00:03:51|00:00:01.807| - Done
08:21:43|00:03:51|00:00:01.807| - Done
VERBOSE: [08:21:43][Write-ScreenInfo] Creating VMs
VERBOSE: [08:21:43][Write-ScreenInfo] 08:21:43|00:03:51|00:00:00.000| Creating VMs
08:21:43|00:03:51|00:00:00.000| Creating VMs
VERBOSE: [08:21:43][Write-ScreenInfo] The hosts file has been added 1 records. Clean them up using 'Remove-Lab' or manually if needed
VERBOSE: [08:21:43][Write-ScreenInfo] 08:21:43|00:03:51|00:00:00.044| - The hosts file has been added 1 records. Clean them up using 'Remove-Lab' or manually if needed
08:21:43|00:03:51|00:00:00.044| - The hosts file has been added 1 records. Clean them up using 'Remove-Lab' or manually if needed
08:21:43|00:03:51|00:00:00.000| - Waiting for all machines to finish installing
08:21:43|00:03:51|00:00:00.000|   - Creating HyperV machine 'FirstServer'.....
08:21:52|00:04:00|00:00:08.361|     - Done
08:21:52|00:04:00|00:00:08.377|   - Done
VERBOSE: [08:21:52][Write-LogFunctionEntry] Get-LabAvailableOperatingSystem Entering... (NoDisplay=True)
VERBOSE: [08:21:52][Get-LabAvailableOperatingSystem] Found 5 ISO files
VERBOSE: [08:21:52][Write-LogFunctionEntry] Get-LabAvailableOperatingSystem Entering... (NoDisplay=True)
VERBOSE: [08:21:52][Get-LabAvailableOperatingSystem] Found 5 ISO files
VERBOSE: [08:21:52][Write-ScreenInfo] Done
VERBOSE: [08:21:52][Write-ScreenInfo] 08:21:52|00:04:00|00:00:08.746| - Done
08:21:52|00:04:00|00:00:08.746| - Done
VERBOSE: [08:21:52][Write-LogFunctionEntry] Get-LabVM Entering... (Role=RootDC)
VERBOSE: [08:21:52][Write-LogFunctionEntry] Get-LabVM Entering... (Role=Routing)
VERBOSE: [08:21:52][Write-LogFunctionEntry] Get-LabVM Entering... (Role=DHCP)
VERBOSE: [08:21:52][Write-LogFunctionEntry] Get-LabVM Entering... (Role=FirstChildDC)
VERBOSE: [08:21:52][Write-LogFunctionEntry] Get-LabVM Entering... (Role=DC)
VERBOSE: [08:21:52][Write-LogFunctionEntry] Get-LabVM Entering... (Role=RootDC)
VERBOSE: [08:21:52][Write-LogFunctionEntry] Get-LabVM Entering... (Filter=-not $_.SkipDeployment -and $_.Roles.Count -eq 0)
VERBOSE: [08:21:52][Write-LogFunctionEntry] Get-LabVM Entering... (Filter=-not $_.SkipDeployment -and $_.Roles.Count -eq 0)
VERBOSE: [08:21:52][Write-LogFunctionEntry] Get-LabVM Entering... (IncludeLinux=True)
VERBOSE: [08:21:52][Write-LogFunctionEntry] Get-LabVM Entering... (ComputerName=FirstServer)
VERBOSE: [08:21:52][Invoke-LabCommand] There are no machine with PreInstallationActivity defined, exiting...
VERBOSE: [08:21:52][Write-LogFunctionEntry] Get-LabVM Entering... (Role=FileServer)
VERBOSE: [08:21:52][Write-LogFunctionEntry] Get-LabVM Entering... (Role=CaRoot, CaSubordinate)
VERBOSE: [08:21:52][Write-LogFunctionEntry] Get-LabVM Entering... (Role=HyperV)
VERBOSE: [08:21:52][Write-LogFunctionEntry] Get-LabVM Entering... (Role=FailoverStorage)
VERBOSE: [08:21:52][Write-LogFunctionEntry] Get-LabVM Entering... (Role=FailoverStorage, FailoverNode)
VERBOSE: [08:21:52][Write-LogFunctionEntry] Get-LabVM Entering... (Role=SQLServer)
VERBOSE: [08:21:52][Write-LogFunctionEntry] Get-LabVM Entering... (Role=ConfigurationManager,Filter=-not $_.SkipDeployment)
VERBOSE: [08:21:52][Write-LogFunctionEntry] Get-LabVM Entering... (Role=RDS,Filter=-not $_.SkipDeployment)
VERBOSE: [08:21:52][Write-LogFunctionEntry] Get-LabVM Entering... (Role=Dynamics)
VERBOSE: [08:21:52][Write-LogFunctionEntry] Get-LabVM Entering... (Role=DSCPullServer)
VERBOSE: [08:21:52][Write-LogFunctionEntry] Get-LabVM Entering... (Role=ADFS)
VERBOSE: [08:21:52][Write-LogFunctionEntry] Get-LabVM Entering... (Role=WebServer)
VERBOSE: [08:21:52][Write-LogFunctionEntry] Get-LabVM Entering... (Role=WindowsAdminCenter)
VERBOSE: [08:21:52][Write-LogFunctionEntry] Get-LabVM Entering... (Role=Orchestrator2012)
VERBOSE: [08:21:52][Write-LogFunctionEntry] Get-LabVM Entering... (Role=SharePoint)
VERBOSE: [08:21:52][Write-LogFunctionEntry] Get-LabVM Entering... (Role=VisualStudio2013)
VERBOSE: [08:21:52][Write-LogFunctionEntry] Get-LabVM Entering... (Role=VisualStudio2015)
VERBOSE: [08:21:52][Write-LogFunctionEntry] Get-LabVM Entering... (Role=Office2013)
VERBOSE: [08:21:52][Write-LogFunctionEntry] Get-LabVM Entering... (Role=Office2016)
VERBOSE: [08:21:52][Write-LogFunctionEntry] Get-LabVM Entering... (Role=Tfs2015, Tfs2017, TfsBuildWorker, Tfs2018, AzDevOps)
VERBOSE: [08:21:52][Write-LogFunctionEntry] Get-LabVM Entering... (Role=SCVMM)
VERBOSE: [08:21:52][Write-LogFunctionEntry] Get-LabVM Entering... (Role=SCOM)
VERBOSE: [08:21:52][Write-LogFunctionEntry] Get-LabVM Entering... (IncludeLinux=True)
VERBOSE: [08:21:52][Write-LogFunctionEntry] Get-LabVM Entering... (IncludeLinux=True)
VERBOSE: [08:21:52][Write-ScreenInfo] Starting remaining machines
VERBOSE: [08:21:52][Write-ScreenInfo] 08:21:52|00:04:00|00:00:00.000| Starting remaining machines
08:21:52|00:04:00|00:00:00.000| Starting remaining machines
VERBOSE: [08:21:52][Write-ScreenInfo] Waiting for machines to start up...
08:21:52|00:04:00|00:00:00.005| - Waiting for machines to start up...VERBOSE: [08:21:52][Write-ScreenInfo] 08:21:52|00:04:00|00:00:00.005| - Waiting for machines to start up...
VERBOSE: [08:21:52][Write-LogFunctionEntry] Get-LabVM Entering... (IncludeLinux=True)
.................
PS C:\Users\Tim.Schindler> gci C:\AutomatedLab-VMs\ -Recurse

    Directory: C:\AutomatedLab-VMs

Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d----            3/2/2023  8:21 AM                FirstServer
-a---            3/2/2023  8:21 AM     9466544128 BASE_WindowsServer2019DatacenterEvaluation(DesktopExperience)_10.0.17763.3650_50.vhdx

    Directory: C:\AutomatedLab-VMs\FirstServer

Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d----            3/2/2023  8:21 AM                FirstServer
-a---            3/2/2023  8:21 AM       66060288 FirstServer.vhdx

    Directory: C:\AutomatedLab-VMs\FirstServer\FirstServer

Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d----            3/2/2023  8:21 AM                Virtual Machines

    Directory: C:\AutomatedLab-VMs\FirstServer\FirstServer\Virtual Machines

Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d----            3/2/2023  8:21 AM                B3CC52F2-2BDD-449C-B1C4-A997CFD1FBF6
-a---            3/2/2023  8:21 AM          73728 B3CC52F2-2BDD-449C-B1C4-A997CFD1FBF6.vmcx
-a---            3/2/2023  8:21 AM        4194816 B3CC52F2-2BDD-449C-B1C4-A997CFD1FBF6.vmgs
-a---            3/2/2023  8:21 AM          45092 B3CC52F2-2BDD-449C-B1C4-A997CFD1FBF6.VMRS

PS C:\Users\Tim.Schindler>

Is it worth trying to do something like re-installing Hyper V?

@aaearon
Copy link
Author

aaearon commented Mar 3, 2023

I ended up troubleshooting this a bit more --

  • 'Reinstalled' Hyper V by removing and then adding back the Hyper V feature.
  • Changed all language options in the Settings to en-US from en-NL.
  • Using oscdimg from the latest Windows ADK (but I'm not convinced oscdimg that oscdimg was used from looking at Task Manager.)

Still no dice. The only thing that did work was trying the CentOS 7 .iso, which I guess means the problem could be related to the base disk.

@raandree
Copy link
Member

raandree commented Mar 3, 2023

Thank you for your initiative and troubleshooting. We have had a few similar problems in the past. All bugs in this area have been fixed for a long time and your machine seems to be the only one having problems with the most basic task AL should be able to perform: Creating Windows VMs on Hyper-V.

I guess it is a problem with the base disk as well. To move forward we need to compare the partition setup of the base disk created on your machine with one created on another machine. Are you ok investing more time into this?

@aaearon
Copy link
Author

aaearon commented Mar 5, 2023

I am definitely willing to invest more time into this as I see the value in AutomatedLab. I will get AutomatedLab up and running on a personal machine.

@aaearon
Copy link
Author

aaearon commented Mar 5, 2023

I've got AutomatedLab up and running on my personal machine. It successfully creating a VM in Hyper-V.

For comparison:

PS C:\Users\Tim> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      7.3.3
PSEdition                      Core
GitCommitId                    7.3.3
OS                             Microsoft Windows 10.0.22621
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

PS C:\Users\Tim> Get-Module AutomatedLab* -List | Select Name,Version

Name                      Version
----                      -------
AutomatedLab              5.47.0
AutomatedLab.Common       2.3.5
AutomatedLabDefinition    5.47.0
AutomatedLabNotifications 5.47.0
AutomatedLabTest          5.47.0
AutomatedLabUnattended    5.47.0
AutomatedLabWorker        5.47.0

PS C:\Users\Tim>

I copied over the base disk VHD from my personal machine where AutomatedLab is working to my work machine where it is not. I was able to successfully create a VM on my work machine with the base disk from my personal machine via AutomatedLab. I don't think this is noteworthy as the base disk VHD was the suspect all along.

Looking at a base disk created on my personal machine and my work machine, the partitions are the same when looking via diskpart.

@aaearon
Copy link
Author

aaearon commented Mar 8, 2023

Still banging my head against this -- at least I have found a workaround by creating base disks on another machine and copying them over to the one that doesn't create base disks properly however I would be interested in getting this solved.

Here is some information regarding boot partition for both base disks when their VHDs are mounted. Disk 1 is a working base disk VHD made on my personal machine and Disk 2 is a non-working base disk VHD from my work machine. Disk 0 is a physical disk.

PS C:\Users\Tim.Schindler> wmic partition get DeviceID,Size,BootPartition,diskindex
BootPartition  DeviceID               DiskIndex  Size
FALSE          Disk #2, Partition #0  2          314572800
TRUE           Disk #2, Partition #1  2          104857600
FALSE          Disk #2, Partition #2  2          53115617280
FALSE          Disk #1, Partition #0  1          314572800
TRUE           Disk #1, Partition #1  1          104857600
FALSE          Disk #1, Partition #2  1          53115617280
TRUE           Disk #0, Partition #0  0          272629760
FALSE          Disk #0, Partition #1  0          510867275776
FALSE          Disk #0, Partition #2  0          946864128

PS C:\Users\Tim.Schindler>

@stale
Copy link

stale bot commented May 21, 2023

This issue has been automatically marked as stale because it has not had activity from the community in the last 30 days. It will be closed if no further activity occurs within 10 days. If the issue is labelled with any of the work labels (e.g bug, enhancement, documentation, or tests) then the issue will not auto-close.

@stale stale bot added the Stale The item has been there for a while and not updated. Quite soon it will be closed. label May 21, 2023
@aaearon
Copy link
Author

aaearon commented May 21, 2023

I'm still willing to put forth effort with this but I am not sure what direction to go in next.

@stale stale bot removed the Stale The item has been there for a while and not updated. Quite soon it will be closed. label May 21, 2023
@dex-code-one
Copy link

FYI, I'm seeing similar issues. Uninstall powershell 7.3.5 and it all works. Install 7.3.5 and it all fails.

Lots of errors about "Could not start Hyper-v machine ...You are not currently connected to any servers. Please connect first using a Connect cmdlet

And lots of cluster errors, even though I'm not on a cluster.

@stale
Copy link

stale bot commented Aug 12, 2023

This issue has been automatically marked as stale because it has not had activity from the community in the last 30 days. It will be closed if no further activity occurs within 10 days. If the issue is labelled with any of the work labels (e.g bug, enhancement, documentation, or tests) then the issue will not auto-close.

@stale stale bot added the Stale The item has been there for a while and not updated. Quite soon it will be closed. label Aug 12, 2023
@raandree
Copy link
Member

raandree commented Nov 7, 2023

@dex-code-one, your issue seems to have been related to #1573. This will be fixed in the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Stale The item has been there for a while and not updated. Quite soon it will be closed.
Projects
None yet
Development

No branches or pull requests

4 participants