Commit 48e306ed authored by Erwan BOUSSE's avatar Erwan BOUSSE
Browse files

Add README

parent bb22f4ca
= Ubuntu VM Creator
A set of scripts to create small Ubuntu Desktop (with MATE desktop) virtual machines for Virtual Box.
Only tested on a GNU/Linux system (Fedora 33).
== Idea
This project relies on diffent artifacts and tools:
- The *Ubuntu Server* image is used for the installation because it provides a very useful *autoinstall* mode.
We simply have to provide the installer with a web server that provides a couple of configuration files, and the installation is fully automated.
- *Docker* and the `*mbentley/apt-cacher-ng*` docker image are user to set up an APT cache server used for the installation (in case the installation must be retried several times).
- *Qemu* is used to start the virtual machine where the installation takes places.
- *VirtualBox* is used to convert the obtained raw VM image into a proper VBox ova file.
The project works in three steps:
. First a script can create a base raw Ubuntu Desktop image, already perfectly usable with a minimal MATE desktop environment.
This requires Qemu and is quite long.
. Second, a script can be used to customize the image by providing a script to be executed inside the image.
This is done simply by mounting the raw image and is thus rather fast.
. Third, a script can be used to convert the customized image into a Virtual Box virtual machine.
== Step 1: Create a base raw image
Run `create_base_img.sh` to create `output/minimal-ubuntu-base.img`.
This only has to be executed once, but it is rather long, be patient :).
NOTE: You can try changing the Ubuntu version number in the beginning of the script if you want.
The resulting image has the following characteristics:
- It runs Ubuntu 20.10 with the latest updates.
- It has one user `etudiant` with password `etudiant`.
- It is fully in French.
- It runs the MATE desktop environment.
- It contains the _VirtualBox Guest Additions_.
== Step 2: Customize the raw image
Run `customize_base_image.sh <customization folder>` to create `output/minimal-ubuntu-customized.img`.
A customization folder is any folder on your host that must at least contain a `run.sh` bash script, and any number of files you may need.
First the customization folder is copied as is in the `/root` folder of the VM, then the `run.sh` script is executed.
This can be used to install software or copy files that can be used by the `etudiant` user.
You can re-run this step as many times as needed, eg. to debug a `run.sh` customization script.
== Step 3: Convert to Virtual Box
Run `convert_to_vbox.sh` to create `output/minimal-ubuntu-customized.ova`.
The resulting image, once compressed in this format, is about 3.7G (without customization), and can be directly imported in any Virtual Box environment.
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment