Deploying VCF Offline Depot using Photon OS
December 29, 2025 | Homelab, Linux, VCF, VMware | No Comments
Greetings, today we will be deploying an Photon Linux Offline Depot for VCF
This was done using Aaron Rombaut’s and the Broadcom KB articles.
To start, you will need to download the Photon OS from the following link. I will be using the OVA with visual hardware v15 version.
https://github.com/vmware/photon/wiki/Downloading-Photon-OS

I will be downloading the minimal ISO for x86_64

RIght-click your cluster and select New Virtual Machine

Select Next

Enter the Virtual Machine name and select Next

Choose the cluster you want to deploy to and select Next

Choose the desired storage and select Next

Select your version compatibility. I changed from 9 to 8.0 U2 and later as I have an 8.0 U3 node that it has a chance to be moved to between rebuilds.

Choose the appropriate OS version. Since this is for Linux Photon OS, I selected that. Select Next

Select Add New Device, choose Hard Disk, and set the New Hard disk 2 to at least 250GB (recommended is 1TB). I also changed CPU to 2, Memory to 4, change the network vlan to match what you will be deploying on.

Change CD/DVD Drive to Datastore ISO file, find your ISO and select it. Check the Connect at Power On box. Select Next

Review your choices and select Finish

Power on the VM and then select Launch Web Console

Review the license agreement, then if you agree, hit Enter to Accept

We will install the OS on the 16G drive on /dev/sda. I will select Auto in this case

I am going to select Configure network manually

Enter your information and then select OK

Since I am doing this on an ESX (its on purpose, 9 changed back to ESX) host, I will choose VMwarem Hypervisor Optimized

Enter your hostname and hit enter

Enter your password and hit enter

Confirm you have the correct password and hit enter

Confirm if you are ready to install and hit enter

Once completed press any key to reboot

Go back to ESX and edit settings, then change CD/DVD drive back to Client Device and select OK

Login using the console as root so that we can enable SSH access for root

Once logged in, enter the following line to edit the config file
Vi /etc/ssh/sshd_config

Once in the file, find the PermitRootLogin line, this should be line 32, as shown in the lower right of the image. Hit the “i” key to enter insert mode

Once in insert mode, remove the no and type in yes, hit escape to exit insert mode

To save an exit, enter the following
:wq
Hit enter

Restart the sshd service and verify it using the below commands
systemctl restart sshd.service
Systemctl status sshd.service
Add additional DNS Server
If you have an additional DNS server, feel free to do the following steps, if not please continue past them

Enter the following to edit the network settings for the adapter
vi /etc/systemd/network/50-static-en.network

Hit the “i” key and add your DNS server by leaving a space after the existing one then the IP of the new one

After entering the information it should look like this

Hit escape, the type the following
:wq
Hit enter

Once back at the prompt, enter the following to restart the systemd-resolved service
systemctl restart systemd-resolved

Enter the following
resolvectl status

Your results should look similar to this
Update the Operating System

Enter the following to apply updates
Tdnf update –assumeyes
Hit enter

Once completed

Enter reboot and hit enter
Prepare the additional disk
After the system has rebooted, log back in

Run the following command to list drives\mount points
lsblk -f
In this case, sdb will be our new drive

Enter the following command and hit enter
Fdisk /dev/sdb

Enter n for new partition

Enter P for primary partition and hit enter

Enter the number 1 for the partition number and hit enter

Leave first sector blank to select the default, hit enter

Same thing with the last sector, leave blank to select the default and hit enter

Your completed process for creating the new drive and partition should look like this. There will be a size difference if you chose a different size drive of course.

Type in w and hit enter to save the changes

You should see the above once completed
Format the new partition

Enter the following to format the drive
Mkfs -t ext4 /dev/sdb1

You should see the above once complete
Attaching the drive

Enter the following command and hit enter
Mkdir -p /var/www/html

Type the following and hit enter
UUID=$(blkid -s PARTUUID -o value /dev/sdb1)
This will pull the identifier and add it to the variable UUID so that we can add it to fstab to make sure its mounted every boot

Enter the following command and hit enter to add the partition to fstab
Echo “PARTUUID=${UUID} /var/www/html ext4 defaults 0 2” >> /etc/fstab

Type the following and hit enter to mount the partition
mount -a

Run the following command to show mounted locations. Notice the bottom line is the newly added sdb1
df -h
Allow HTTPS through Firewall

Type the following to allow https traffic through the firewall
Iptables -A INPUT -p tcp -m tcp –dport 443 -j ACCEPT

Type in the following to see what iptables rules are in place
iptables -L

Enter the following command to save the new rule into the iptables list
Iptables-save > > /etc/systemd/scripts/ip4save
Install Apache Web Server

Run the following command to install Apache. This does require an internet connection to do this way.
tdnf install httpd tar tree –assumeyes

Once the install has completed, it should look like this
Configure Certificate for Web Server

Enter the following command to create the folder the certificates will be worked on from
Mkdir /root/apache-certs

Enter the following command to change directory to the new apache-certs folder
cd /root/apache-certs

Enter the following command to generate the private key for the certificate
Openssl genpkey -out /root/apache-certs/server.key -algorithm RSA -pkeyopt rsa_keygen_bits:2048

Enter the following command to start building the configuration file for generating the certificate request. Current standards require certificates to have the Subject Alternative Name (SAN) and certificate name match.
Vi offline-depot.cnf
The following is the basic info needed for the file. Modify to suit your environment
[req]
distinguished_name = req_distinguished_name
req_extensions = req_ext
prompt = no
[req_distinguished_name]
C = <country>
ST = <state>
L = <locality>
O = <organization>
OU = <organizational unit>
CN = <fully-qualified domain name>
[req_ext]
subjectAltName = @alt_names
[alt_names]
IP.1 = <ip address>
DNS.1 = <fully-qualified domain name>
DNS.2 = <short name>

Type the following command to generate the certificate request (CSR) using the config file we just created along with the previously created private key.
Openssl req -new -key /root/apache-certs/server.key -out /root/apache-certs/request.csr -config /root/apache-certs/offline-depot.cnf

Since I’m a child of the GUI, I used winscp to pull the file over to my jump box to request the certificate

Go to your certificate server and place your request

Make sure you export the new certificate as Base 64 encoded, DER will not work and would have to be converted

Combine the root ca, intermediate ca (if you have one), and the machine certificate into a new chain cert file. Transfer that back to the offline depot.

Rename the file to server.crt

Type the following command to move the server.key and server.crt files to the /etc/httpd/conf folder
mv /root/apache-certs/server.* /etc/httpd/conf

Type the following command to make sure the permissions are where we need them to be
Chmod 0400 /etc/httpd/conf/server.* && chown root:root /etc/httpd/conf/server.*
Please make sure no other files in the folder have the “server” name as they would get the changes as well.
Configure the httpd.conf file

Type the following command to load the ssl module
sed -i ‘s|#LoadModule ssl_module|LoadModule ssl_module|’ /etc/httpd/conf/httpd.conf

Type the following command to load the socache_schmcb module
sed -i ‘s|#LoadModule socache_shmcb_module|LoadModule socache_shmcb_module|’ /etc/httpd/httpd.conf

Type the following command to include the httpd-ssl.conf file
sed -i ‘s|#Include conf/extra/httpd-ssl.conf|Include conf/extra/httpd-ssl.conf|’ /etc/httpd/conf/httpd.conf
Configure the httpd-ssl.conf file

Type the following command to set the document root location
sed -i ‘s|DocumentRoot “/etc/httpd/html”|DocumentRoot “/var/www/html”|’ /etc/httpd/conf/extra/httpd-ssl.conf

Type the following command to set the email addresses for the website.
sed -i ‘s|ServerAdmin admin@Admin.com|ServerAdmin Admin@admin.com|’ /etc/httpd/conf/extra/httpd-ssl.conf

Type the following command to set the server name for SSL. Please use the appropriate name for yours.
sed -i ‘s|ServerName www.example.com:443|ServerName depot.rainpole.io:443|’ /etc/httpd/conf/extra/httpd-ssl.conf

Type the following command to edit the httpd-ssl.conf file at line 290
Vi /etc/httpd/conf/extra/httpd-ssl.conf +290

