User Tools

Site Tools


esxi:photon_os

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
esxi:photon_os [2020/05/18 19:05]
derek
esxi:photon_os [2024/09/22 19:51] (current)
Line 1: Line 1:
-=====Photon Os=====+=====Photon OS=====
 Photon OS is an open source Linux container host optimized for cloud-native applications, cloud platforms, and VMware infrastructure. Photon OS is an open source Linux container host optimized for cloud-native applications, cloud platforms, and VMware infrastructure.
  
Line 5: Line 5:
 Setup minimal installed profile of PhotonOS Setup minimal installed profile of PhotonOS
  
-  * Download the Photon OS ''OVA with virtual hardware v13'' from [[https://github.com/vmware/photon/wiki/Downloading-Photon-OS]]+  * Download the latest Photon OS ''OVA with virtual hardware v15'' from [[https://github.com/vmware/photon/wiki/Downloading-Photon-OS]]
   * In ESXi:   * In ESXi:
-    * ''Create/Register VM'' +    * ''Create/Register VM'': 
-    * ''Deploy a virtual machine from an OVF or OVA file'' +      * ''Deploy a virtual machine from an OVF or OVA file'' 
-    * Name the VM +      * Name the VM 
-    * Upload the Photon OS OVA file +      * Upload the Photon OS OVA file 
-    * Specify the desired ''Target Datastore'' +      * Specify the desired ''Target Datastore'' 
-    * Accept the License Agreement +      * Accept the License Agreement 
-    * Deselect ''Automatically Start''' +      * Deselect ''Power on automatically'' 
-    * Confirm settings +      * Confirm settings and ''Finish'' 
-    *  +    * Wait for the files to upload 
-    * ''Actions'' > ''Edit Settings'' +    * If autostart is desired for this machine go to ''Host'' > ''Manage'' > ''System'' > ''Autostart'': 
-    Select appropriate VM settings depending on desired applications +      Click on the current VM 
-    * Use NVMe Controller for the hard disk if using NVMe storage +      * ''Enable'' 
-    *  +      * Use ''Start earlier'' and ''Start later'' to set the desired order 
-    Set desired autostart setting+    * Go to ''Virtual Machines'' on the sidebar and click on the current VM 
 +    * ''Actions'' > ''Edit Settings'': 
 +      * Set the required CPU and Memory requirements 
 +      * If using NVMe storage for the datastore: 
 +        ''Add other device'' > ''NVMe controller'' 
 +        ''Hard Disk 1'' > ''Controller location'' > ''NVMe controller 0'' 
 +        * Save and reopen ''Edit Settings'' 
 +        * Remove ''SCSI controller 0'' 
 +      * Select other appropriate VM settings depending on desired applications
     * Power on the VM, then shut it down again to generate a MAC address     * Power on the VM, then shut it down again to generate a MAC address
-    * Give the VM a static IP address from your router using the generated MAC address and desired hostname+    * Give the VM a static IP address from your router using the generated MAC address (found under ''Hardware Configuration'' > ''Network adapter 1''and desired hostname
     * Power on the VM     * Power on the VM
-    * Using SSH client, connect to the hostname set above, then run:+    * Using an SSH client, connect to the hostname set above, then run:
 <code bash> <code bash>
 # Login with root details from the VM note # Login with root details from the VM note
 # Follow instructions to set new password # Follow instructions to set new password
 +
 +# Remove docker related packages if not needed to save space and faster updates
 +tdnf erase containerd docker docker-cli docker-engine
 +
 # Update packages: # Update packages:
 tdnf upgrade tdnf upgrade
 +tdnf clean all
 +
 # Disable password expiry: # Disable password expiry:
 chage -M -1 root chage -M -1 root
 +
 # Set new hostname: # Set new hostname:
 hostnamectl set-hostname <hostname-as-set-in-router> hostnamectl set-hostname <hostname-as-set-in-router>
 +
 +# Set the timezone to Perth
 +ln -sf /usr/share/zoneinfo/Australia/Perth /etc/localtime
 +
 # Change the SSH port to 50001: # Change the SSH port to 50001:
 sed -i "s/#Port 22/Port 50001/" /etc/ssh/sshd_config sed -i "s/#Port 22/Port 50001/" /etc/ssh/sshd_config
-iptables -A INPUT -p tcp -m state --state NEW -m tcp --dport 50001 -j ACCEPT +sed -i "s/-A INPUT -p tcp -m tcp --dport 22 -j ACCEPT/-INPUT -p tcp -m tcp --dport 50001 -m state --state NEW -j ACCEPT/" /etc/systemd/scripts/ip4save 
-iptables -INPUT -p tcp -m tcp --dport 22 -j ACCEPT+
 exit exit
 </code> </code>
-    Shutdown the VM + 
-    * Save a snapshot called ''Base Install''+    Shut down the VM
     * Edit VM note to be the following:     * Edit VM note to be the following:
 <code> <code>
Line 50: Line 69:
 50001/tcp SSH 50001/tcp SSH
 </code> </code>
 +    * Save a snapshot called ''Base Install''
  
 ====Update==== ====Update====
-  * If desired, Log in to ESXi, navigate to the docker VM and create new snapshot +  * If desired, Log in to ESXi, navigate to the photon based VM and create new temporary snapshot 
-  * Using SSH client, connect to <hostname>:50001 then run: +  * Using an SSH client, connect to <hostname>:50001 then run: 
-<code>+<code bash>
 tdnf upgrade tdnf upgrade
 tdnf clean all tdnf clean all
 reboot  # If desired/needed reboot  # If desired/needed
 </code> </code>
esxi/photon_os.1589828750.txt.gz · Last modified: 2024/09/22 19:51 (external edit)