VirtualBox

Opened 5 years ago

Last modified 4 years ago

#19839 new defect

Default Windows Unattend Template Requires Product Key

Reported by: breakid Owned by:
Component: VM control Version: VirtualBox 6.1.10
Keywords: unattend install template productkey license Cc:
Guest type: Windows Host type: all

Description

Problem:

The default Windows answer file template (i.e., "<vbox_install_dir>\UnattendedTemplates\win_nt6_unattended.xml") requires a product key. Failure to provide the key results in Windows throwing the following error and aborting install, even if "<AcceptEula>true</AcceptEula>" is provided.

Windows cannot find the Microsoft Software License Terms. Make sure the installation sources are valid and restart the installation.


Impact:

This prevents users from performing unattended installs of Trial / Evaluation copies of Windows without additional (and non-intuitive) configuration. This is very difficult to troubleshoot as the Windows error message refers to licensing rather than product key / activation issues.


Workaround:

Creating a modified copy of the template, containing:

<UserData>
    <AcceptEula>true</AcceptEula>
</UserData>

rather than the default:

<UserData>
    <ProductKey>
        <Key>@@VBOX_INSERT_PRODUCT_KEY_ELEMENT@@</Key>
        <WillShowUI>OnError</WillShowUI>
    </ProductKey>
    <AcceptEula>true</AcceptEula>
</UserData>

and referencing this during using --script-template="" solves the problem.

Example:

VBoxManage unattended install Server2019Template --user=Administrator --password=password --country=US --time-zone=MST --hostname=Server2019Template --image-index=2 --install-additions --start-vm=gui --iso=<ISO_PATH> --script-template="<path_to_modified_template>\win_nt6_unattended.xml"


Recommended Solution:

Implement template conditional similar to "@@VBOX_COND_IS_USER_LOGIN_ADMINISTRATOR@@", that prevents the "<ProductKey>" block from appearing in the final XML answer file if no key is specified on the command-line for "VBoxManage unattended install".

If this cannot be fixed quickly, please at least update the documentation to mention this requirement and workaround.

Attachments (1)

Unattended-19a90a0b-2ffe-43bf-8a49-e49b8b191646-autounattend.xml (5.4 KB ) - added by jared.hancock 4 years ago.
Unattended XML file passed to VM for installation

Download all attachments as: .zip

Change History (3)

comment:1 by VVP, 5 years ago

The command "VBoxManage unattended install" should work without the argument "--key". I checked it with WinServer 2019 DataCenter/Standard editions on the trunk (not with the VirtualBox 6.1.10). But there were not any modifications in the code from 6.1.10 (if i remember correctly).

Please, describe you case more precisely:

  • host OS;
  • full syntax of executed command, e.g. "VBoxManage unattended install..." with all arguments you passed.
  • show the content of your autounattend.xml which was generated.

by jared.hancock, 4 years ago

Unattended XML file passed to VM for installation

comment:2 by jared.hancock, 4 years ago

I can confirm this on 6.1.18 as well while trying to install Windows Server 2019 unattended. Here's the full commandline:

['VBoxManage', 'unattended', 'install', 'agent', '--user', 'administrator', '--password', 'kjshf934yrsfg#$%!', '--country', 'US', '--locale', 'en_US', '--time-zone', 'GMT', '--hostname', 'server.company.local', '--iso', 'Downloads/17763.737.190906-2324.rs5_release_svc_refresh_SERVER_EVAL_x64FRE_en-us_1.iso', '--install-additions', '--post-install-command', 'VBoxControl guestproperty set installation_finished y & shutdown /r /t 5']

I've attached the XML file for the installation as requested.

Note: See TracTickets for help on using tickets.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette