Skip to content

Commit

Permalink
Adding support for Rocky Linux Server
Browse files Browse the repository at this point in the history
Addressing vmware-samples#13.

Note: Guest Customization is not supported for Rocky Linux in vCenter Server 7.0 Update 2.
  • Loading branch information
tenthirtyam committed Jul 16, 2021
1 parent 6e61aa4 commit 4ba6e78
Show file tree
Hide file tree
Showing 6 changed files with 596 additions and 38 deletions.
46 changes: 27 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,27 +16,30 @@ If an item of the same name exists in the target content library, Packer will up
The following builds are automated:

**Linux Distributions**
* VMware Photon OS 4.0
* VMware Photon OS 3.0
* VMware Photon OS 4
* VMware Photon OS 3
* Ubuntu Server 20.04 LTS
* Ubuntu Server 18.04 LTS
* Red Hat Enterprise Linux Server 8
* Red Hat Enterprise Linux Server 7
* Rocky Linux Server 8
* CentOS Server 8
* CentOS Server 7

**Microsoft Windows** - _Core and Desktop Experience_
* Microsoft Windows Server 2019 - Standard and Datacenter
* Microsoft Windows Server 2016 - Standard and Datacenter

> **NOTE**: Guest Customization is [**not supported**](https://partnerweb.vmware.com/programs/guestOS/guest-os-customization-matrix.pdf) for Rocky Linux in vCenter Server 7.0 Update 2.
## Requirements

* macOS, Linux, or Windows.
* vCenter Server 7.0 Update 2 or higher.
* [Packer 1.7.3][packer-install] or higher.
* [packer-plugin-windows-update] 0.12.0 - a community plug-in for Packer.

> **NOTE**: You must initialize the Packer plug-ins or place these same directory as your Packer executable `/usr/local/bin` or `$HOME/.packer.d/plugins`.
> **NOTE**: You must initialize the Packer plug-ins using Option P in `./build.sh` or place these same directory as your Packer executable `/usr/local/bin` or `$HOME/.packer.d/plugins`.
## Structure

Expand Down Expand Up @@ -114,14 +117,16 @@ rainpole@macos> git clone https://github.com/rainpole/packer-vsphere.git
* [Download][download-linux-ubuntu-server-20-04-lts] the latest **live** release.
* Ubuntu Server 18.04 LTS
* [Download][download-linux-ubuntu-server-18-04-lts] the latest legacy **non-live** release.
* CentOS Server 8
* [Download][download-linux-centos-server-8] the latest release of the full (e.g `CentOS-x86_64-dvd1.iso`) .iso image.
* CentOS Server 7
* [Download][download-linux-centos-server-7] the latest release of the full (e.g `CentOS-x86_64-dvd1.iso`) .iso image.
* Red Hat Enterprise Linux Server 8
* [Download][download-linux-redhat-server-8] the latest release of the full (e.g `RHEL-x86_64-dvd1.iso`) .iso image.
* Red Hat Enterprise Linux Server 7
* [Download][download-linux-redhat-server-7] the latest release of the full (e.g `RHEL-x86_64-dvd1.iso`) .iso image.
* Rocky Linux Server 8
* [Download][download-linux-rocky-server-8] the latest release of the full (e.g `Rocky-x86_64-dvd1.iso`) .iso image.
* CentOS Server 8
* [Download][download-linux-centos-server-8] the latest release of the full (e.g `CentOS-x86_64-dvd1.iso`) .iso image.
* CentOS Server 7
* [Download][download-linux-centos-server-7] the latest release of the full (e.g `CentOS-x86_64-dvd1.iso`) .iso image.

**Microsoft Windows**
* Microsoft Windows Server 2019
Expand Down Expand Up @@ -611,18 +616,19 @@ The menu will allow you to execute and confirm a build using Packer and the `vsp
4 - Ubuntu Server 18.04 LTS
5 - Red Hat Enterprise Linux Server 8
6 - Red Hat Enterprise Linux Server 7
7 - CentOS Server 8
8 - CentOS Server 7
7 - Rocky Linux Server 8
8 - CentOS Server 8
9 - CentOS Server 7
Microsoft Windows:
9 - Windows Server 2019 - All
10 - Windows Server 2019 - Standard Only
11 - Windows Server 2019 - Datacenter Only
12 - Windows Server 2016 - All
13 - Windows Server 2016 - Standard Only
14 - Windows Server 2016 - Datacenter Only
10 - Windows Server 2019 - All
11 - Windows Server 2019 - Standard Only
12 - Windows Server 2019 - Datacenter Only
13 - Windows Server 2016 - All
14 - Windows Server 2016 - Standard Only
15 - Windows Server 2016 - Datacenter Only
Other:
Expand Down Expand Up @@ -667,14 +673,16 @@ Happy building!!!
[credits-maher-alasfar-github]: https://github.com/vmwarelab/cloud-init-scripts
[credits-owen-reynolds-twitter]: https://twitter.com/OVDamn
[credits-owen-reynolds-github]: https://github.com/getvpro/Build-Packer/blob/master/Scripts/Install-VMTools.ps1
[download-linux-centos-server-8]: http:https://isoredirect.centos.org/centos/8/isos/x86_64/
[download-linux-centos-server-7]: http:https://isoredirect.centos.org/centos/7/isos/x86_64/

[download-linux-photon-server-4]: https://packages.vmware.com/photon/4.0/
[download-linux-photon-server-3]: https://packages.vmware.com/photon/3.0/
[download-linux-redhat-server-8]: https://access.redhat.com/downloads/content/479/
[download-linux-redhat-server-7]: https://access.redhat.com/downloads/content/69/
[download-linux-ubuntu-server-20-04-lts]: https://releases.ubuntu.com/20.04.1/
[download-linux-ubuntu-server-18-04-lts]: http:https://cdimage.ubuntu.com/ubuntu/releases/18.04.5/release/
[download-linux-redhat-server-8]: https://access.redhat.com/downloads/content/479/
[download-linux-redhat-server-7]: https://access.redhat.com/downloads/content/69/
[download-linux-rocky-server-8]: https://download.rockylinux.org/pub/rocky/8/isos/x86_64/
[download-linux-centos-server-8]: http:https://isoredirect.centos.org/centos/8/isos/x86_64/
[download-linux-centos-server-7]: http:https://isoredirect.centos.org/centos/7/isos/x86_64/
[hashicorp]: https://www.hashicorp.com/
[iso]: https://en.wikipedia.org/wiki/ISO_image
[microsoft-kms]: https://docs.microsoft.com/en-us/windows-server/get-started/kmsclientkeys
Expand Down
63 changes: 44 additions & 19 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,29 @@ menu_option_6() {
}

menu_option_7() {
cd builds/linux/rocky-server-8/
echo -e "\nCONFIRM: Build a Rocky Linux Server 8 Template for VMware vSphere."
echo -e "\nContinue? (y/n)"
read REPLY
if [[ ! $REPLY =~ ^[Yy]$ ]]
then
exit 1
fi

### Build a Rocky Linux 8 Template for VMware vSphere ###
echo "Building a Rocky Linux Server 8 Template for VMware vSphere ..."
rm -f output-vmware-iso/*.ova

### Apply the HashiCorp Packer Build ###
echo "Applying the HashiCorp Packer Build ..."
packer build -force \
-var-file="../../../vsphere.pkrvars.hcl" .

### All done. ###
echo "Done."
}

menu_option_8() {
cd builds/linux/centos-server-8/
echo -e "\nCONFIRM: Build a CentOS Server 8 Template for VMware vSphere."
echo -e "\nContinue? (y/n)"
Expand All @@ -165,7 +188,7 @@ menu_option_7() {
echo "Done."
}

menu_option_8() {
menu_option_9() {
cd builds/linux/centos-server-7/
echo -e "\nCONFIRM: Build a CentOS Server 7 Template for VMware vSphere."
echo -e "\nContinue? (y/n)"
Expand All @@ -188,9 +211,9 @@ menu_option_8() {
echo "Done."
}

menu_option_9() {
menu_option_10() {
cd builds/windows/windows-server-2019/
echo -e "\nCONFIRM: Build a Microsoft Windows Server 2019 Templates for VMware vSphere."
echo -e "\nCONFIRM: Build all Microsoft Windows Server 2019 Templates for VMware vSphere."
echo -e "\nContinue? (y/n)"
read REPLY
if [[ ! $REPLY =~ ^[Yy]$ ]]
Expand All @@ -199,7 +222,7 @@ menu_option_9() {
fi

### Build Microsoft Windows Server 2019 Templates for VMware vSphere ###
echo "Building a Microsoft Windows Server 2019 Templates for VMware vSphere ..."
echo "Building all Microsoft Windows Server 2019 Templates for VMware vSphere ..."
rm -f output-vmware-iso/*.ova

### Apply the HashiCorp Packer Build ###
Expand All @@ -211,7 +234,7 @@ menu_option_9() {
echo "Done."
}

menu_option_10() {
menu_option_11() {
cd builds/windows/windows-server-2019/
echo -e "\nCONFIRM: Build a Microsoft Windows Server 2019 Templates for VMware vSphere."
echo -e "\nContinue? (y/n)"
Expand All @@ -235,7 +258,7 @@ menu_option_10() {
echo "Done."
}

menu_option_11() {
menu_option_12() {
cd builds/windows/windows-server-2019/
echo -e "\nCONFIRM: Build a Microsoft Windows Server 2019 Datacenter Templates for VMware vSphere."
echo -e "\nContinue? (y/n)"
Expand All @@ -259,9 +282,9 @@ menu_option_11() {
echo "Done."
}

menu_option_12() {
menu_option_13() {
cd builds/windows/windows-server-2016/
echo -e "\nCONFIRM: Build a Microsoft Windows Server 2016 Templates for VMware vSphere."
echo -e "\nCONFIRM: Build all Microsoft Windows Server 2016 Templates for VMware vSphere."
echo -e "\nContinue? (y/n)"
read REPLY
if [[ ! $REPLY =~ ^[Yy]$ ]]
Expand All @@ -270,7 +293,7 @@ menu_option_12() {
fi

### Build Microsoft Windows Server 2016 Templates for VMware vSphere ###
echo "Building a Microsoft Windows Server 2016 Templates for VMware vSphere ..."
echo "Building all Microsoft Windows Server 2016 Templates for VMware vSphere ..."
rm -f output-vmware-iso/*.ova

### Apply the HashiCorp Packer Build ###
Expand All @@ -282,7 +305,7 @@ menu_option_12() {
echo "Done."
}

menu_option_13() {
menu_option_14() {
cd builds/windows/windows-server-2016/
echo -e "\nCONFIRM: Build a Microsoft Windows Server Standard 2016 Templates for VMware vSphere."
echo -e "\nContinue? (y/n)"
Expand All @@ -306,7 +329,7 @@ menu_option_13() {
echo "Done."
}

menu_option_14() {
menu_option_15() {
cd builds/windows/windows-server-2016/
echo -e "\nCONFIRM: Build a Microsoft Windows Server 2016 Datacenter Templates for VMware vSphere."
echo -e "\nContinue? (y/n)"
Expand Down Expand Up @@ -393,18 +416,19 @@ until [ "$selection" = "0" ]; do
echo " 4 - Ubuntu Server 18.04 LTS"
echo " 5 - Red Hat Enterprise Linux Server 8"
echo " 6 - Red Hat Enterprise Linux Server 7"
echo " 7 - CentOS Server 8"
echo " 8 - CentOS Server 7"
echo " 7 - Rocky Linux Server 8"
echo " 8 - CentOS Server 8"
echo " 9 - CentOS Server 7"
echo ""
echo ""
echo " Microsoft Windows:"
echo ""
echo " 9 - Windows Server 2019 - All"
echo " 10 - Windows Server 2019 - Standard Only"
echo " 11 - Windows Server 2019 - Datacenter Only"
echo " 12 - Windows Server 2016 - All"
echo " 13 - Windows Server 2016 - Standard Only"
echo " 14 - Windows Server 2016 - Datacenter Only"
echo " 10 - Windows Server 2019 - All"
echo " 11 - Windows Server 2019 - Standard Only"
echo " 12 - Windows Server 2019 - Datacenter Only"
echo " 13 - Windows Server 2016 - All"
echo " 14 - Windows Server 2016 - Standard Only"
echo " 15 - Windows Server 2016 - Datacenter Only"
echo ""
echo ""
echo " Other:"
Expand All @@ -430,6 +454,7 @@ until [ "$selection" = "0" ]; do
12 ) clear ; menu_option_12 ; press_enter ;;
13 ) clear ; menu_option_13 ; press_enter ;;
14 ) clear ; menu_option_14 ; press_enter ;;
15 ) clear ; menu_option_15 ; press_enter ;;
P ) clear ; plugins ; press_enter ;;
I ) clear ; info ; press_enter ;;
Q ) clear ; exit ;;
Expand Down
Loading

0 comments on commit 4ba6e78

Please sign in to comment.