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

Waiting for machines to start up.. #27

Closed
justinturnerMSFT opened this issue Nov 21, 2016 · 12 comments
Closed

Waiting for machines to start up.. #27

justinturnerMSFT opened this issue Nov 21, 2016 · 12 comments
Assignees
Labels

Comments

@justinturnerMSFT
Copy link

AL may sit at the "Waiting for machines to start up.." status indefinitely: On Hyper-V hosts that have preexisting internal networks. My script kept stalling here even though I had connectivity between the host and the machines that it was waiting to start up. The solution was to go into Virtual Switch Manager and remove all the other internal vSwitches.

@raandree
Copy link
Member

I am running many labs in parallel and have 7 internal vSwitches right now. Installing another lab was not a problem. Were you be able to ping the machine? Was it possible to create a new session to it using "New-LabPSSession"?

Can you still repro the issue?

@justinturnerMSFT
Copy link
Author

I could ping the machine - however, the first out of 4 replies would say "The destination is unreachable".

@justinturnerMSFT
Copy link
Author

Ok, I think I figured out what the issue was: I had another vSwitch that was on the same address space as one of the new adapter.
preexisting adapter on hyper-v host: 192.168.40.254/24
new adapter on hyper-v host: 192.168.40.1/16

Seems that should be an easy repro.

@raandree
Copy link
Member

In one of the new commits I have extended the verification of subnets also to overlapping ones. Installing a lab should no longer work if an overlapping subnet is defined on another virtual switch.

Can you run a test please and close the issue if the fix is as expected?

@raandree raandree self-assigned this Nov 26, 2016
@raandree raandree added the Bug label Nov 26, 2016
@MrCCG
Copy link

MrCCG commented Dec 5, 2016

I have having the same issue when starting labs. AL will hang at "- Waiting for machines to start up". I have tested this with simple, one machine labs on multiple operating systems and I keep getting the same result. I have gone through and deleted all of my Hyper-V virtual switches, but I am still getting the same results.
Hyper-V will boot the systems, but they are not getting the unattended answer file. Each time the machine starts up it will hang waiting for input with the OOBE.
The PS output errors of "Illegal characters in path." I have attached the error output. Any assistance would be greatly appreciated!
AL-errors-MrCCG.txt

@raandree
Copy link
Member

raandree commented Dec 6, 2016

So that sounds like that you are not be able to deploy labs at all, right? The problem seems to be this: Cannot find drive. A drive with the name ' ' does not exist.

Can you please use the ISE with verbose logging? You can enable verbose logging like this:

$VerbosePreference = 2

Can you paste all the console output into a word or rich-text doc and send it over. Plain text works as well but thanks to the colors in a Word doc it is much easier to navigate.

@MrCCG
Copy link

MrCCG commented Dec 6, 2016

Thanks for the response. I have zipped both a .doc and the .rtf.

ALErrors.zip

@raandree
Copy link
Member

raandree commented Dec 6, 2016

Thanks. Which OS are you running AutomatedLab on? What is the PowerShell version? Which version of AL do you use?

Can you work around the issue when specifying the parameter New-LabDefinition::VmPath?

@MrCCG
Copy link

MrCCG commented Dec 7, 2016

I apologize. That was not a lot of information to go on. Let me try this again for you.
Basic info:
I am running AL v3.8.0.10 on a windows 10 pro laptop (build 10586) with powershell version 5.0.10586.672.
The laptop has limited space on the hard drive so my current config has the LabSources location on an external USB3 drive. (currently A:) The module correctly identifies this location when I call
Get-LabSourcesLocation. I am running the VMs in a folder off the root of my C: drive. C:\ALVMs

The lab I have been using for testing is the Introduction sample script #3 which I have modified to always use the that VmPath. I am assigning the name with a mandatory parameter.

Here is the guts of that modified script.

LabName will be a required parameter when running the script. The labsource and vmdrive will be hard coded for now.

$labSources = Get-LabSourcesLocation
$vmDrive = 'C:\ALVMs' #this is the drive where to create the VMs

Create the folder path for the lab using Join-Path

$labPath = Join-Path -Path $vmDrive -ChildPath $labName

Create the target directory if it does not exist

if (-not (Test-Path $labPath)) { New-Item $labPath -ItemType Directory | Out-Null }

Set-LabHostRemoting
New-LabDefinition -Path $labPath -VmPath $labPath -Name $labName -DefaultVirtualizationEngine HyperV

Here AL installs a lab with one domain controller and one client. The OS can be configured quite easily as well as

the domain name or memory. AL takes care about network settings like in the previous samples.

Add-LabMachineDefinition -Name DC1 -Memory 1GB -OperatingSystem 'Windows Server 2012 R2 SERVERDATACENTER' -Roles RootDC -DomainName contoso.com
Add-LabMachineDefinition -Name Client1 -Memory 1GB -OperatingSystem 'Windows 7 PROFESSIONAL' -DomainName contoso.com
Install-Lab
Show-LabInstallationTime

@MrCCG
Copy link

MrCCG commented Dec 7, 2016

Wow... that was ugly. I guess that's what I get for not using the preview. I have attached the script as a .txt as well.
script.txt

@justinturnerMSFT
Copy link
Author

In one of the new commits I have extended the verification of subnets also to overlapping ones. Installing a lab should no longer work if an overlapping subnet is defined on another virtual switch.

Can you run a test please and close the issue if the fix is as expected?

I've tested this with the latest build and it detects this condition properly now. Thank you.

@raandree
Copy link
Member

MrCCG, this issue is closed but I am not sure if it was connected to your problem. I have tested the script that you have provided and it worked on my machine. Do you still have the problem that AL is not being able to contact the machines?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants