You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I made an image including cloudbase init. And sysprepped the VM using the cloud init provided unattend.xml file
Here's how I'm doing the sysprep
# Use the unattend.xml provided by cloudbase-init
$unattendedXml = Join-Path $env:ProgramFiles "Cloudbase Solutions\Cloudbase-Init\conf\Unattend.xml"
& $env:SystemRoot\System32\Sysprep\Sysprep.exe /oobe /generalize /mode:vm /quit /quiet /unattend:$unattendedXml
if ($LASTEXITCODE) {
Throw "Failed to run Sysprep.exe"
}
... # wait for image state to reach IMAGE_STATE_GENERALIZE_RESEAL_TO_OOBE
This is using packer btw.
The image made is able to bootup most of the time (this is different different instances, by bootup I mean new instance allocation). But some times it fails with the error
OS Provisioning for VM 'wb-wrkcsr44qg5t' did not finish in the allotted time. However, the VM guest agent was detected running. This suggests the guest OS has not been properly prepared to be used as a VM image (with CreateOption=FromImage). To resolve this issue, either use the VHD as is with CreateOption=Attach or prepare it properly for use as an image:
Instructions for Windows: https://azure.microsoft.com/documentation/articles/virtual-machines-windows-upload-image/
Instructions for Linux: https://azure.microsoft.com/documentation/articles/virtual-machines-linux-capture-image/
Deleting and recreating the virtual machine may resolve the issue
The machine however is okay when I restart it and it works. This flow is part of an automated process where I can't do a manual intervention to start up the VMs.
Let me know if I can provide any additional details on this.
The text was updated successfully, but these errors were encountered:
Hi,
I made an image including cloudbase init. And sysprepped the VM using the cloud init provided unattend.xml file
Here's how I'm doing the sysprep
This is using packer btw.
The image made is able to bootup most of the time (this is different different instances, by bootup I mean new instance allocation). But some times it fails with the error
The machine however is okay when I restart it and it works. This flow is part of an automated process where I can't do a manual intervention to start up the VMs.
Let me know if I can provide any additional details on this.
The text was updated successfully, but these errors were encountered: