cloudbase / windows-imaging-tools

Tools to automate the creation of a Windows image for OpenStack, supporting KVM, Hyper-V, ESXi and more.
Apache License 2.0
680 stars 227 forks source link

Waiting to sysprep to finish #356

Closed cde0 closed 1 year ago

cde0 commented 3 years ago

I try to build openstack image inside VM in esxi.

But it stuck on this message for more than 12 hours. :/ I don't know what i am missing. image

Windows Version: Windows server 2019 SERVERDATACENTERCORE virtio version: 1.185 config:

virtual_disk_format=QCOW2
image_type=KVM
ader1990 commented 3 years ago

Hello,

Please check the VM in Hyper-V and make sure it started correctly. The answer file configured the Windows VM to autologin at boot, so you should see a PowerShell console opened. If not, you can check the internal logs in the VM at path: C:\\UnattendResources\image-generation-log.txt

Thank you, Adrian Vladu

cde0 commented 3 years ago

Hello Adrian,

Sorry for the trouble, Yes see PowerShell console but after i can see Command console and it stops there? image

Is ok this behavior? Regards,

ader1990 commented 3 years ago

Hello,

Can you do a cat on C:\UnattendResources\image-generation-log.txt?

cde0 commented 3 years ago

the file don't exist image

I didn't change anything from the answer file

ader1990 commented 3 years ago

I see, can you run from PowerShell: & C:\UnattendResources\Logon.ps1 (as it is possible that something fails there)?. Logon.ps1 is the entry point script for the imaging tools.

cde0 commented 3 years ago

image

After i execute Set-ExecutionPolicy Unrestricted the command Logon is ok. It executes the script and exit

ader1990 commented 3 years ago

Are there any screen output or logs (C:\UnattendResources\image-generation-log.txt) after the execution of the Logon.ps1?

cde0 commented 3 years ago

I couldn't check for any logs it was exit automatically. But the screen output is this image

ader1990 commented 3 years ago

This means that the image creation was successful, but there is still the problem of Logon.ps1 not getting executed in the first place automatically. From the logs / information you shared, I cannot conclude what is the underlying issue, possible an execution failure of the autologon script. Can you share the full name of the Windows ISO you used so that I can try to reproduce the problem?

cde0 commented 3 years ago

Windows ISO full name is: SW_DVD9_Win_Server_STD_CORE_2019_1809.2_64Bit_English_DC_STD_MLF_X22-18452 or sss_x64fre_en-us_dv9 i don't know from where you can download this or something similar :)

cde0 commented 3 years ago

This happening also for Windows server 2016 i try standard and datacenter version but still the same? Maybe is because i run it from Windows Server?

ader1990 commented 3 years ago

Hello,

How did you get windows-openstack-imaging-tools code on your env? using git clone?

There might be issues with the file security descriptors when downloading the code. I suggest using Unblock-File on all the files in windows-openstack-imaging-tools before creating the image: https://devblogs.microsoft.com/scripting/easily-unblock-all-files-in-a-directory-using-powershell/

Thank you, Adrian Vladu

cde0 commented 3 years ago

Hi, I download the zip file, thanks i will check it Thanks you

ader1990 commented 1 year ago

Closing the issue, as there were no more replies from the issue creator.