Closed karanveersingh5623 closed 4 years ago
Attaching config file GIT_issue.docx
Below is the Powershell output while image getting created
`PS C:\Users\Administrator\Desktop\Windows MAAS imaging\windows-openstack-imaging-tools> New-WindowsOnlineImage -ConfigFi lePath $ConfigFilePath 11/4/2019 11:13:25 PM - Windows online image generation started. 11/4/2019 11:16:49 PM - Cloud image generation started. 11/4/2019 11:16:50 PM - Found already existing image file. Removing it... 11/4/2019 11:16:52 PM - Already existent image file has been removed. 11/4/2019 11:16:52 PM - Creating Virtual Disk Image: C:\Users\Administrator\Desktop\Windows MAAS imaging\install.vhdx... 11/4/2019 11:16:56 PM - Successfuly created disk: C:\Users\Administrator\Desktop\Windows MAAS imaging\install.vhdx 11/4/2019 11:16:56 PM - Generate Unattend Xml :N:\Unattend.xml... 11/4/2019 11:16:56 PM - Xml was generated. 11/4/2019 11:16:56 PM - Copy Unattend Resources: Server... 11/4/2019 11:16:56 PM - Copying: C:\Users\Administrator\Desktop\Windows MAAS imaging\windows-openstack-imaging-tools\Una ttendResources N:\UnattendResources 11/4/2019 11:16:56 PM - Resources have been copied. 11/4/2019 11:16:56 PM - Copy Custom Resources: ... 11/4/2019 11:16:56 PM - Custom Resources at: N:\UnattendResources. 11/4/2019 11:16:56 PM - Setting wallpaper... 11/4/2019 11:16:56 PM - Wallpaper copied to the image. 11/4/2019 11:16:56 PM - Wallpaper GPO copied to the image. 11/4/2019 11:16:56 PM - Wallpaper was set. 11/4/2019 11:16:56 PM - Downloading Cloudbase-Init... 11/4/2019 11:17:16 PM - Applying Windows image "C:\Users\Administrator\Desktop\Windows MAAS imaging\windows-openstack-im aging-tools\iso\en_windows_server_2016_x64_dvd_9327751\sources\install.wim" in "N:\"
Deployment Image Servicing and Management tool Version: 10.0.14393.0
Applying image [==========================100.0%==========================] The operation completed successfully. 11/4/2019 11:27:52 PM - Create BCDBoot Config for Windows Server 2016 SERVERSTANDARD 11/4/2019 11:27:56 PM - BCDBoot config has been created. 11/4/2019 11:28:04 PM - Cloud image generation finished. Image path: C:\Users\Administrator\Desktop\Windows MAAS imaging \install.vhdx 11/4/2019 11:28:04 PM - Creating VM WindowsOnlineImage-Sysprep1343387841 attached to external 11/4/2019 11:28:06 PM - Starting WindowsOnlineImage-Sysprep1343387841 11/4/2019 11:28:11 PM - Waiting for WindowsOnlineImage-Sysprep1343387841 to finish sysprep. 11/4/2019 11:33:37 PM - - - StatusInitial: Automated instance configuration started... 11/4/2019 11:33:41 PM - - - Cleanup: Updates were cleaned up succesfully 11/4/2019 11:34:44 PM - - - Defragment: Image was defragemented succesfully 11/4/2019 11:34:44 PM - - - ShutdownWithoutLogon: Shutdown without logon was enabled 11/4/2019 11:34:44 PM - - - Ipconfig: IPs were released succesfully 11/4/2019 11:34:44 PM - - - Cloudbase-Init: Installed succesfully 11/4/2019 11:34:45 PM - - - Ping: Enabled ping for IPv4 and IPv6 11/4/2019 11:34:48 PM - - - StatusFinal: Waiting for sysprep to stop machine... 11/4/2019 11:34:48 PM - - - Drivers: PersistDrivers was set to True in the unattend.xml 11/4/2019 11:34:48 PM - - - Cleanup(1): Image was cleaned up succesfully 11/4/2019 11:34:48 PM - - - Sysprep: Sysprep initiated succesfully 11/4/2019 11:34:48 PM - - - IPv6: RandomizeIdentifiers and UseTemporaryAddresses were disabled 11/4/2019 11:35:51 PM - Shrinking VHD to minimum size 11/4/2019 11:35:51 PM - Initial VHD size is: 40 GB 11/4/2019 11:35:57 PM - Current partition size: 39.552734375 GB 11/4/2019 11:35:57 PM - New partition size: 12 GB 11/4/2019 11:35:57 PM - Size increased: 12884901888 11/4/2019 11:36:00 PM - Final disk size: 12.4463047981262 GB 11/4/2019 11:36:05 PM - Converting VHD to RAW 11/4/2019 11:36:05 PM - Convert Virtual Disk: C:\Users\Administrator\Desktop\Windows MAAS imaging\install.vhdx... 11/4/2019 11:36:05 PM - Converting virtual disk image from C:\Users\Administrator\Desktop\Windows MAAS imaging\install.v hdx to C:\Users\Administrator\Desktop\Windows MAAS imaging\install.raw... 11/4/2019 11:36:59 PM - Finish to convert virtual disk. 11/4/2019 11:37:00 PM - Windows online image generation finished. Image path: C:\Users\Administrator\Desktop\Windows MAA S imaging\install.raw PS C:\Users\Administrator\Desktop\Windows MAAS imaging\windows-openstack-imaging-tools>`
Hello @karanveersingh5623 ,
You need to set:
compression_format="tar.gz"
Thanks.
Thanks for the reply , I changed the parameter specified by you but ran into the issue , please check below .
Deployment Image Servicing and Management tool Version: 10.0.14393.0
Applying image [==========================100.0%==========================] The operation completed successfully. 11/13/2019 6:40:52 PM - Create BCDBoot Config for Windows Server 2016 SERVERSTANDARD 11/13/2019 6:40:55 PM - BCDBoot config has been created. 11/13/2019 6:41:03 PM - Cloud image generation finished. Image path: C:\Users\Administrator\Desktop\Windows MAAS imagi \win-image.vhdx 11/13/2019 6:41:03 PM - Creating VM WindowsOnlineImage-Sysprep1296105067 attached to external 11/13/2019 6:41:05 PM - Starting WindowsOnlineImage-Sysprep1296105067 11/13/2019 6:41:10 PM - Waiting for WindowsOnlineImage-Sysprep1296105067 to finish sysprep. 11/13/2019 6:44:13 PM - - - StatusInitial: Automated instance configuration started... 11/13/2019 6:44:16 PM - - - Cleanup: Updates were cleaned up succesfully 11/13/2019 6:45:29 PM - - - Cloudbase-Init: Installed succesfully 11/13/2019 6:45:31 PM - - - Defragment: Image was defragemented succesfully 11/13/2019 6:45:31 PM - - - ShutdownWithoutLogon: Shutdown without logon was enabled 11/13/2019 6:45:31 PM - - - Ipconfig: IPs were released succesfully 11/13/2019 6:45:32 PM - - - Ping: Enabled ping for IPv4 and IPv6 11/13/2019 6:45:35 PM - - - StatusFinal: Waiting for sysprep to stop machine... 11/13/2019 6:45:35 PM - - - Drivers: PersistDrivers was set to True in the unattend.xml 11/13/2019 6:45:35 PM - - - Cleanup(1): Image was cleaned up succesfully 11/13/2019 6:45:35 PM - - - Sysprep: Sysprep initiated succesfully 11/13/2019 6:45:35 PM - - - IPv6: RandomizeIdentifiers and UseTemporaryAddresses were disabled 11/13/2019 6:46:45 PM - Shrinking VHD to minimum size 11/13/2019 6:46:45 PM - Initial VHD size is: 40 GB 11/13/2019 6:46:51 PM - Current partition size: 39.552734375 GB 11/13/2019 6:46:51 PM - New partition size: 12 GB 11/13/2019 6:46:51 PM - Size increased: 12884901888 11/13/2019 6:46:54 PM - Final disk size: 12.4463047981262 GB 11/13/2019 6:46:59 PM - Converting VHD to RAW 11/13/2019 6:46:59 PM - Convert Virtual Disk: C:\Users\Administrator\Desktop\Windows MAAS imaging\win-image.vhdx... 11/13/2019 6:46:59 PM - Converting virtual disk image from C:\Users\Administrator\Desktop\Windows MAAS imaging\win-ima .vhdx to C:\Users\Administrator\Desktop\Windows MAAS imaging\win-image.raw... 11/13/2019 6:47:53 PM - Finish to convert virtual disk. 11/13/2019 6:47:55 PM - Compressing image C:\Users\Administrator\Desktop\Windows MAAS imaging\win-image.raw...
11/13/2019 6:47:55 PM - The variable '$DiskLayout' cannot be retrieved because it has not been set.
Compress-Image : The variable '$DiskLayout' cannot be retrieved because it has not been set.
At C:\Users\Administrator\Desktop\Windows MAAS imaging\windows-openstack-imaging-tools\WinImageBuilder.psm1:1552
char:13
+ Compress-Image -VirtualDiskPath $imagePath `
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (DiskLayout:String) [Compress-Image], RuntimeException
+ FullyQualifiedErrorId : VariableIsUndefined,Compress-Image
PS C:\Users\Administrator\Desktop\Windows MAAS imaging\windows-openstack-imaging-tools>
There is another issue , I was able to upload image to MAAS server and even deploy it by manually compressing .vhdx to .tgz using tar command . Now there is a new issue that comes up . When I boot my newly installed server with windows OS , its runs into bsod "Your PC ran into problems , system will be rebooted automatically " . What I am missing here ?
You need to go on the baremetal server producer site and check if there are some required drivers that need to be installed on Windows. The issue you presented seems like the storage driver is missing. After you find the driver or the installation executable you can use the https://github.com/cloudbase/windows-openstack-imaging-tools/blob/master/Config.psm1#L112 to configure the path from where to install that driver.
@karanveersingh5623 more info for how to deal with bsod: https://github.com/cloudbase/windows-openstack-imaging-tools#i-booted-an-instance-with-the-image-and-i-got-a-bsod
The initial issues were solved either via a configuration fix or a code fix (diskLayout variable is set correctly now). @karanveersingh5623 did you manage to successfully boot the instance?
Closing the issue, as there was no recent response / activity.
Please refer the below variables used in the config script , I am not able to get dd image , instead I get vhdx or raw format image but not .tgz extension . Please let me know what I am missing . MAAS version 2.6.1 .