Description of problem: Even if an unattend.xml file is requested for the sysprep disk, cnv requires the file autounattend.xml to exist. Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. Create VM with sysprep disk containing unattend.xml, but not autounattend.xml Actual results: VM fails to boot Expected results: VM boots if at least unattend.xml or autounattend.xml exists. Additional info:
The workaround is to create an empty autounattend.xml.
I can reproduce this with the following: $ oc get -n kubevirt-hyperconverged vms lyarwood-windows10-nasty-donkey -o json | jq '.spec.template.spec.volumes' [ { "dataVolume": { "name": "lyarwood-windows10-nasty-donkey-rootdisk-zz9rz" }, "name": "rootdisk" }, { "name": "sysprep", "sysprep": { "configMap": { "name": "sysprep-config-lyarwood-windows10-nasty-donkey" } } } ] $ oc get -n kubevirt-hyperconverged configmap sysprep-config-lyarwood-windows10-nasty-donkey -o json | jq -r .data | sed 's/\\n/\n/g' { "Unattend.xml": "<?xml version=\"1.0\" encoding=\"utf-8\"?> <unattend xmlns=\"urn:schemas-microsoft-com:unattend\"> <settings pass=\"oobeSystem\"> <component xmlns:wcm=\"http://schemas.microsoft.com/WMIConfig/2002/State\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" name=\"Microsoft-Windows-Shell-Setup\" processorArchitecture=\"amd64\" publicKeyToken=\"31bf3856ad364e35\" language=\"neutral\" versionScope=\"nonSxS\"> <OOBE> <HideEULAPage>true</HideEULAPage> <HideOEMRegistrationScreen>true</HideOEMRegistrationScreen> <HideOnlineAccountScreens>true</HideOnlineAccountScreens> <HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE> <NetworkLocation>Work</NetworkLocation> <SkipUserOOBE>true</SkipUserOOBE> <SkipMachineOOBE>true</SkipMachineOOBE> <ProtectYourPC>3</ProtectYourPC> </OOBE> <AutoLogon> <Password> <Value>123456</Value> <PlainText>true</PlainText> </Password> <Enabled>true</Enabled> <Username>Administrator</Username> </AutoLogon> <UserAccounts> <AdministratorPassword> <Value>123456</Value> <PlainText>true</PlainText> </AdministratorPassword> </UserAccounts> <RegisteredOrganization/> <RegisteredOwner/> <TimeZone>Eastern Standard Time</TimeZone> </component> </settings> </unattend>" } $ oc logs -n kubevirt-hyperconverged virt-launcher-lyarwood-windows10-nasty-donkey-rvhxl | tail -n1 | jq . { "component": "virt-launcher", "kind": "", "level": "error", "msg": "Failed to sync vmi", "name": "lyarwood-windows10-nasty-donkey", "namespace": "kubevirt-hyperconverged", "pos": "server.go:184", "reason": "creating sysprep disks failed: Sysprep drive should contain autounattend.xml, but it was not found", "timestamp": "2022-02-10T17:00:11.354899Z", "uid": "be21af5c-4ade-4513-bf15-031c4d3ebe43" } The failure is coming from the following code checking for autounattend.xml: https://github.com/kubevirt/kubevirt/blob/8a07d2dc92fb0908455b833a1fbcb6ffdb965570/pkg/config/sysprep.go#L49-L64 I'll change this to check for either and test to ensure that if only unattend.xml is provided that it sysprep actually works. Reading the docs suggests that only autounattend.xml is picked up from removable media etc: https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/windows-setup-automation-overview?view=windows-11#implicit-answer-file-search-order
Verified on ssp-operator v4.11.0-16
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Important: OpenShift Virtualization 4.11.0 Images security and bug fix update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2022:6526