On Tue, 2020-01-07 at 11:09 +0000, Daniel P. Berrangé wrote:
[...]
+ $ MAJOR=11
+ $ MINOR=3
We should use
MAJOR=12
MINOR=1
here so that people who are following instructions to the letter get
the latest FreeBSD version.
+ $ VER=$MAJOR.$MINOR-RELEASE
+ $ cd /var/lib/libvirt/images
This is not necessary...
+ $ 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
... if you change paths so that they are absolute here.
The advantage of doing so is that you can tell people to run the two
commands above under sudo (otherwise they'd have to run everything
inside a root shell).
+ $ virt-install \
+ --import \
+ --name libvirt-freebsd-$MAJOR \
+ --vcpus 2 \
+ --graphics vnc \
+ --noautoconsole \
+ --console pty \
+ --sound none \
+ --rng device=/dev/urandom,model=virtio \
+ --memory 2000 \
This should be
--memory 2048
to be consistent with our default for 'lcitool install'.
+ --os-variant freebsd$MAJOR.$MINOR \
This should be
--os-variant freebsd$MAJOR.0
because the machine you're running this on might now have a recent
enough osinfo-db version: my Fedora 31 installation with virt-preview
enabled, for example, doesn't know about FreeBSD 12.1 yet.
+ --file /var/lib/libvirt/images/libvirt-freebsd-$MAJOR.qcow2
I had never encountered --file before, and seeing how it's
apparently not documented I assume it's an old form for --disk.
Please use --disk instead.
[...]
+The default qcow2 images are only 4GB in size which will be too
small
+to be useful. To enlarge them do
Please remove the specific size - it might change later. It's enough
to say that they are too small.
+ $ virsh blockresize libvirt-freebsd-$MAJOR \
+ /var/lib/libvirt/images/libvirt-freebsd-$MAJOR.qcow2 20G
This should be 15G to be consistent with the default used by lcitool.
+Then inside the guest, as root, enlarge the partition &
filesystem
+
+ # gpart resize -i 3 -a 4k -s 39845761 vtbd0
You can leave out '-s ...' entirely, and gpart will do the right
thing by changing the partition to use as much disk space as
possible. I think dropping '-a 4k' would be safe too.
As an additional tweak, this whole section about resizing the disk
could go right after the one describing how to install the guest,
but I don't really have a strong preference either way.
--
Andrea Bolognani / Red Hat / Virtualization