diff options
Diffstat (limited to 'docs')
-rw-r--r-- | docs/vms.rst | 108 |
1 files changed, 54 insertions, 54 deletions
diff --git a/docs/vms.rst b/docs/vms.rst index 52cca45..63f12b7 100644 --- a/docs/vms.rst +++ b/docs/vms.rst @@ -99,6 +99,60 @@ how to use an inventory with lcitool. Note that not all guests can be installed using the ways described above, e.g. FreeBSD or Alpine guests. See `Installing FreeBSD VMs`_ to know how to add such a host in that case. +Installing FreeBSD VMs +---------------------- + +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 + $ 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 + +:: + + $ virsh blockresize libvirt-freebsd-$MAJOR \ + /var/lib/libvirt/images/libvirt-freebsd-$MAJOR.qcow2 15G + +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; + +* ``/etc/rc.conf`` must contain the ``sshd_enable="YES"`` setting; + +* the root password must be manually set to "root" (without quotes). + +Once these steps have been performed, FreeBSD guests can be managed just +like all other guests. + Usage and examples ================== @@ -240,60 +294,6 @@ FreeBSD is tricky with regards to cloud-init, so have a look at the `Cloud-init with FreeBSD`_ section instead. -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 - $ 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 - -:: - - $ virsh blockresize libvirt-freebsd-$MAJOR \ - /var/lib/libvirt/images/libvirt-freebsd-$MAJOR.qcow2 15G - -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; - -* ``/etc/rc.conf`` must contain the ``sshd_enable="YES"`` setting; - -* the root password must be manually set to "root" (without quotes). - -Once these steps have been performed, FreeBSD guests can be managed just -like all other guests. - Cloud-init with FreeBSD ----------------------- |