with some recommendations from friends of mine I tried vsphere-iso build
please check the json file attached. currently it stops at waiting for ip
step, though i see that the NIC is getting attached.
On Monday, August 6, 2018 at 5:42:06 PM UTC+5:30, praveen bhat wrote:
>
> Issue: I am trying to build a windows 2016 server datacenter edition using
> packer template.
> when the vm boots after initial build it gets stuck @"getting device
> ready" state. Need help.
>
> - Packer version from packer version 1.2.2
> - Host platform Ubuntu 16.04
>
> PACKER_LOG is attached.
>
> json file and answer files attached.
>
--
This mailing list is governed under the HashiCorp Community Guidelines -
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of
those guidelines may result in your removal from this mailing list.
GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
---
You received this message because you are subscribed to the Google Groups
"Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/packer-tool/8f038632-3f62-450d-ac80-22ecf2681dee%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
{
"builders": [
{
"type": "vsphere-iso",
"vcenter_server": "9.109.190.31",
"username": "[email protected]",
"password": "Greatday7@",
"datacenter": "INMD3BZICPDC",
"cluster": "INMD3BZICPCL1",
"datastore": "BZICPSDD1",
"folder": "ICP_Packer",
"insecure_connection": "true",
"vm_name": "WINDOWS_2016_DATACENTER_x86-64_ICP_MD3BZ",
"guest_os_type": "windows9Server64Guest",
"communicator": "winrm",
"winrm_username": "packer",
"winrm_password": "packer",
"winrm_timeout": "12h",
"winrm_port": "5985",
"shutdown_command": "a:/Start-Shutdown.bat",
"shutdown_timeout": "15m",
"CPUs": 2,
"RAM": 4096,
"CPU_limit": -1,
"RAM_reserve_all": true,
"disk_controller_type": "scsi",
"disk_size": 32768,
"disk_thin_provisioned": true,
"network": "Private VMnetwork",
"network_card": "e1000",
"boot_order": "disk,cdrom",
"iso_paths": [
"[BZICPSDD1]
packer_cache/18d3115ccc5b13392b5268c4b3fc3140cfd58f6ef856f2ae42f2e62fa1b05795.iso"
],
"floppy_files": [
"/var/jenkins/workspace/Packer_job/packer/dc-sde/answer_files/2016/Autounattend.xml",
"/var/jenkins/workspace/Packer_job/packer/dc-sde/scripts/powershell/Set-WinRM.ps1",
"/var/jenkins/workspace/Packer_job/packer/dc-sde/scripts/powershell/Start-Shutdown.bat"
]
}
],
"provisioners": [
{
"type": "powershell",
"elevated_user": "packer",
"elevated_password": "packer",
"scripts": [
"/var/jenkins/workspace/Packer_job/packer/dc-sde/scripts/powershell/Install-VMwareTools.ps1"
]
},
{
"type": "windows-restart"
},
{
"type": "powershell",
"elevated_user": "packer",
"elevated_password": "packer",
"scripts": [
"/var/jenkins/workspace/Packer_job/packer/dc-sde/scripts/powershell/Install-Nuget.ps1",
"/var/jenkins/workspace/Packer_job/packer/dc-sde/scripts/powershell/Remove-UpdateCache.ps1",
"/var/jenkins/workspace/Packer_job/packer/dc-sde/scripts/powershell/Invoke-Defrag.ps1",
"/var/jenkins/workspace/Packer_job/packer/dc-sde/scripts/powershell/Reset-EmptySpace.ps1"
]
}
]
}
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
<settings pass="windowsPE">
<component name="Microsoft-Windows-International-Core-WinPE"
processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35"
language="neutral" versionScope="nonSxS"
xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SetupUILanguage>
<UILanguage>en-US</UILanguage>
</SetupUILanguage>
<InputLocale>en-US</InputLocale>
<SystemLocale>en-US</SystemLocale>
<UILanguage>en-US</UILanguage>
<UILanguageFallback>en-US</UILanguageFallback>
<UserLocale>en-US</UserLocale>
</component>
<component name="Microsoft-Windows-Setup" processorArchitecture="amd64"
publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"
xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<DiskConfiguration>
<Disk wcm:action="add">
<CreatePartitions>
<CreatePartition wcm:action="add">
<Type>Primary</Type>
<Order>1</Order>
<Size>350</Size>
</CreatePartition>
<CreatePartition wcm:action="add">
<Order>2</Order>
<Type>Primary</Type>
<Extend>true</Extend>
</CreatePartition>
</CreatePartitions>
<ModifyPartitions>
<ModifyPartition wcm:action="add">
<Active>true</Active>
<Format>NTFS</Format>
<Label>boot</Label>
<Order>1</Order>
<PartitionID>1</PartitionID>
</ModifyPartition>
<ModifyPartition wcm:action="add">
<Format>NTFS</Format>
<Letter>C</Letter>
<Order>2</Order>
<PartitionID>2</PartitionID>
<Label>OS</Label>
</ModifyPartition>
</ModifyPartitions>
<DiskID>0</DiskID>
<WillWipeDisk>true</WillWipeDisk>
</Disk>
</DiskConfiguration>
<ImageInstall>
<OSImage>
<InstallFrom>
<MetaData wcm:action="add">
<Key>/IMAGE/NAME</Key>
<Value>Windows Server 2016 SERVERDATACENTER</Value>
</MetaData>
</InstallFrom>
<InstallTo>
<DiskID>0</DiskID>
<PartitionID>2</PartitionID>
</InstallTo>
</OSImage>
</ImageInstall>
<UserData>
<ProductKey>
<WillShowUI>OnError</WillShowUI>
<!--<Key>WC2BQ-8NRM3-FDDYY-2BFGV-KHKQY</Key>-->
</ProductKey>
<AcceptEula>true</AcceptEula>
<FullName>Administrator</FullName>
<Organization>IBM</Organization>
</UserData>
</component>
</settings>
<settings pass="generalize">
<component name="Microsoft-Windows-Security-SPP"
processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35"
language="neutral" versionScope="nonSxS"
xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SkipRearm>1</SkipRearm>
</component>
</settings>
<settings pass="oobeSystem">
<component name="Microsoft-Windows-International-Core"
processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35"
language="neutral" versionScope="nonSxS"
xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SystemLocale>en-US</SystemLocale>
<InputLocale>en-US</InputLocale>
<UILanguage>en-US</UILanguage>
<UserLocale>en-US</UserLocale>
</component>
<component name="Microsoft-Windows-Shell-Setup"
processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35"
language="neutral" versionScope="nonSxS"
xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<AutoLogon>
<Password>
<Value>Welcome1@</Value>
</Password>
<Enabled>true</Enabled>
<Username>packer</Username>
</AutoLogon>
<FirstLogonCommands>
<SynchronousCommand wcm:action="add">
<Order>1</Order>
<CommandLine>cmd.exe /c powershell -Command
"Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Force</CommandLine>
<Description>Set Execution Policy 64 Bit</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<Order>2</Order>
<Description>Configure WinRM</Description>
<CommandLine>cmd.exe /c
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -File
a:\Set-WinRM.ps1</CommandLine>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<Description>Disable Windows Firewall</Description>
<Order>3</Order>
<CommandLine>cmd.exe /c "Netsh Advfirewall set
allprofiles state off</CommandLine>
</SynchronousCommand>
</FirstLogonCommands>
<OEMInformation>
<HelpCustomized>false</HelpCustomized>
</OEMInformation>
<OOBE>
<HideEULAPage>true</HideEULAPage>
<HideLocalAccountScreen>true</HideLocalAccountScreen>
<HideOEMRegistrationScreen>true</HideOEMRegistrationScreen>
<HideOnlineAccountScreens>true</HideOnlineAccountScreens>
<HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
<NetworkLocation>Work</NetworkLocation>
<ProtectYourPC>1</ProtectYourPC>
</OOBE>
<UserAccounts>
<AdministratorPassword>
<Value>Welcome1@</Value>
</AdministratorPassword>
<LocalAccounts>
<LocalAccount wcm:action="add">
<Password>
<Value>Welcome1@</Value>
</Password>
<Name>packer</Name>
<Group>administrators</Group>
<DisplayName>packer</DisplayName>
</LocalAccount>
</LocalAccounts>
</UserAccounts>
</component>
</settings>
<settings pass="specialize">
<component name="Microsoft-Windows-Shell-Setup"
processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35"
language="neutral" versionScope="nonSxS"
xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<OEMInformation>
<HelpCustomized>false</HelpCustomized>
</OEMInformation>
<ComputerName>win2016packer</ComputerName>
</component>
<component name="Microsoft-Windows-Security-SPP-UX"
processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35"
language="neutral" versionScope="nonSxS"
xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SkipAutoActivation>true</SkipAutoActivation>
</component>
</settings>
<cpi:offlineImage
cpi:source="wim:c:/autounattend/16/sources/install.wim#Windows Server 2016
SERVERDATACENTERCORE" xmlns:cpi="urn:schemas-microsoft-com:cpi" />
</unattend>