Skip to content

Commit d7dd446

Browse files
committed
Update vbox cpi documentation
1 parent a4d0157 commit d7dd446

File tree

1 file changed

+100
-32
lines changed

1 file changed

+100
-32
lines changed

content/virtualbox-cpi.md

Lines changed: 100 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,27 @@
11
This topic describes cloud properties for different resources created by the [VirtualBox CPI](https://bosh.io/releases/github.com/cppforlife/bosh-virtualbox-cpi-release). VirtualBox CPI works with [vSphere ESXI stemcells](https://bosh.io/stemcells/bosh-vsphere-esxi-ubuntu-xenial-go_agent).
22

3+
## Feature Support
4+
5+
The following sections describe some specific BOSH features supported by the CPI.
6+
7+
### Network
8+
9+
The CPI does not support multiple NICs being attached to a VM.
10+
11+
| Network Type | Support |
12+
| ------------ | --------------------------- |
13+
| Manual | Single network per instance |
14+
| Dynamic | Single network per instance |
15+
| VIP | Not Supported |
16+
17+
### Miscellaneous
18+
19+
| Feature | Support |
20+
| --------------------------------- | ------------- |
21+
| Multi-CPI | Not Supported |
22+
| Native Disk Resize | Not Supported |
23+
| Generic VM Resource Configuration | Supported, [v27.0.0](https://github.com/cloudfoundry/bosh-google-cpi-release/releases/tag/v27.0.0)+ |
24+
325
## AZs {: #azs }
426

527
Currently the CPI does not support any cloud properties for AZs.
@@ -16,8 +38,35 @@ azs:
1638
1739
Schema for `cloud_properties` section used by network subnet:
1840

19-
* **name** [String, required]: Name of the network. Example: `vboxnet0`. Default: `vboxnet0`.
20-
* **type** [String, optional]: Type of the network. See [`VBoxManage modifyvm` networking settings](https://www.virtualbox.org/manual/ch08.html#idp46691722135120) for valid values. Example: `hostonly`. Default: `hostonly`.
41+
* **name** [String, optional]: Name of the VirtualBox network. When not
42+
specified (i.e. empty or null value), a new network of the specified type
43+
will be created. For convenience, when the specified network does not exist,
44+
the CPI will try to create one with that name (see the many caveats about
45+
this below). Example: `vboxnet0`.
46+
* **type** [String, optional]: Type of the VirtualBox network. Supported
47+
values: `hostonly`, `bridged`, `natnetwork`.
48+
See [`VBoxManage modifyvm` networking settings][modifyvm_net_settings] for
49+
more info. Default: `hostonly`.
50+
51+
[modifyvm_net_settings]: https://www.virtualbox.org/manual/ch08.html#vboxmanage-modifyvm-networking
52+
53+
!!! Caveats on `hostonly` networking names
54+
When a `hostonly` network name si specified, but no such network exist,
55+
the diffetent version of the CPI will behave differently, depending on the
56+
VirtualBox version an operating system version.
57+
With CPI version 0.4.x or earlier, then only `vboxnet0` is accepted as a
58+
name for a network to create, and any other name will produce an error.
59+
When the `name` property is not specified, then it will default to
60+
`vboxnet0`.
61+
With version 0.5.x and later, the name of the created network may be
62+
specified with more freedom, with two dinstinct behaviors: VirtualBox v7+
63+
on macOS will create a `hostonlynet` honoring the specified name, whereas
64+
all Linux versions and macOS version 6.x (or earlier) will use the
65+
specified name as a guess for the name that VirtulBox will pick when
66+
creating the `hostonlyif` network (indeed those versions of VirtualBox are
67+
naming `hostonlyif` networks sequentially using the `vboxnetX` pattern
68+
where `X` is a digit, starting at 0). And whenever the guess is wrong, the
69+
CPI will produce an error.
2170

2271
Example of manual network:
2372

@@ -39,20 +88,35 @@ networks:
3988
Schema for `cloud_properties` section:
4089

4190
* **cpus** [Integer, optional]: Number of CPUs. Example: `1`. Default: `1`.
42-
* **memory** [Integer, optional]: RAM in megabytes. Example: `1024`. Default: `512`.
43-
* **ephemeral_disk** [Integer, optional]: Ephemeral disk size in megabytes. Example: `10240`. Default: `5000`.
44-
* **paravirtprovider** [String, optional]: Paravirtual provider type. See [`VBoxManage modifyvm` general settings](https://www.virtualbox.org/manual/ch08.html#idp46691713664256) for valid values. Default: `minimal`.
91+
* **memory** [Integer, optional]: RAM in megabytes. Example: `1024`. Default:
92+
`512`.
93+
* **ephemeral_disk** [Integer, optional]: Ephemeral disk size in megabytes.
94+
Example: `10240`. Default: `5000`.
95+
* **paravirtprovider** [String, optional]: Paravirtual provider type. See
96+
[`VBoxManage modifyvm` General Settings][modifyvm_general_settings] for
97+
valid values. Default: `default`.
98+
* **audio** [String, optional]: Audio type. See [`VBoxManage modifyvm` Other
99+
Hardware Settings][modifyvm_other_hardware] for valid values, e.g. `none`,
100+
`default`, `null`, `dsound`, `was`, `oss`, `alsa`, `pulse`, `coreaudio`.
101+
Default: `none`.
102+
103+
!!! Caveats on audio ........................................................
104+
Audio is expected to be broken with VirtualBox 7+ on macOS. Contributions
105+
are welcome.
106+
107+
[modifyvm_general_settings]: https://www.virtualbox.org/manual/ch08.html#vboxmanage-modifyvm-general
108+
[modifyvm_other_hardware]: https://www.virtualbox.org/manual/ch08.html#vboxmanage-modifyvm-other-hardware
45109

46110
Example of a VM type:
47111

48112
```yaml
49113
vm_types:
50-
- name: default
51-
cloud_properties:
52-
cpus: 2
53-
memory: 2_048
54-
ephemeral_disk: 4_096
55-
paravirtprovider: minimal
114+
- name: default
115+
cloud_properties:
116+
cpus: 2
117+
memory: 2_048
118+
ephemeral_disk: 4_096
119+
paravirtprovider: minimal
56120
```
57121

58122
---
@@ -64,8 +128,8 @@ Example of 10GB disk:
64128

65129
```yaml
66130
disk_types:
67-
- name: default
68-
disk_size: 10_240
131+
- name: default
132+
disk_size: 10_240
69133
```
70134

71135
---
@@ -86,45 +150,49 @@ properties:
86150
fe5h79YLG+gJDqVQyKJm0nDRCVz0IkM7Nhz8j07PNJzWjee/kcvv
87151
-----END RSA PRIVATE KEY-----
88152
89-
agent: {mbus: "https://mbus:[email protected]:6868"}
153+
agent:
154+
mbus: "https://mbus:[email protected]:6868"
90155
91156
ntp:
92-
- 0.pool.ntp.org
93-
- 1.pool.ntp.org
157+
- 0.pool.ntp.org
158+
- 1.pool.ntp.org
94159
95160
blobstore:
96161
provider: local
97162
path: /var/vcap/micro_bosh/data/cache
98163
```
99164

100-
See [virtualbox_cpi job](https://bosh.io/jobs/virtualbox_cpi?source=github.com/cppforlife/bosh-virtualbox-cpi-release) for more details.
165+
See the docuemtnation for [the `virtualbox_cpi` job][virtualbox_cpi_job] for
166+
more details.
167+
168+
[virtualbox_cpi_job]: https://bosh.io/jobs/virtualbox_cpi?source=github.com/cppforlife/bosh-virtualbox-cpi-release
101169

102170
---
103171
## Example Cloud Config {: #cloud-config }
104172

105173
```yaml
106174
azs:
107-
- name: z1
108-
- name: z2
175+
- name: z1
176+
- name: z2
109177
110178
vm_types:
111-
- name: default
179+
- name: default
112180
113181
disk_types:
114-
- name: default
115-
disk_size: 3000
182+
- name: default
183+
disk_size: 3000
116184
117185
networks:
118-
- name: default
119-
type: manual
120-
subnets:
121-
- range: 192.168.56.0/24
122-
gateway: 192.168.56.1
123-
azs: [z1, z2]
124-
reserved: [192.168.56.6]
125-
dns: [192.168.56.1]
126-
cloud_properties:
127-
name: vboxnet0
186+
- name: default
187+
type: manual
188+
subnets:
189+
- range: 192.168.56.0/24
190+
gateway: 192.168.56.1
191+
azs: [z1, z2]
192+
reserved: [192.168.56.6]
193+
dns: [192.168.56.1]
194+
cloud_properties:
195+
name: vboxnet0
128196
129197
compilation:
130198
workers: 2

0 commit comments

Comments
 (0)