[virt-tools-list] How to: Unattended Windows installs in virt-install

Cole Robinson crobinso at redhat.com
Sat Oct 13 15:26:05 UTC 2018


On 09/12/2018 10:37 AM, Richard W.M. Jones wrote:
> I have worked out how to do (almost) unattended installs of Windows
> guests using virt-install.  This reveals some issues with
> virt-install, although maybe they are not bugs.
> 
> The virt-install command and autounattend.xml file are attached.  You
> will need to:
> 
> (1) Put build.sh into a directory.
> 
> (2) Create config/ subdirectory.
> 
> (3) Put autounattend.xml into the config/ subdirectory.  Edit the file
>      to add your product key.
> 
> (4) Download Windows ISO somewhere (modify the path in build.sh).
> 
> (5) Run ./build.sh
> 
> The result is very large.  Windows Server 2012R2 takes 5.3 GB!
> 
> 	- - -
> 
> The first problem with virt-install I had was that when you use
> multiple CD-ROMs virt-install doesn't choose a sensible boot order.
> That's the reason for the ,boot_order=XX attributes.  It seems like
> this used to work in some old version of virt-install, see:
> 
>    https://serverfault.com/questions/644437/unattended-installation-of-windows-server-2012-on-kvm
> 

FYI I fixed this issue upstream now:

commit 41d0f8fdf1905612ef389cb7b58c5377394f855b (HEAD -> master, 
origin/master, origin/HEAD)
Author: Cole Robinson <crobinso at redhat.com>
Date:   Sat Oct 13 10:23:00 2018 -0400

     installer: Order install CDROM before any manual CDROMs

So you should be able to drop the bootorder bits, it should work 
correctly using --cdrom $windowsmedia --disk $virtiowin,device=cdrom ...

- Cole




More information about the virt-tools-list mailing list