Provide instructions on how to download & deploy a working FreeBSD
install that's suitable for CI, as there are several gotchas not
mentioned in the current docs.
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
guests/README.markdown | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
diff --git a/guests/README.markdown b/guests/README.markdown
index 7e63540..d76beb1 100644
--- a/guests/README.markdown
+++ b/guests/README.markdown
@@ -137,6 +137,26 @@ FreeBSD
Installation of FreeBSD guests must be performed manually; alternatively,
the official qcow2 images can be used to quickly bring up such guests.
+ $ MAJOR=11
+ $ MINOR=3
+ $ VER=$MAJOR.$MINOR-RELEASE
+ $ cd /var/lib/libvirt/images
+ $ wget -O libvirt-freebsd-$MAJOR.qcow2.xz \
+
https://download.freebsd.org/ftp/releases/VM-IMAGES/$VER/amd64/Latest/Fre...
+ $ unxz libvirt-freebsd-$MAJOR.qcow2.xz
+ $ virt-install \
+ --import \
+ --name libvirt-freebsd-$MAJOR \
+ --vcpus 2 \
+ --graphics vnc \
+ --noautoconsole \
+ --console pty \
+ --sound none \
+ --rng device=/dev/urandom,model=virtio \
+ --memory 2000 \
+ --os-variant freebsd$MAJOR.$MINOR \
+ --file /var/lib/libvirt/images/libvirt-freebsd-$MAJOR.qcow2
+
Some manual tweaking will be needed, in particular:
* `/etc/ssh/sshd_config` must contain the `PermitRootLogin yes` directive;
@@ -145,6 +165,17 @@ Some manual tweaking will be needed, in particular:
* the root password must be manually set to "root" (without quotes).
+The default qcow2 images are only 4GB in size which will be too small
+to be useful. To enlarge them do
+
+ $ virsh blockresize libvirt-freebsd-$MAJOR \
+ /var/lib/libvirt/images/libvirt-freebsd-$MAJOR.qcow2 20G
+
+Then inside the guest, as root, enlarge the partition & filesystem
+
+ # gpart resize -i 3 -a 4k -s 39845761 vtbd0
+ # service growfs onestart
+
Once these steps have been performed, FreeBSD guests can be managed just
like all other guests.
--
2.23.0