blob: 635c145175389dddcf17bb558428f1ca7cd907b3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
|
# vyos-vm-images
[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
```
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
```
ansible-playbook qemu.yml
```
- VMware
```
ansible-playbook vmware.yml
ansible-playbook vmware.yml -e vyos_vmware_private_key_path=path_to_private_key
```
- Microsoft Hyper-V
```
ansible-playbook hyperv.yml
```
- Vagrant libvirt
```
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
```
- 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
```
- Exclude the `cc_vyos` module from Cloud-init in the PXE archive. Mostly useful when you are building for non-cloud environments, where Cloud-init meta-data is not available (default: false):
```
-e pxe_excl_module=true
```
|