diff options
author | Christian Poessinger <christian@poessinger.com> | 2020-04-23 22:11:33 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-23 22:11:33 +0200 |
commit | 4e0f2e4c6a648343a8132f1eadc0cdb89bda8c4a (patch) | |
tree | 21b2dbe849d325099fd2e32418b56b7ddad23edc /README.md | |
parent | 88832a6324731f9357aa301adc70ef8448d6bc9f (diff) | |
parent | 6f037298fc0c48f2ffb4ba0780f1cfdbb1fa4acf (diff) | |
download | vyos-vm-images-4e0f2e4c6a648343a8132f1eadc0cdb89bda8c4a.tar.gz vyos-vm-images-4e0f2e4c6a648343a8132f1eadc0cdb89bda8c4a.zip |
Merge pull request #4 from zdc/fix-qemu-01
Multiple fixes and improvements in QEMU image building
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 100 |
1 files changed, 99 insertions, 1 deletions
@@ -2,6 +2,28 @@ [Ansible](https://www.ansible.com/) playbooks to build VyOS VM images. +## Requirements + +You need a machine with at least 20 GB free space with Debian 10 (bare-metal, virtual, Docker container with --privileged flag). Also, you need to install ansible and python packages: + +``` +sudo apt update +sudo apt install -y ansible python +``` + +If you want to build an OVA image, you also need `ovftool` from VMware. It should be downloaded from the [VMware site](https://code.vmware.com/tool/ovf). Also, you need a private key to sign an OVA file. It can be generated with the next command: + +``` +openssl req -x509 -nodes -sha256 -days 365 -newkey rsa:1024 -keyout myself.pem -out myself.pem +``` + +All other requirements will be installed by ansible-playbook. + + +## Prepare + +You need to copy the ISO image with VyOS to /tmp/vyos.iso before running ansible-playbook. Resulting images also will be located inside /tmp/ directory. + ## Supported Platforms - QEMU @@ -13,7 +35,6 @@ - VMware ``` - ansible-playbook vmware.yml ansible-playbook vmware.yml -e vyos_vmware_private_key_path=path_to_private_key ``` @@ -28,3 +49,80 @@ ``` ansible-playbook vagrant-libvirt.yml ``` + +## Additional (optional) parameters + +- Path to local ISO image (default: /tmp/vyos.iso): + + ``` + -e iso_local=path + ``` + + Example: + + ``` + -e iso_local=/tmp/vyos/custom_image.iso + ``` + +- Disk size (default: 10GB): + + ``` + -e disk_size=size + ``` + + Example for 2 GB: + + ``` + -e disk_size=2 + ``` + +- Enable Cloud-init (default: according to platform): + + ``` + -e cloud_init=true + ``` + +- Configure custom Cloud-init datasources (default: according to platform): + + ``` + -e cloud_init_ds=datasources + ``` + + Example: + ``` + -e cloud_init_ds=NoCloud,ConfigDrive,None + ``` + +- Install guest agent. It can be `qemu`, `vmware` (default: none): + + ``` + -e guest_agent=agent + ``` + + Example: + ``` + -e guest_agent=qemu + ``` + +- Disable configuration stage modules in Cloud-init. Mostly useful when you are building for non-cloud environments, where Cloud-init meta-data is not available (default: false): + ``` + -e cloud_init_disable_config=true + ``` + +- Create an archive with files required to PXE boot (default: false): + + ``` + -e pxe=true + ``` + +- Keep default `vyos` user with password `vyos` in configuration when building an image with Cloud-init (default: false): + + ``` + -e keep_user=true + ``` + +- Create an image with empty configuration, do not add any default settings like eth0 address, SSH service (default: false): + + ``` + -e empty_config=true + ```
\ No newline at end of file |