Bug 2041093 - autounattend.xml missing
Summary: autounattend.xml missing
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Console Kubevirt Plugin
Version: 4.9
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 4.10.0
Assignee: Matan Schatzman
QA Contact: Guohua Ouyang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-01-15 22:46 UTC by Dominik Holler
Modified: 2022-03-10 16:39 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-03-10 16:39:45 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
screencast of the flow (9.59 MB, video/webm)
2022-01-15 22:46 UTC, Dominik Holler
no flags Details
windows vm is up with complete autounattend xml (3.77 MB, application/octet-stream)
2022-01-18 05:17 UTC, Guohua Ouyang
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github openshift console pull 10895 0 None open Bug 2041093: Changed validation of adding file content from not empty to not contain parsing errors 2022-01-20 10:22:35 UTC
Red Hat Product Errata RHSA-2022:0056 0 None None None 2022-03-10 16:39:56 UTC

Internal Links: 2042809

Description Dominik Holler 2022-01-15 22:46:21 UTC
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

Comment 1 Tal Nisan 2022-01-17 12:09:51 UTC
Dominik, is it a realistic scenario to request that both files will exist?

Comment 2 Dominik Holler 2022-01-17 12:27:40 UTC
(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.

Comment 4 Guohua Ouyang 2022-01-18 05:13:56 UTC
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?

Comment 5 Guohua Ouyang 2022-01-18 05:17:12 UTC
Created attachment 1851506 [details]
windows vm is up with complete autounattend xml

Comment 6 Dominik Holler 2022-01-18 07:30:39 UTC
(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.

Comment 7 Guohua Ouyang 2022-01-18 08:40:57 UTC
(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?

Comment 9 Dominik Holler 2022-01-18 15:20:58 UTC
> 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.

Comment 10 Dominik Holler 2022-01-20 08:04:28 UTC
(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.

Comment 14 Guohua Ouyang 2022-01-28 03:08:16 UTC
verified on master, now the config is created and VM is running with the attached xml in the bug description

Comment 17 errata-xmlrpc 2022-03-10 16:39:45 UTC
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


Note You need to log in before you can comment on or make changes to this bug.