[old] Unattended Guest OS Install - vbox-unattended

Discussions related to using the OSE version of VirtualBox.

Re: Unattended Guest OS Install - vbox-unattended

Postby Technologov » 6. Dec 2014, 23:01

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:
/opt/VirtualBox/additions/VBoxGuestAdditions.iso
*.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
Attachments
vbox-unattended-0.8-alpha2.patch.txt
(162.28 KiB) Downloaded 36 times
Technologov
Volunteer
 
Posts: 3313
Joined: 10. May 2007, 16:59
Location: Israel

Re: Unattended Guest OS Install - vbox-unattended

Postby Technologov » 8. Dec 2014, 19:33

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:

http://lists.gnu.org/archive/html/info- ... 00001.html
Technologov
Volunteer
 
Posts: 3313
Joined: 10. May 2007, 16:59
Location: Israel

Re: Unattended Guest OS Install - vbox-unattended

Postby klaus » 8. Dec 2014, 20:08

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 http://wizard.ae.krakow.pl/~jb/fatlib/ 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.
klaus
Oracle Corporation
 
Posts: 712
Joined: 10. May 2007, 14:57

Re: Unattended Guest OS Install - vbox-unattended

Postby Technologov » 4. Apr 2015, 18:20

Patch v0.9-alpha1 (4.Apr.2015)
- ported to VirtualBox 5.0 ! (mostly COM interface changes)

UPDATE:

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)
https://drive.google.com/file/d/0BycgkM ... sp=sharing

unattended scripts:
https://drive.google.com/open?id=0Bycgk ... authuser=0

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

Enjoy !
Attachments
vbox-unattended-0.9-beta6.patch.txt
(172.08 KiB) Downloaded 26 times
vbox-unattended-0.9-beta5.patch.txt
(167.11 KiB) Downloaded 15 times
vbox-unattended-0.9-beta4.patch.txt
(164.3 KiB) Downloaded 15 times
vbox-unattended-0.9-beta3.patch.txt
(158.67 KiB) Downloaded 14 times
vbox-unattended-0.9-beta2.patch.txt
(157.32 KiB) Downloaded 14 times
vbox-unattended-0.9-beta1.patch.txt
(155.45 KiB) Downloaded 15 times
Technologov
Volunteer
 
Posts: 3313
Joined: 10. May 2007, 16:59
Location: Israel

Re: Unattended Guest OS Install - vbox-unattended

Postby Technologov » 1. May 2015, 11:48

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).
Technologov
Volunteer
 
Posts: 3313
Joined: 10. May 2007, 16:59
Location: Israel

Re: Unattended Guest OS Install - vbox-unattended

Postby klaus » 4. May 2015, 18:32

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.
klaus
Oracle Corporation
 
Posts: 712
Joined: 10. May 2007, 14:57

Re: Unattended Guest OS Install - vbox-unattended

Postby Technologov » 4. May 2015, 18:35

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).
Technologov
Volunteer
 
Posts: 3313
Joined: 10. May 2007, 16:59
Location: Israel

Previous

Return to VirtualBox OSE

Who is online

Users browsing this forum: No registered users and 1 guest