[libvirt] [jenkins-ci PATCH v2] guests: add more detailed docs on deploying FreeBSD

Daniel P. Berrangé posted 1 patch 4 years, 3 months ago
Failed in applying to current master (apply log)
guests/README.markdown | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
[libvirt] [jenkins-ci PATCH v2] guests: add more detailed docs on deploying FreeBSD
Posted by Daniel P. Berrangé 4 years, 3 months ago
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@redhat.com>
---
 guests/README.markdown | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/guests/README.markdown b/guests/README.markdown
index 7e63540..d450b4a 100644
--- a/guests/README.markdown
+++ b/guests/README.markdown
@@ -137,6 +137,37 @@ FreeBSD
 Installation of FreeBSD guests must be performed manually; alternatively,
 the official qcow2 images can be used to quickly bring up such guests.
 
+  $ MAJOR=12
+  $ MINOR=1
+  $ VER=$MAJOR.$MINOR-RELEASE
+  $ sudo wget -O /var/lib/libvirt/images/libvirt-freebsd-$MAJOR.qcow2.xz \
+      https://download.freebsd.org/ftp/releases/VM-IMAGES/$VER/amd64/Latest/FreeBSD-$VER-amd64.qcow2.xz
+  $ sudo unxz /var/lib/libvirt/images/libvirt-freebsd-$MAJOR.qcow2.xz
+  $ sudo virt-install \
+      --import \
+      --name libvirt-freebsd-$MAJOR \
+      --vcpus 2 \
+      --graphics vnc \
+      --noautoconsole \
+      --console pty \
+      --sound none \
+      --rng device=/dev/urandom,model=virtio \
+      --memory 2048 \
+      --os-variant freebsd$MAJOR.0 \
+      --disk /var/lib/libvirt/images/libvirt-freebsd-$MAJOR.qcow2
+
+The default qcow2 images are sized too small to be usable. To enlarge
+them do
+
+ $ sudo virsh blockresize libvirt-freebsd-$MAJOR \
+     /var/lib/libvirt/images/libvirt-freebsd-$MAJOR.qcow2 20G
+
+Then inside the guest, as root, enlarge the 3rd partition & filesystem
+to consume all new space:
+
+ # gpart resize -i 3 vtbd0
+ # service growfs onestart
+
 Some manual tweaking will be needed, in particular:
 
 * `/etc/ssh/sshd_config` must contain the `PermitRootLogin yes` directive;
-- 
2.23.0

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [jenkins-ci PATCH v2] guests: add more detailed docs on deploying FreeBSD
Posted by Andrea Bolognani 4 years, 3 months ago
On Wed, 2020-01-08 at 11:19 +0000, Daniel P. Berrangé wrote:
[...]
> +  $ sudo virt-install \
> +      --import \
> +      --name libvirt-freebsd-$MAJOR \
> +      --vcpus 2 \
> +      --graphics vnc \
> +      --noautoconsole \
> +      --console pty \
> +      --sound none \
> +      --rng device=/dev/urandom,model=virtio \
> +      --memory 2048 \
> +      --os-variant freebsd$MAJOR.0 \
> +      --disk /var/lib/libvirt/images/libvirt-freebsd-$MAJOR.qcow2

This doesn't necessarily need sudo: the other instructions kind of
assume your regular user has access to qemu:///system, by being a
member of the "libvirt" group for example. We should clarify that
in the "Host setup" section (as a separate patch of course).

> +The default qcow2 images are sized too small to be usable. To enlarge
> +them do
> +
> + $ sudo virsh blockresize libvirt-freebsd-$MAJOR \
> +     /var/lib/libvirt/images/libvirt-freebsd-$MAJOR.qcow2 20G

This doesn't need sudo either, and also please s/20/15/ as mentioned
during the first round of reviews.

> +Then inside the guest, as root, enlarge the 3rd partition & filesystem
> +to consume all new space:
> +
> + # gpart resize -i 3 vtbd0
> + # service growfs onestart

Please make sure this section containing commands, as well as the
ones above, are indented with 4 spaces so that they show up in a
monospace font when the document is rendered as HTML.

With all of the above addressed,

  Reviewed-by: Andrea Bolognani <abologna@redhat.com>

-- 
Andrea Bolognani / Red Hat / Virtualization

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list