Add the following in after the CustomLog lines and before the </VirtualHost>. Hit the ‘i’ key to enter insert mode.
<Directory /var/www/html/PROD/COMP>
AuthType Basic
AuthName “Basic Authentication”
AuthUserFile /etc/httpd/conf/.htpasswd
require valid-user
</Directory>
<Directory /var/www/html/PROD/metadata>
AuthType Basic
AuthName “Basic Authentication”
AuthUserFile /etc/httpd/conf/.htpasswd
require valid-user
</Directory>
<Directory “/var/www/html/PROD/COMP/Compatibility/VxrailCompatibilityData.json”>
# VxRail VVS Cookie Validation (VCF 5.0)
<If “%{HTTP:Cookie} == ‘ngssosession=ngsso-token’ “>
Require all granted
</If>
</Directory>
<Directory /var/www/html/PROD/vsan/hcl>
Require all granted
</Directory>
# Those Alias statements are needed only for VCF 5.1.0.0.
Alias /products/v1/bundles/lastupdatedtime /var/www/html/PROD/vsan/hcl/lastupdatedtime.json
Alias /products/v1/bundles/all /var/www/html/PROD/vsan/hcl/all.json
# Needed only if UMDS downloads are presented
<Directory /var/www/html/umds-patch-store>
Require all granted
</Directory>
Hit esc key to exit insert mode, then type :wq to save and quit
Configure Basic Authentication

Type the following to create an user for the website
htpasswd -c /etc/httpd/conf/.htpasswd <username>
Remove the -c for any other users created

You should see this output once completed

Type the following to change the file owner and permissions to protect the password file
chown apache /etc/httpd/conf/.htpasswd && chmod 0400 /etc/httpd/conf/.htpasswd

The permissions for the file should look like this afterwards
Cleanup Activities

Type the following command to remove the apache-certs folder
rm -rf /root/apache-certs

Type the following command to remove the index file for the website
rm -rf /var/www/html/index.html

Type the following command to modify the sshd_config file to set PermitRootLogin back to no

It should look like this after the change

Hit esc and then type in :wq and press enter to exit the edit

Edit the following file to ensure the DocumentRoot path is properly “/var/www/html”
Also change “Required all denied” to “Required all granted”

Run the following command to check the syntax of the configuration
httpd -t

Run the following command to start the httpd service
systemctl start httpd

Run the following command to check the status of the httpd service
systemctl status httpd

Run the following commands to set the permissions for the files
chown apache -R /var/www
chown apache -R /var/www/html/
find /var/www/html -type d -eec chmod 0500 {} \;
find /var/www/html -type f -exec chmod 0400 {} \;
Download of the VCF Binaries

Transfer the vcf download tool to the offline depot. I used WinSCP for this

Run the following command to create the folder the download tool will be expanded to
mkdir ~/vcf-download-tool

Run the following command to extract the vcf download tool
tar -xvf vcf-download-tool-9.0.1.0.24962179.tar.gz -C ~/vcf-download-tool/

Change to the directory
cd vcf-download-tool/bin

Run the following command to kick off the download.
./vcf-download-tool binaries download -d /var/www/html –depot-download-token-file /var/www/html/downloadtoken.txt –vcf-version=9.0.1 –type=INSTALL
Note: these are supposed to be two dashes – –

Answer Y or N for enabling the Customer Experience Improvement Program
Note, you will need to create the downloadtoken.txt file and place it on the system and include it with the command. The content of the download token is your organization’s download token.

Once its started downloading you should see the above

Once it’s completed, you should get the above summary of what was downloaded.
Variations of the download command
You can download upgrades and patches as well using the download tool using the below commands. Change the version as appropriate. Base 9.0 will download anything 9.0.x
Install:
./vcf-download-tool binaries download -d /var/www/html –depot-download-token-file /var/www/html/downloadtoken.txt –vcf-version=9.0 –type=INSTALL
Upgrade:
./vcf-download-tool binaries download -d /var/www/html –depot-download-token-file /var/www/html/downloadtoken.txt –vcf-version=9.0 –type=UPGRADE
Patch:
./vcf-download-tool binaries download -d /var/www/html –depot-download-token-file /var/www/html/downloadtoken.txt –vcf-version=9.0 –patches-only
You should now have a functioning Offline Depot. Have a good one.













































































































































































































































































































