Closed OsaPL closed 5 years ago
Yeah, just tested and Gen1 is also not working.
Hi @OsaPL - can you post your custom media definition so we can take a look?
Id = 'Windows7TestGen1';
Filename = 'en_windows_7_professional_with_sp1_x64_dvd_u_676939.iso';
Architecture = 'x64';
Uri = 'file://C:\Lability\ISOs\en_windows_7_professional_with_sp1_x64_dvd_u_676939.iso';
Checksum = '';
Description = 'Windows 7';
MediaType = 'ISO';
ImageName = '1';
OperatingSystem = 'Windows';
CustomData = @{
VmGeneration = 1;
CustomBootstrap = @(
'## Unattend.xml will set the Administrator password, but it wont enable the account on client OSes'
'NET USER Administrator /active:yes;'
'## This enables guest SMB sessions'
'$path = "HKLM:\Software\Policies\Microsoft\Windows\LanmanWorkstation"'
'if(!(Test-Path $path)){'
'New-Item $path -Force;'
'}'
'Set-ItemProperty $path -Name AllowInsecureGuestAuth -Value 1 -Force'
'Set-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\PowerShell\1\ShellIds\Microsoft.PowerShell -Name ExecutionPolicy -Value RemoteSigned -Force; #306'
'## Kick-start PowerShell remoting on clients to permit applying DSC configurations'
'Enable-PSRemoting -SkipNetworkProfileCheck -Force'
);
}
}
Its stuck on "Starting windows..."
EDIT: After mounting the disk manually to check files: -There is no log file present. -Bootstrap.ps1 is there and has the custom payload.
Unfortunately, you can't use Lability to build directly from a Windows 7 ISO (only PowerShell v2.0 and no DSC). You'll need to use a custom SYSPREP'd VHD/WIM with WMF 4 (or later installed) to get it to work. Does this make sense?
Yeah, is WMF4 the only prereq for a Lability supported MasterImage?
@OsaPL Yes - there is a recommended hotfix too but you can find the details here
Great, seems to work now. Thanks!
The only issue I have left is networking configuration, tried using LegacyNetworking module but to no avail, getting "Access denied." . If you prefer you can close this issue, and I will open another one, regarding this on LegacyNetworking repo.
@OsaPL Yes - please open a new issue with the details of the issues you're facing in the appropriate repository!
Hi, the problem I'm facing is that each time my team would want to use a Win7 images you have to set
SecureBoot = $false
insideNode
That means that every, single node would have to use this param which is not ideal (we have a single whole server dedicated to only this task).Can you somehow set SecureBoot inside CustomMedia? (I've seen
Media\CustomData
but I don't see any way to set it there)