How to Fix Windows Cannot Read the ProductKey From the Unattend Answer File in VirtualBox

Table of Contents

Cannot Read the ProductKey From the Unattend Answer File in VirtualBox

In some cases, you got the following error when trying to install a Windows VM in VirtualBox with unattended installation. The error during Windows setup appears to be caused by malformed unattended XML configuration file.

How to Fix Windows Cannot Read the ProductKey From the Unattend Answer File in VirtualBox

To fix the issue, you can follow the steps below:

1. Turn off the virtual machine.

2. Open the Oracle VM Virtual Manager → Right-click on the VM in the VM list, then select Show in Explorer to open the installation location of the virtual machine.

How to Fix Windows Cannot Read the ProductKey From the Unattend Answer File in VirtualBox

3. Inside that directory, you will find the unattended XML Source File. Please open it using your preferred text editor. The file is named ad Unattended-xxxxx.xml.

How to Fix Windows Cannot Read the ProductKey From the Unattend Answer File in VirtualBox

4. Scroll down to find the <ProductKey> tag. It looks strange with this empty line after <ProductKey>.

...
            <UserData>
                <ProductKey>

                    <WillShowUI>OnError</WillShowUI>
                </ProductKey>
                <AcceptEula>true</AcceptEula>
            </UserData>
...

5. We need to insert the <Key> tag as follows. You can also input your product key inside the <Key> tag if you have one. Leaving it empty will install Windows without the product key.

...
            <UserData>
                <ProductKey>
                    <Key></Key>
                    <WillShowUI>OnError</WillShowUI>
                </ProductKey>
                <AcceptEula>true</AcceptEula>
            </UserData>
...

The final XML Source File should be formatted as shown in the screenshot. Then, close and save the file.

How to Fix Windows Cannot Read the ProductKey From the Unattend Answer File in VirtualBox

Start the virtual machine again, and the error should be gone. The unattended installation should be started to auto-install the guest without any user interaction.

How to Fix Windows Cannot Read the ProductKey From the Unattend Answer File in VirtualBox

Leave a Comment

Required fields are marked *