2017-12-31 23:12:35 +01:00
|
|
|
|
2019-03-15 16:37:47 +01:00
|
|
|
parabola-vmbootstrap
|
|
|
|
====================
|
2018-04-24 17:58:58 +02:00
|
|
|
|
2019-03-15 16:37:47 +01:00
|
|
|
This is a collection of scripts for creating and booting parabola virtual
|
|
|
|
machine images for use with qemu.
|
2017-12-31 23:12:35 +01:00
|
|
|
|
2019-03-15 16:37:47 +01:00
|
|
|
virtual machine image creation
|
|
|
|
------------------------------
|
2018-02-02 06:50:58 +01:00
|
|
|
|
2018-04-24 17:58:58 +02:00
|
|
|
To create a new virtual machine image, run
|
2017-12-31 23:12:35 +01:00
|
|
|
|
2019-03-16 02:00:55 +01:00
|
|
|
$> ./pvmbootstrap.sh [path to image] [arch]
|
2018-02-02 06:50:58 +01:00
|
|
|
|
2019-03-16 02:00:55 +01:00
|
|
|
where arch is one of the supported parabola arches, which are currently:
|
2018-02-02 06:50:58 +01:00
|
|
|
|
2019-03-16 02:00:55 +01:00
|
|
|
official: [ i686, x86_64, armv7h ]
|
|
|
|
unofficial: [ ppc64le, riscv64 ]
|
2018-02-02 06:50:58 +01:00
|
|
|
|
2019-03-16 02:00:55 +01:00
|
|
|
the script will attempt to bootstrap a virtual machine of the selected
|
|
|
|
archituecture in the output file specified. If the output file already exists,
|
|
|
|
the script will emit a warning and ask for confirmation to proceed.
|
2017-12-31 23:12:35 +01:00
|
|
|
|
2019-03-16 02:00:55 +01:00
|
|
|
the creation can be influenced by providing one or more of the following
|
|
|
|
arguments to pvmbootstrap.sh:
|
2017-12-31 23:12:35 +01:00
|
|
|
|
2019-03-16 02:00:55 +01:00
|
|
|
-s size -- set the size of the created VM image (default: 64G)
|
|
|
|
-M mirror -- set the mirror to fetch packages from
|
|
|
|
(default: https://repo.parabola.nu/$repo/os/$arch)
|
2019-03-16 22:20:33 +01:00
|
|
|
-H hook -- add a confiuration hook to be executed. this can be the path to
|
|
|
|
a shell script or one of the existing hooks described below
|
2019-03-16 02:00:55 +01:00
|
|
|
|
2019-03-16 22:20:33 +01:00
|
|
|
The creation hooks currently supported are:
|
|
|
|
|
|
|
|
ethernet-dhcp:
|
|
|
|
|
|
|
|
this hook will setup ethernet in the VM by enabling systemd-resolved and
|
2019-03-18 21:07:36 +01:00
|
|
|
openresolv properly, as well as creating and enabling a systemd-networkd
|
|
|
|
configuration.
|
2017-12-31 23:12:35 +01:00
|
|
|
|
2019-03-15 16:37:47 +01:00
|
|
|
virtual machine boot
|
|
|
|
--------------------
|
2018-02-02 06:50:58 +01:00
|
|
|
|
2019-03-15 16:37:47 +01:00
|
|
|
To boot a created virtual machine, run:
|
2018-02-02 06:50:58 +01:00
|
|
|
|
2019-03-15 16:37:47 +01:00
|
|
|
$> ./pvmboot.sh [path to image] [additional qemu args...]
|
|
|
|
|
|
|
|
the script will attempt to determine the architecture of the provided virtual
|
|
|
|
machine image, and set the qemu executable and sane default flags for the qemu
|
|
|
|
invocation automatically, including kvm acceleration, if available for the
|
|
|
|
target architecture.
|
|
|
|
|
|
|
|
additionally, the script will evaluate the DISPLAY environment variable to
|
|
|
|
determine whether a graphical desktop environment is available, and will start
|
|
|
|
the image in serial console mode if necessary. This behavior can be forced by
|
|
|
|
unsetting DISPLAY before executing the script:
|
|
|
|
|
|
|
|
$> DISPLAY= ./pvmboot.sh [...]
|
|
|
|
|
|
|
|
The default flags can be overwritten or extended, for example to allocate more
|
|
|
|
memory to the machine, by specifying additional qemu parameters on the command
|
|
|
|
line following the virtual machine image name:
|
|
|
|
|
|
|
|
$> DISPLAY= ./pvmboot [path to image] -m 2G
|
2019-03-18 21:07:36 +01:00
|
|
|
|
|
|
|
release tarball creation
|
|
|
|
------------------------
|
|
|
|
|
|
|
|
To convert a virtual machine image into a parabola release tarball, run:
|
|
|
|
|
|
|
|
$> ./pvm2tarball.sh [path to image]
|
|
|
|
|
|
|
|
This will attempt to mount the rootfs and the /boot partition, and tar the
|
|
|
|
contents to an output file, filtering out all unneeded files.
|