Created attachment 1851039 [details] screencast of the flow Description of problem: If both files autounattend.xml and unattend.xml are requested to be created in the customized wizard for Windows VMs, only unattend.xml is created Version-Release number of selected component (if applicable): 4.9.4 How reproducible: 100% Steps to Reproduce: 1. Start the Wizzard to create a Windows 19 VM 2. Customize virtual machine 3. Advanced -> Sysprep: Add content: """ <?xml version="1.0" encoding="utf-8"?> <!-- responsible for installing windows, ignored on sysprepped images --> """ to autounattend.xml and """ <?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> """ to unattend.xml 4. Boot VM Actual results: Booting VM fails with "server error. command SyncVMI failed: "creating sysprep disks failed: Sysprep drive should contain autounattend.xml, but it was not found" and the related config map does not contain autounattend.xml Expected results: VM boots with a CD-ROM which contains autounattend.xml and unattend.xml with the requested content. Additional info: screen-2022-01-15_23.33.37.webm
Dominik, is it a realistic scenario to request that both files will exist?
(In reply to Tal Nisan from comment #1) > Dominik, is it a realistic scenario to request that both files will exist? Unfortunately yes, because the backend enforces that an autounattend.xml exists, even if an unattend.xml is provided.
Can reproduce the issue if omit the "Autounattend.xml answer file" field. Also tested if provides a complete autounattend.xml, the windows VM can be started normally. So the fix can be marking the first field "Autounattend.xml answer file" as required one, don't continue if it's empty or throw up an error message, do you agree? Dominik?
Created attachment 1851506 [details] windows vm is up with complete autounattend xml
(In reply to Guohua Ouyang from comment #4) > Can reproduce the issue if omit the "Autounattend.xml answer file" field. > Also tested if provides a complete autounattend.xml, the windows VM can be > started normally. > So the fix can be marking the first field "Autounattend.xml answer file" as > required one, don't continue if it's empty or throw up an error message, do > you agree? Dominik? Sounds good. But please note that I provided the content """ <?xml version="1.0" encoding="utf-8"?> <!-- responsible for installing windows, ignored on sysprepped images --> """ to autounattend.xml and the autounattend.xml was not added to the related configmap.
(In reply to Dominik Holler from comment #6) > (In reply to Guohua Ouyang from comment #4) > > Can reproduce the issue if omit the "Autounattend.xml answer file" field. > > Also tested if provides a complete autounattend.xml, the windows VM can be > > started normally. > > So the fix can be marking the first field "Autounattend.xml answer file" as > > required one, don't continue if it's empty or throw up an error message, do > > you agree? Dominik? > > Sounds good. But please note that I provided the content > """ > <?xml version="1.0" encoding="utf-8"?> > <!-- responsible for installing windows, ignored on sysprepped images --> > """ > to autounattend.xml and the autounattend.xml was not added to the related > configmap. It seems autounattend.xml is used for partition during installation and unattend.xml is used for OOBE. So it looks either of them is a must parameter. The problem here is if only provides unattend.xml for the 2nd field, VM is not able to up, do you think is this a backend issue? why autounattend.xml is must required?
> The problem here is if only provides unattend.xml for the 2nd field, VM is > not able to up, do you think is this a backend issue? why autounattend.xml > is must required? Let us check if we want to adjust the backend.
(In reply to Dominik Holler from comment #9) > > The problem here is if only provides unattend.xml for the 2nd field, VM is > > not able to up, do you think is this a backend issue? why autounattend.xml > > is must required? > > Let us check if we want to adjust the backend. We will adjust the backend in bug 2042809. This bug in the UI should be addressed independently because the config map is not created as the user might expect.
verified on master, now the config is created and VM is running with the attached xml in the bug description
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 (Moderate: OpenShift Container Platform 4.10.3 security 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:0056