Page 2 of 2

Re: Unattended Guest OS Install - vbox-unattended

PostPosted: 6. Dec 2014, 23:01
by Technologov
Quick install instructions: (for Linux hosts)
*. Install 2 more dependencies: "mtools" and "7-zip"
*. Compile VBox and do kmk packing (and install this package)
*.Make sure you have this file in this path:
*.Make sure you copy "vbox-unattended/" folder into: /opt/VirtualBox/

v0.8-alpha2: (6.Dec.2014)
-Updated for VirtualBox 4.3.x (patch 0.7.x was targeting VirtualBox 4.1.x)
-Fixed VBoxAdditions installer.
-Fixed creating unattended VM as part of group.
-Found Limitation: I support only one-level group. (no such problem existed for VirtualBox 4.1.x)
-Moved "IMachine->SetBootOrder()" from GUI into IUnattended backend, where it belongs.
-Several small fixes.
-Added 2 COM interfaces: IUnattended::vboxAdditionsIsoPath and IUnattended::group

Re: Unattended Guest OS Install - vbox-unattended

PostPosted: 8. Dec 2014, 19:33
by Technologov
After some research I found a theoretical possibility of porting vbox-unattended patch to Windows host.

The only missing component until now was: "mtools" a utility to manipulate virtual floppy from user-space, but it turns out there is a Windows version of it: ... 00001.html

Re: Unattended Guest OS Install - vbox-unattended

PostPosted: 8. Dec 2014, 20:08
by klaus
Thanks for updating the patch! Really great to have a good starting point for this useful feature.

For integrating it into VirtualBox (just pointing it out, not expecting you to do the change yourself!) all calls to system() need to be replaced by using a library which has an acceptable license. Acceptable licenses are MIT/BSD/LGPL2.1 and the like. Maybe would be suitable to replace mtools.

Kicking out 7-Zip is actually quite easy, as there is already functionality to extract a file from an ISO filesystem, see RTIsoFsOpen/RTIsoFsGetFileInfo/RTIsoFsClose in file src/VBox/Main/src-client/GuestSessionImplTasks.cpp. It's currently a bit hacky as reading (if one doesn't want to create a temporary file with RTIsoFsExtractFile) needs to be done using RTFileSeek/RTFileRead, but it's quite functional. Eventually this will be converted to a full VFS layer in VirtualBox, but that's not an area we're working on right now.

To repeat what I said before... we'd love to have this functionality in VirtualBox, but we're still short on dev time to make all the necessary adjustments. Would be much appreciated if anyone else could give a hand.

Re: Unattended Guest OS Install - vbox-unattended

PostPosted: 4. Apr 2015, 18:20
by Technologov
Patch v0.9-alpha1 (4.Apr.2015)
- ported to VirtualBox 5.0 ! (mostly COM interface changes)


0.9-beta1: (11.Apr.2015)
- fixed support for 64-bit Windows 7 and Vista guests.
- added ISO image file picker
- handled a few common dependency errors. (if user forgot to install dependencies such as unattended scripts, mtools or 7-zip)
- few GUI bugs fixed

0.9-beta2: (17.Apr.2015)
- disabled unattended mode (auto-install), if guest OS type is incompatible.
- disabled first-time wizard, if in unattended mode.
- AutoCompletion names during new VM creation: RHEL.
- enabled drag-n-drop and shared clipboard by default for new VMs

0.9-beta3: (1.May.2015)
- GUI/New VM wizard: skip "unattended" section if not used.

0.9-beta4: (3.May.2015)
- added support for Windows 8, Windows 10 and Debian Linux 7 guests.
- added option to disable Guest Additions install.
- GUI: added description to auto-install new VM wizard.
- several optimizations for Debian guests, leading to smaller debian_boot.iso images.

0.9-beta5. (6.May.2015)
- added support for Red Hat Enterprise Linux 6 and 7 guests.
- reworked installer for Red Hat Enterprise Linux 3, 4, 5.

For the lazy among you, I provide a binary installer of VirtualBox_TE [1] for Linux-x64/amd64. (based on unattended-beta3 patch) ... sp=sharing

unattended scripts: ... authuser=0

[1] VirtualBox_TE, stands for Technologov's Edition, as per my nick-name.

Enjoy !

Re: Unattended Guest OS Install - vbox-unattended

PostPosted: 1. May 2015, 11:48
by Technologov
Road-blocks preventing from adding new guests:
-[Solved] Debian 7: fails to load GRUB-pc module and install bootloader in hard disk MBR, after stage 1 installed.
-Debian 8: fails to load unattended script from floppy. (opened debian bug 783982)

-openSUSE 12.x and 13.x 64-bit: 7-zip bug: [Problem extracting files from DVD ISO with EFI] (link)

NOTE: Those are not absolute road-blocks, and I may find work-arounds for each.

Future idea: Direct Linux boot (like Qemu/KVM), plus patched initrd. (With preseed and VBoxLinuxAdditions)
This will remove the need for floppy, 2nd CD, and guest's bootloader extraction.
This will probably require some kind of VFS feature in VirtualBox, to populate HDD with kernel and initrd.
-or- non-persistent storage in VBox (single-boot only floppy and/or CD-ROM and/or hard-disk).

Re: Unattended Guest OS Install - vbox-unattended

PostPosted: 4. May 2015, 18:32
by klaus
Just as a reminder: there are already working VFS bits and pieces (don't claim it's perfect, but get you quite far already, and if necessary can be extended/unified for other filesystem types): see Main/src-client/GuestSessionImplTasks.cpp. It extracts a file from the guest additions ISO.

Re: Unattended Guest OS Install - vbox-unattended

PostPosted: 4. May 2015, 18:35
by Technologov
Here I speak about device-less unattended installs.
For now I require 3 devices (for Debian guests) - 2 CDs + floppy. Theoretically, it is possible to reduce this to just one device: original Debian CD-ROM. (kernel + initrd + preseed + LinuxAdditions can be loaded directly into memory, or via non-persistent HDD).