forked from msvsphere/cloud-images
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
78 lines
1.8 KiB
78 lines
1.8 KiB
# MSVSphere Cloud Images
|
|
|
|
[Packer](https://www.packer.io/) templates and configuration files for
|
|
building MSVSphere images for various cloud platforms.
|
|
|
|
|
|
## Build environment configuration
|
|
|
|
Supported operating systems:
|
|
|
|
* MSVSphere 9 and other EL9-compatible distributions
|
|
* Fedora
|
|
|
|
Follow the Packer installation [instructions](https://developer.hashicorp.com/packer/downloads?product_intent=packer).
|
|
|
|
Alternatively, you can install a Packer binary from a Yandex
|
|
[mirror](https://hashicorp-releases.yandexcloud.net/packer/): just download a
|
|
latest version archive and unzip it somewhere in PATH (e.g. `~/.local/bin`).
|
|
|
|
Verify that Packer works:
|
|
|
|
```shell
|
|
$ packer version
|
|
Packer v1.9.1
|
|
```
|
|
|
|
Install required Packer plugins:
|
|
|
|
```shell
|
|
$ packer init -upgrade .
|
|
```
|
|
|
|
Dependently on your network configuration, you may also need to open the
|
|
8000-9000 TCP port range so that Packer can serve kickstart files to VMs:
|
|
|
|
```shell
|
|
$ firewall-cmd --zone=public --add-port=8000-9000/tcp --permanent
|
|
$ firewall-cmd --reload
|
|
```
|
|
|
|
|
|
## Building images
|
|
|
|
In order to build an image use the following command syntax:
|
|
|
|
```shell
|
|
$ packer build -only=${BUILDER}.${CONFIGURATION} .
|
|
```
|
|
|
|
where `${BUILDER}` is a Packer builder (e.g. `virtualbox-iso`) and
|
|
`${CONFIGURATION}` is an image configuration name (e.g.
|
|
`msvsphere-9-vagrant-x86_64`).
|
|
|
|
A graphical VM console is disabled by default, but you can enable it for
|
|
debugging purposes by setting the `headless` variable to `false`:
|
|
|
|
```shell
|
|
$ packer build -only=vmware-iso.msvsphere-9-vagrant-x86_64 \
|
|
-var headless=false .
|
|
```
|
|
|
|
See the [variables.pkr.hcl](variables.pkr.hcl) file for other supported
|
|
variables.
|
|
|
|
|
|
### Building Vagrant boxes
|
|
|
|
VMWare Vagrant box build command:
|
|
|
|
```shell
|
|
$ packer build -only=vmware-iso.msvsphere-9-vagrant-x86_64 .
|
|
```
|
|
|
|
|
|
## License
|
|
|
|
Licensed under the MIT license, see the [LICENSE](LICENSE) file for details.
|