[vbox-dev] proposal: Unattended Guest OS Installs for VirtualBox ?
al4321 at gmail.com
Sat Dec 17 23:17:00 PST 2011
Copyright (c) 2011 Alexey Eromenko "Technologov"
I have analyzed VMware Workstation 7 product:
It has 3 backends:
Red Hat Anaconda kickstart,
Windows NT 5.x and
Windows NT 6.x scripts.
The scripts for each backend is generated on the fly, based on template.
Windows unattended scripts:
Windows NT 5.x unattended scripts: (family includes Windows 2000/XP/2003)
is just single file 'winnt.sif' on floppy, that has INI-like syntax.
Windows NT 6.x unattended scripts: (family includes Windows Vista/7/2008)
is just single file 'autounattend.xml' on floppy, that has XML-like syntax.
Docs about both formats can be found on Google.
For VBox deployment, I recommend to use 2 CDs + floppy.
(1st CD = Windows, 2nd CD = Guest Additions.iso, floppy = has the config file)
We'll boot from the Windows CD.
1. generate the Windows-unattended scripts (winnt.sif and autounattend.xml),
2. create a FAT12-formatted 1.44 MB standard empty floppy image.
3. copy the Windows-unattended scripts into the floppy image.
stage 2 and stage 3 are impossible on Windows hosts without C coding.
(on Linux I use 'dd' and 'mkfs.msdos' for stage 2; 'mtools' for stage 3)
Red Hat Anaconda kickstart:
(family includes RHEL3/4/5, CentOS, Scientific Linux and Oracle
that claims to be 'Unbreakble') :)
(a bit harder to support, but also possible is: Fedora)
Those are much more complex. Anaconda does not read kickstart config files
from floppy, unlike Windows.
The end result, is that there is a need to generate cusom-made bootable ISO,
that includes linux kernel, initrd, and kickstart config file.
In addition, I also recommend putting VBoxLinuxAdditions.run on the 2nd CD,
so they could be automatically deployed.
For VBox deployment, I recommend to use 2 CDs.
(1st CD = Red Hat Enterprise Linux, 2nd CD = custom-made.iso)
1. generate Linux-kickstart scripts
2. extract Linux-kernel, initrd, bootloader from original Red-Hat-like DVD.
3. extract VBoxLinuxAdditions.run from GuestAdditions.iso.
4. generate bootable custom-made iso (ISO9660 filesystem), that uses
components from steps #1, #2, #3.
stages 2 and 3 are impossible on Windows hosts without C coding.
(on Linux I use 'mount -o loop' for stage 2+3; 'genisoimage' and
'mkisofs' are available for Windows stage 4)
(VMware WS 7 uses 'mkisofs' on Windows hosts)
I will update the research paper here:
-Alexey Eromenko "Technologov"
More information about the vbox-dev