aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorErik Skultety <eskultet@redhat.com>2022-07-14 13:41:04 +0200
committerErik Skultety <eskultet@redhat.com>2022-07-14 15:14:19 +0200
commitd0132d430d7e7c06886abcb1418135fed9758abb (patch)
tree11be359468f2025020b55998e0cd05060947a16f /docs
parent4b25dce25a4917dd4fe54021521f87b6ec651cfc (diff)
downloadlibvirt-ci-d0132d430d7e7c06886abcb1418135fed9758abb.zip
libvirt-ci-d0132d430d7e7c06886abcb1418135fed9758abb.tar.gz
libvirt-ci-d0132d430d7e7c06886abcb1418135fed9758abb.tar.bz2
docs: vms: Move the 'Cloud-init' bits right after VM installation steps
This makes more sense from logical point of view, first we configure lcitool, then we install VMs, then we can start messing with cloud-init and creating templates. All the other information can be pushed towards the end of the document. Signed-off-by: Erik Skultety <eskultet@redhat.com>
Diffstat (limited to 'docs')
-rw-r--r--docs/vms.rst123
1 files changed, 61 insertions, 62 deletions
diff --git a/docs/vms.rst b/docs/vms.rst
index 63f12b7..ee6056f 100644
--- a/docs/vms.rst
+++ b/docs/vms.rst
@@ -154,6 +154,67 @@ Once these steps have been performed, FreeBSD guests can be managed just
like all other guests.
+Cloud-init
+==========
+
+If you intend to use the generated images as templates to be instantiated in
+a cloud environment like OpenStack, then you want to set the
+``install.cloud_init`` key to ``true`` in ``~/.config/lcitool/config.yaml``. This will
+install the necessary cloud-init packages and enable the corresponding services
+at boot time. However, there are still a few manual steps involved to create a
+generic template. You'll need to install the ``libguestfs-tools`` package for that.
+
+Once you have it installed, shutdown the machines gracefully. First, we're going to
+"unconfigure" the machine in a way, so that clones can be made out of it.
+
+::
+
+ $ virt-sysprep -a libvirt-<machine_distro>.qcow2
+
+Then, we sparsify and compress the image in order to shrink the disk to the
+smallest size possible
+
+::
+
+ $ virt-sparsify --compress --format qcow2 <indisk> <outdisk>
+
+Now you're ready to upload the image to your cloud provider, e.g. OpenStack
+
+::
+
+ $ glance image-create --name <image_name> --disk-format qcow2 --file <outdisk>
+
+FreeBSD is tricky with regards to cloud-init, so have a look at the
+`Cloud-init with FreeBSD`_ section instead.
+
+Cloud-init with FreeBSD
+-----------------------
+
+FreeBSD doesn't fully support cloud-init, so in order to make use of it, there
+are a bunch of manual steps involved. First, you want to install the base OS
+manually rather than use the official qcow2 images, in contrast to the
+suggestion above, because cloud-init requires a specific disk partitioning scheme.
+Best you can do is to look at the official
+`OpenStack guide <https://docs.openstack.org/image-guide/freebsd-image.html>`_
+and follow only the installation guide (along with the ``virt-install`` steps
+outlined above).
+
+Now, that you have and OS installed and booted, set the ``install.cloud_init``
+key to ``true`` in ``~/.config/lcitool/config.yaml`` and update it with the
+desired project.
+
+The sysprep phase is completely manual, as ``virt-sysprep`` cannot work with
+FreeBSD's UFS filesystem (because the Linux kernel can only mount it read-only).
+
+Compressing and uploading the image looks the same as was mentioned in the
+earlier sections
+
+::
+
+ $ virt-sparsify --compress --format qcow2 <indisk> <outdisk>
+ $ glance image-create --name <image_name> --disk-format qcow2 --file <outdisk>
+
+
Usage and examples
==================
@@ -258,65 +319,3 @@ single time you want to connect. Just add
UserKnownHostsFile /dev/null
to your ``~/.ssh/config`` file to achieve all of the above.
-
-
-Cloud-init
-==========
-
-If you intend to use the generated images as templates to be instantiated in
-a cloud environment like OpenStack, then you want to set the
-``install.cloud_init`` key to ``true`` in ``~/.config/lcitool/config.yaml``. This will
-install the necessary cloud-init packages and enable the corresponding services
-at boot time. However, there are still a few manual steps involved to create a
-generic template. You'll need to install the ``libguestfs-tools`` package for that.
-
-Once you have it installed, shutdown the machines gracefully. First, we're going to
-"unconfigure" the machine in a way, so that clones can be made out of it.
-
-::
-
- $ virt-sysprep -a libvirt-<machine_distro>.qcow2
-
-Then, we sparsify and compress the image in order to shrink the disk to the
-smallest size possible
-
-::
-
- $ virt-sparsify --compress --format qcow2 <indisk> <outdisk>
-
-Now you're ready to upload the image to your cloud provider, e.g. OpenStack
-
-::
-
- $ glance image-create --name <image_name> --disk-format qcow2 --file <outdisk>
-
-FreeBSD is tricky with regards to cloud-init, so have a look at the
-`Cloud-init with FreeBSD`_ section instead.
-
-
-Cloud-init with FreeBSD
------------------------
-
-FreeBSD doesn't fully support cloud-init, so in order to make use of it, there
-are a bunch of manual steps involved. First, you want to install the base OS
-manually rather than use the official qcow2 images, in contrast to the
-suggestion above, because cloud-init requires a specific disk partitioning scheme.
-Best you can do is to look at the official
-`OpenStack guide <https://docs.openstack.org/image-guide/freebsd-image.html>`_
-and follow only the installation guide (along with the ``virt-install`` steps
-outlined above).
-
-Now, that you have and OS installed and booted, set the ``install.cloud_init``
-key to ``true`` in ``~/.config/lcitool/config.yaml`` and update it with the
-desired project.
-
-The sysprep phase is completely manual, as ``virt-sysprep`` cannot work with
-FreeBSD's UFS filesystem (because the Linux kernel can only mount it read-only).
-
-Compressing and uploading the image looks the same as was mentioned in the
-earlier sections
-
-::
-
- $ virt-sparsify --compress --format qcow2 <indisk> <outdisk>
- $ glance image-create --name <image_name> --disk-format qcow2 --file <outdisk>