mirror of
https://github.com/vyos/vyos-documentation.git
synced 2025-10-26 08:41:46 +01:00
cloud-init: change cli commands to code-block
This commit is contained in:
parent
76d521bd07
commit
1becc0aecc
@ -275,8 +275,10 @@ In this lab, we are using 1.3.0 VyOS version and setting a disk of 10G.
|
|||||||
Download VyOS .iso file and save it as ``/tmp/vyos.iso``. Command used for
|
Download VyOS .iso file and save it as ``/tmp/vyos.iso``. Command used for
|
||||||
generating qcow image:
|
generating qcow image:
|
||||||
|
|
||||||
.. cfgcmd:: sudo ansible-playbook qemu.yml -e disk_size=10
|
.. code-block:: sh
|
||||||
-e iso_local=/tmp/vyos.iso -e grub_console=serial -e vyos_version=1.3.0
|
|
||||||
|
sudo ansible-playbook qemu.yml -e disk_size=10 \
|
||||||
|
-e iso_local=/tmp/vyos.iso -e grub_console=serial -e vyos_version=1.3.0 \
|
||||||
-e cloud_init=true -e cloud_init_ds=NoCloud
|
-e cloud_init=true -e cloud_init_ds=NoCloud
|
||||||
|
|
||||||
File generated with previous command:
|
File generated with previous command:
|
||||||
@ -284,8 +286,9 @@ File generated with previous command:
|
|||||||
|
|
||||||
Now, that file needs to be copied to proxmox server:
|
Now, that file needs to be copied to proxmox server:
|
||||||
|
|
||||||
.. cfgcmd:: sudo scp /tmp/vyos-1.3.0-cloud-init-10G-qemu.qcow2
|
.. code-block:: sh
|
||||||
root@192.168.0.253:/tmp/
|
|
||||||
|
sudo scp /tmp/vyos-1.3.0-cloud-init-10G-qemu.qcow2 root@192.168.0.253:/tmp/
|
||||||
|
|
||||||
|
|
||||||
------------------------
|
------------------------
|
||||||
@ -304,7 +307,9 @@ In Proxmox server three files are going to be used for this setup:
|
|||||||
In this lab, all files are located in ``/tmp/``. So, before going on, lets
|
In this lab, all files are located in ``/tmp/``. So, before going on, lets
|
||||||
move to that directory:
|
move to that directory:
|
||||||
|
|
||||||
.. cfgcmd:: cd /tmp/
|
.. code-block:: sh
|
||||||
|
|
||||||
|
cd /tmp/
|
||||||
|
|
||||||
**user-data** file must start with ``#cloud-config`` and contains
|
**user-data** file must start with ``#cloud-config`` and contains
|
||||||
vyos-commands. For example:
|
vyos-commands. For example:
|
||||||
@ -350,7 +355,9 @@ image, which needs to be mounted to the new VM as a cd.
|
|||||||
|
|
||||||
Command for generating ``seed.iso``
|
Command for generating ``seed.iso``
|
||||||
|
|
||||||
.. cfgcmd:: mkisofs -joliet -rock -volid "cidata" -output seed.iso meta-data
|
.. code-block:: sh
|
||||||
|
|
||||||
|
mkisofs -joliet -rock -volid "cidata" -output seed.iso meta-data \
|
||||||
user-data network-config
|
user-data network-config
|
||||||
|
|
||||||
**NOTE**: be carefull while copying and pasting previous commands. Doble
|
**NOTE**: be carefull while copying and pasting previous commands. Doble
|
||||||
@ -376,7 +383,9 @@ setups:
|
|||||||
``seed.iso`` was previously created in directory ``/tmp/``. It's necessary to
|
``seed.iso`` was previously created in directory ``/tmp/``. It's necessary to
|
||||||
move it to ``/var/lib/vz/template/iso``
|
move it to ``/var/lib/vz/template/iso``
|
||||||
|
|
||||||
.. cfgcmd:: mv /tmp/seed.iso /var/lib/vz/template/iso/
|
.. code-block:: sh
|
||||||
|
|
||||||
|
mv /tmp/seed.iso /var/lib/vz/template/iso/
|
||||||
|
|
||||||
On proxmox server:
|
On proxmox server:
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user