Browse code

Restructuring Installation, Admin, and User Guides

Change-Id: I5fd9fa8f6ae49da61d3f0f523fdc8f5d72098034
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/6198
Reviewed-by: Stuart Clements <sclements@vmware.com>
Tested-by: Stuart Clements <sclements@vmware.com>

Vidya Vasudevan authored on 2018/11/19 18:44:24
Showing 121 changed files
1 1
deleted file mode 100644
... ...
@@ -1,16 +0,0 @@
1
-An official Vagrant box is available on Hashicorp Atlas. To get started: 
2
-
3
-	vagrant init vmware/photon
4
-
5
-Add the following lines to the Vagrantfile: 
6
-
7
-	config.vm.provider "virtualbox" do |v|
8
-	  v.customize ['modifyvm', :id, '--acpi', 'off']
9
-	end
10
-
11
-Install vagrant-guests-photon plugin which provides VMware Photon OS guest support.
12
-It is available at https://github.com/vmware/vagrant-guests-photon.
13
-
14
-Requires VirtualBox 4.3 or later version. If you have issues, please check your version.
15
-
16
-
17 1
deleted file mode 100644
... ...
@@ -1,15 +0,0 @@
1
-# Downloading Photon OS
2
-
3
-You download Photon OS from https://github.com/vmware/photon/wiki/Downloading-Photon-OS.
4
-
5
-Photon OS is available in the following pre-packaged, binary formats.
6
-
7
-### Download Formats ####
8
-
9
-| Format | Description |
10
-| --- | --- |
11
-| ISO Image | Contains everything needed to install either the minimal or full installation of Photon OS. The bootable ISO has a manual installer or can be used with PXE/kickstart environments for automated installations. |
12
-| OVA | Pre-installed minimal environment, customized for VMware hypervisor environments. These customizations include a highly sanitized and optimized kernel to give improved boot and runtime performance for containers and Linux applications. Since an OVA is a complete virtual machine definition, we've made available a Photon OS OVA that has virtual hardware version 11; this will allow for compatibility with several versions of VMware platforms or allow for the latest and greatest virtual hardware enhancements. |
13
-| Amazon AMI | Pre-packaged and tested version of Photon OS made ready to deploy in your Amazon EC2 cloud environment. Previously, we'd published documentation on how to create an Amazon compatible instance, but, now we've done the work for you. |
14
-| Google GCE Image | Pre-packaged and tested Google GCE image that is ready to deploy in your Google Compute Engine Environment, with all modifications and package requirements for running Photon OS in GCE. | 
15
-| Azure VHD | Pre-packaged and tested Azure HD image that is ready to deploy in your Microsoft Azure Cloud, with all modifications and package requirements for running Photon OS in Azure. |
16 1
\ No newline at end of file
17 2
deleted file mode 100644
... ...
@@ -1,38 +0,0 @@
1
-# Installing the Lightwave Client on a Photon Image and Joining the Client to a Domain
2
-
3
-After you have set up a Lightwave domain controller, you can join Photon clients to that domain. You install the Lightwave client first. After the client is installed, you join the client to the domain.
4
-
5
-## Prerequisites
6
-
7
-- Prepare a Photon OS client for the Lightwave client installation.
8
-- Verify that the hostname of the client can be resolved.
9
-- Verify that you have 184 MB free for the Lightwave client installation.
10
-
11
-## Procedure
12
-
13
-1. Log in to your Photon OS client over SSH.
14
-2. Install the Lightwave client by running the following command. 
15
-	
16
-	`# tdnf install lightwave-client -y`
17
-
18
-3. Edit the `iptables` firewall rules configuration file to allow connections on port `2020` as a default setting.
19
-	
20
-	The default Photon OS 2.0 firewall settings block all incoming, outgoing, and forwards so that you must configure the rules.
21
-
22
-	1. Open the  iptables settings file.
23
-	
24
-	`# vi /etc/systemd/scripts/iptables`
25
-
26
-	2. Add allow information over tcp for port 2020 in the end of the file, save, and close the file.
27
-
28
-	`iptables -A INPUT -p tcp -m tcp --dport 2020 -j ACCEPT`
29
-
30
-	3. Run the following command to allow the required connections without restarting the client.
31
-
32
-	`# iptables -A INPUT -p tcp -m tcp --dport 2020 -j ACCEPT`
33
-
34
-4. Join the client to the domain by running the `domainjoin.sh` script and configuring the domain controller FQDN, domain, and the password for the `administrator` user.
35
-
36
-	`# domainjoin.sh --domain-controller <lightwave-server-FQDN> --domain <your-domain> --password '<administrator-user-password>`
37
-
38
-5. In a browser, go to https://*Lightwave-Server-FQDN* to verify that the client appears under the tenants list for the domain.
39 1
\ No newline at end of file
40 2
deleted file mode 100644
... ...
@@ -1,34 +0,0 @@
1
-# Installing the Lightwave Server and Configuring It as a Domain Controller on a Photon Image
2
-
3
-You can configure Lightwave server as domain controller on a Photon client. You install the Lightwave server first. After the server is installed, you configure a new domain. 
4
-
5
-## Prerequisites
6
-
7
-- Prepare a Photon OS client for the Lightwave server installation.
8
-- Verify that the hostname of the client can be resolved.
9
-- Verify that you have 500 MB free for the Lightwave server installation.
10
-
11
-## Procedure
12
-
13
-1. Log in to your Photon OS client over SSH as an administrator.
14
-2. Install the Lightwave server by running the following command. 
15
-	
16
-	`# tdnf install lightwave -y`
17
-3. Configure the Lightwave server as domain controller by selecting a domain name and password for the `administrator` user.
18
-	
19
-	The minimum required password complexity is 8 characters, one symbol, one upper case letter, and one lower case letter. 
20
-	Optionally, if you want to access the domain controller over IP, configure the ip under the `--ssl-subject-alt-name` parameter.
21
-	`# configure-lightwave-server --domain <your-domain> --password '<administrator-user-password>' --ssl-subject-alt-name <machine-ip-address>`
22
-4. Edit `iptables` rules to allow connections to and from the client.
23
-
24
-	The default Photon OS 2.0 firewall settings block all incoming, outgoing, and forwards so that you must reconfigure them.
25
-	
26
-	`# iptables -P INPUT ACCEPT`
27
-
28
-	`# iptables -P OUTPUT ACCEPT`
29
-
30
-	`# iptables -P FORWARD ACCEPT`
31
-
32
-5. In a browser, go to https://*lightwave-server-FQDN* to verify that you can log in to the newly created domain controller.
33
-	1. On the Cascade Identity Services page, enter the domain that you configured and click **Take me to Lightwave Admin**.
34
-	2. On the Welcome page, enter administrator@your-domain as user name and the password that you set during the domain controller configuration and click **LOGIN**.
35 1
\ No newline at end of file
36 2
deleted file mode 100644
... ...
@@ -1,11 +0,0 @@
1
-# Installing and Using Lightwave on Photon OS #
2
-
3
-Project Lightwave is an open-sourced project that provides enterprise-grade identity and access management services, and can be used to solve key security, governance, and compliance challenges for a variety of use cases within the enterprise. Through integration between Photon OS and Project Lightwave, organizations can enforce security and governance on container workloads, for example, by ensuring only authorized containers are run on authorized hosts, by authorized users. For more details about Lightwave, see the [project Lightwave page on GitHub](https://github.com/vmware/lightwave).
4
-
5
-## Procedure
6
-
7
-1. [Installing the Lightwave Server and Configuring It as a Domain Controller on a Photon Image](Installing-Lightwave-Server-and-Setting-Up-a-Domain.md)
8
-2. [Installing the Lightwave Client on a Photon Image and Joining the Client to a Domain](Installing-Lightwave-Client-and-Joining-a-Domain.md)
9
-3. [Installing the Photon Management Daemon on a Lightwave Client](Installing-the-Photon-Management-Daemon-on-a-Lightwave-Client.md)
10
-4. [Remotely Upgrade a Single Photon OS Machine With Lightwave Client and Photon Management Daemon Installed](Remotely-Upgrade-a-Photon-OS-Machine-With-Lightwave-Client-and-Photon-Management-Daemon-Installed.md)
11
-5. [Remotely Upgrade Multiple Photon OS Machines With Lightwave Client and Photon Management Daemon Installed](Remotely-Upgrade-Photon-OS-Machine-With-Lightwave-Client-and-Photon-Management-Daemon-Installed.md)
12 1
deleted file mode 100644
... ...
@@ -1,35 +0,0 @@
1
-# Installing the Photon Management Daemon on a Lightwave Client 
2
-
3
-After you have installed and configured a domain on Lightwave, and joined a client to the domain, you can install the Photon Management Daemon on that client so that you can remotely manage it.
4
-
5
-## Prerequisites
6
-
7
-- Have an installed Lightwave server with configured domain controller on it.
8
-- Have an installed Lightwave client that is joined to the domain.
9
-- Verify that you have 100 MB free for the daemon installation on the client.
10
-
11
-## Procedure
12
-
13
-1. Log in to a machine with installed Lightwave client over SSH as an administrator.
14
-2. Install the Photon Management Daemon.
15
-	
16
-	`# tdnf install pmd -y`
17
-2. Start the Photon Management Daemon.
18
-	 
19
-	`# systemctl start pmd`
20
-3. Verify that the daemon is in an `active` state.
21
-
22
-	`# systemctl status pmd`
23
-4. (Optional) In a new console, use `curl` to verify that the Photon Management Daemon returns information.
24
-
25
-	Use the root credentials for the local client to authenticate against the daemon service.
26
-	`# curl https://<lightwave-client-FQDN>:2081/v1/info -ku root`
27
-
28
-5. (Optional) Create an administrative user for the Photon Management Daemon for your domain and assign it the domain administrator role.
29
-	1. In a browser, go to https://*lightwave-server-FQDN*.
30
-	1. On the Cascade Identity Services page, enter your domain name and click **Take me to Lightwave Admin**.
31
-	2. On the Welcome page, enter administrative credentials for your domain and click **Login**.
32
-	2. Click **Users & Groups** and click **Add** to create a new user.
33
-	3. On the Add New User page, enter user name, at least one name, password, and click **Save**.
34
-	3. Click the **Groups** tab, select the Administrators group, and click  **Membership**  to add the new user to the group.
35
-	4. On the View Members page, select the user that you created, click **Add Member**, click **Save**, and click **Cancel** to return to the previous page.
36 1
\ No newline at end of file
... ...
@@ -1,6 +1,6 @@
1 1
 # Overview of Photon OS
2 2
 
3
-*Overview of Photon OS* provides an introduction to Photon OS, it versions, and distinguishing features.
3
+*Overview of Photon OS* provides an introduction to Photon OS, its versions, and distinguishing features.
4 4
 
5 5
 **Product version: 3.0**
6 6
 
7 7
deleted file mode 100644
... ...
@@ -1,97 +0,0 @@
1
-# Network PXE Boot
2
-
3
-Photon OS supports the Preboot Execution Environment, or PXE, over a network connection. This document describes how to set up a PXE boot server to install Photon OS.
4
-
5
-# Server Setup
6
-
7
-To set up a PXE server, you will need to have the following:
8
-
9
-* A DHCP server to allow hosts to get an IP address.
10
-* A TFTP server, which is a file transfer protocol similar to FTP with no authentication.
11
-* Optionally, an HTTP server. The HTTP server will serve the RPMs yum repo, or you can use the official Photon OS repo on Bintray. Also, this HTTP server can be used if you want to provide a kickstart config for unattended installation.
12
-
13
-The instructions to set up the servers assume you have an Ubuntu 14.04 machine with a static IP address of `172.16.78.134`.
14
-
15
-## DHCP Setup
16
-* Install the DHCP server:
17
-```
18
-  sudo apt-get install isc-dhcp-server
19
-```
20
-* Edit the Ethernet interface in `/etc/default/isc-dhcp-server` to `INTERFACES="eth0"`
21
-* Edit the DHCP configuration in `/etc/dhcp/dhcpd.conf` to allow machines to boot and get an IP address via DHCP in the range `172.16.78.230 - 172.16.78.250`
22
-```
23
-  subnet 172.16.78.0 netmask 255.255.255.0 {
24
-    range 172.16.78.230 172.16.78.250;
25
-    option subnet-mask 255.255.255.0;
26
-    option routers 172.16.78.134;
27
-    option broadcast-address 172.16.78.255;
28
-    filename "pxelinux.0";
29
-    next-server 172.16.78.134;
30
-  }
31
-
32
-```
33
-* Restart the DHCP server: 
34
-```
35
-  sudo service isc-dhcp-server restart
36
-```
37
-
38
-## TFTP Setup
39
-* Install the TFTP server:
40
-```
41
-  sudo apt-get install tftpd-hpa
42
-```
43
-* Enable the boot service and restart the service:
44
-```
45
-  sudo update-inetd --enable BOOT
46
-  sudo service tftpd-hpa restart
47
-```
48
-
49
-## Optional: HTTP server setup
50
-
51
-This step is only needed if you are planning to serve the ks (kickstart) config file through this server; refer to [Kickstart support](kickstart.md) for details.
52
-* Serving your local yum repo.
53
-You can install apache http web server
54
-```
55
-sudo apt-get install apache2
56
-```
57
-Mount the Photon iso to get the RPMS repo and sample ks config file.
58
-```
59
-mkdir /mnt/photon-iso
60
-sudo mount <photon_iso> /mnt/photon-iso/
61
-```
62
-Copy the RPMS repo.
63
-```
64
-cp -r /mnt/photon-iso/RPMS /var/www/html/
65
-```
66
-To support ks, you can copy the sample config file from the iso and edit it; refer to [Kickstart support](kickstart.md) for details.
67
-```
68
-cp /mnt/photon-iso/isolinux/sample_ks.cfg /var/www/html/my_ks.cfg
69
-```
70
-
71
-## PXE boot files setup
72
-* Mount photon.iso to get Linux and initrd images:
73
-```
74
-mkdir /mnt/photon-iso
75
-sudo mount <photon_iso> /mnt/photon-iso/
76
-```
77
-* Setting the PXE boot files:
78
-```
79
-wget https://www.kernel.org/pub/linux/utils/boot/syslinux/syslinux-6.03.tar.gz
80
-tar -xvf syslinux-6.03.tar.gz
81
-pushd /var/lib/tftpboot
82
-cp -r /mnt/photon-iso/isolinux/* .
83
-cp ~/syslinux-6.03/bios/com32/elflink/ldlinux/ldlinux.c32 .
84
-cp ~/syslinux-6.03/bios/com32/lib/libcom32.c32 .
85
-cp ~/syslinux-6.03/bios/com32/libutil/libutil.c32 .
86
-cp ~/syslinux-6.03/bios/com32/menu/vesamenu.c32 .
87
-cp ~/syslinux-6.03/bios/core/pxelinux.0 .
88
-mkdir pxelinux.cfg
89
-mv isolinux.cfg pxelinux.cfg/default
90
-```
91
-* Update repo param to point to http yum repo; you may pass official photon bintray repo.
92
-```
93
-sed -i "s/append/append repo=http:\/\/172.16.78.134\/RPMS/g" menu.cfg
94
-popd
95
-```
96
-* Optionally, you can add your ks config file; see [Kickstart support](kickstart.md) for details.
97
-
98 1
new file mode 100644
... ...
@@ -0,0 +1,7 @@
0
+# Versions
1
+
2
+Photon OS consists of a minimal version and a full version. 
3
+
4
+The minimal version of Photon OS is lightweight container host runtime environment that is suited to managing and hosting containers. The minimal version contains just enough packaging and functionality to manage and modify containers while remaining a fast runtime environment. The minimal version is ready to work with appliances. 
5
+
6
+The full version of Photon OS includes additional packages to help you customize the system and create containerized applications. For running containers, the full version is excessive. The full version is helps you create, develop, test, and package an application that runs a container. 
0 7
\ No newline at end of file
... ...
@@ -10,7 +10,15 @@ This documentation applies to all 3.0.x releases.
10 10
 
11 11
 ## Intended Audiences
12 12
 
13
-This information is intended for Photon OS administrators and developers.
13
+This information is intended for Photon OS administrators and developers:
14
+
15
+|**Description of Task**|**Relevant Documentation**|
16
+|---|---|
17
+|Understand Photon OS.|[Overview of Photon OS](README.md)|
18
+|Download and Install Photon OS.|[Installation Guide](photon_installation/README.md)|
19
+|Fundamentals of administering Photon OS. Basics of managing packages, controlling services with systemd, setting up networking, and initializing Photon OS. |[Administration Guide](photon_admin/README.md)|
20
+|Use Photon OS.|[User Guide](photon_user/README.md)|
21
+|Solutions for common problems that you might encounter while using Photon OS.|[Troubleshooting Guide](photon_troubleshoot/README.md)|
14 22
 
15 23
 ----------
16 24
 
17 25
deleted file mode 100644
... ...
@@ -1,49 +0,0 @@
1
-# Remotely Upgrade Multiple Photon OS Machines With Lightwave Client and Photon Management Daemon Installed
2
-
3
-After you have a configured the Photon Management Daemon (PMD) on multiple machines, you can remotely upgrade any installed package on these machines.
4
-
5
-Upgrade process uses `copenapi_cli` that is supported from both Lightwave and Photon Management Daemon. You can initiate the upgrade process from any machine that has Photon Management Daemon installed.   
6
-
7
-## Prerequisites
8
-
9
-- Have an installed Lightwave server with configured domain controller on it.
10
-- Have installed Lightwave clients that are joined to the domain.
11
-- Have installed Photon Management Daemon on the clients.
12
-
13
-## Procedure
14
-
15
-1. To initiate remote upgrade, log in to a Photon OS machine over SSH to install the Photon Management Daemon CLI.
16
-
17
-	`# tdnf install pmd-cli` 
18
-2. Edit the `copenapi_cli` spec files so that you can specify the machines you want to upgrade and credentials to be used.
19
-	1. Edit the `.netrc` file to specify machines to be upgraded and credentials for the PMD service.
20
-
21
-		`# vi ~/.netrc`  
22
-	3. In the file, enter the IP addresses for the machines and administrative credentials, save and close the file.
23
-
24
-		`# machine <IP-address> login <pmd-administrative-user> password <pmd-administrative user-password>`
25
-
26
-	1. (Optional) Get the location of the `restapispec.json` file.
27
-
28
-		`# cat ~/.copenapi`
29
-
30
-		This command returns `apispec=/root/restapispec.json` as path for the spec file.
31
- 
32
-	3. Edit the `restapispec.json` file to enter the IP address of the machine to be upgraded.
33
-	
34
-		`# vi /root/restapispec.json`
35
-	4. Change the `host` value to the IP address or the hostname of the machine, leave the port number, and save and close the file.
36
-	
37
-		`"host":"<ip-address>:2081"` 
38
-	
39
-
40
-4. Initiate the upgrade, in this example of the `sed` package and wait for the command to complete.
41
-
42
-	Specify `-k` to force blind trust of certificates and `-n` to use the credentials from the `.netrc` file. 
43
-	`# copenapi_cli pkg update --packages sed -kn`
44
-
45
-5. (Optional) Verify that the package was upgraded successfully.
46
-	1. Log in to the machine that was upgraded over SSH.
47
-	2. List the installed version of the `sed` package.
48
-		
49
-		`# tdnf list installed sed`
50 1
\ No newline at end of file
51 2
deleted file mode 100644
... ...
@@ -1,35 +0,0 @@
1
-# Remotely Upgrade a Single Photon OS Machine With Lightwave Client and Photon Management Daemon Installed 
2
-
3
-After you have a configured the Photon Management Daemon on a machine, you can remotely upgrade any installed package on that machine. You can use the `root` user credentials.
4
-
5
-Upgrade process uses `pmd-cli` that is supported from both Lightwave and Photon Management Daemon. You can initiate the upgrade process from any machine that has Photon Management Daemon CLI installed.
6
-
7
-## Prerequisites
8
-
9
-- Have an installed Lightwave server with configured domain controller on it.
10
-- Have an installed Lightwave client that is joined to the domain.
11
-- Have an installed Photon Management Daemon on the client.
12
-- Have in installed Photon Management Daemon CLI (pmd-cli) on a machine from which you perform the updates.
13
-
14
-## Procedure
15
-
16
-1. To initiate remote upgrade, log in to a machine that has Photon Management Daemon CLI installed over SSH.
17
-2. Identify packages that can be upgraded on the client machine.
18
-	2. List the available updates for the machine.
19
-		
20
-		`# pmd-cli --server-name <machine-IP-address> --user root pkg list updates`
21
-	3. Verify the currently installed version of a package, for example `sed`.
22
-
23
-		`# `# pmd-cli --server-name <machine-IP-address> --user root pkg installed sed`
24
-		The installed version number shows as earlier than the one listed under the available updates.
25
-
26
-
27
-4. Initiate the upgrade, in this example of the `sed` package, enter password, and wait for the command to complete.
28
- 
29
-	`# pmd-cli --server-name <machine-IP-address> --user root pkg update sed`
30
-
31
-5. (Optional) Verify that the client machine package was upgraded successfully.
32
-	1. Log in to the machine that was upgraded over SSH.
33
-	2. List the installed version of the `sed` package.
34
-		
35
-		`# pmd-cli --server-name <machine-IP-address> --user root pkg installed sed`
36 1
\ No newline at end of file
37 2
deleted file mode 100644
... ...
@@ -1,46 +0,0 @@
1
-# Remotely Upgrade Multiple Photon OS Machines With Lightwave Client and Photon Management Daemon Installed
2
-
3
-After you have a configured the Photon Management Daemon (PMD) on multiple machines, you can remotely upgrade any installed package on these machines.
4
-
5
-Upgrade process uses `copenapi_cli` that is supported from both Lightwave and Photon Management Daemon. You can initiate the upgrade process from any machine that has Photon Management Daemon installed.   
6
-
7
-## Prerequisites
8
-
9
-- Have an installed Lightwave server with configured domain controller on it.
10
-- Have installed Lightwave clients that are joined to the domain.
11
-- Have installed Photon Management Daemon on the clients.
12
-
13
-## Procedure
14
-
15
-1. To initiate remote upgrade, log in to a Photon OS machine over SSH to install the Photon Management Daemon CLI.
16
-
17
-	`# tdnf install pmd-cli` 
18
-2. Edit the `copenapi_cli` spec files so that you can specify the machines you want to upgrade and credentials to be used.
19
-	1. Edit the `.netrc` file to specify machines to be upgraded and credentials for the PMD service.
20
-
21
-		`# vi ~/.netrc`  
22
-	2. In the file, enter the IP addresses for the machines and administrative credentials, save and close the file.
23
-
24
-		`# machine <IP-address> login <pmd-administrative-user> password <pmd-administrative user-password>`
25
-
26
-	3. Go to [https://raw.githubusercontent.com/vmware/pmd/master/conf/restapispec.json](https://raw.githubusercontent.com/vmware/pmd/master/conf/restapispec.json "the following link") and save the `restapispec.json` file locally to the `root` folder.
27
-
28
- 
29
-	4. Edit the `restapispec.json` file to enter the IP address of the machine to be upgraded.
30
-	
31
-		`# vi /root/restapispec.json`
32
-	5. Change the `host` value to the IP address or the hostname of the machine, leave the port number, and save and close the file.
33
-	
34
-		`"host":"<ip-address>:2081"` 
35
-	
36
-
37
-4. Initiate the upgrade, in this example of the `sed` package and wait for the command to complete.
38
-
39
-	Specify `-k` to force blind trust of certificates and `-n` to use the credentials from the `.netrc` file. 
40
-	`# copenapi_cli pkg update  --packages sed -kn`
41
-
42
-5. (Optional) Verify that the client machine package was upgraded successfully.
43
-	1. Log in to the machine that was upgraded over SSH.
44
-	2. List the installed version of the `sed` package.
45
-		
46
-		`# tdnf list installed sed`
47 1
\ No newline at end of file
48 2
deleted file mode 100644
... ...
@@ -1,35 +0,0 @@
1
-# Remotely Upgrade a Single Photon OS Machine With Lightwave Client and Photon Management Daemon Installed
2
-
3
-After you have a configured the Photon Management Daemon on a machine, you can remotely upgrade any installed package on that machine. You can use the `root` user credentials.
4
-
5
-Upgrade process uses `pmd-cli` that is supported from both Lightwave and Photon Management Daemon. You can initiate the upgrade process from any machine that has Photon Management Daemon CLI installed.
6
-
7
-## Prerequisites
8
-
9
-- Have an installed Lightwave server with configured domain controller on it.
10
-- Have an installed Lightwave client that is joined to the domain.
11
-- Have an installed Photon Management Daemon on the client.
12
-- Have in installed Photon Management Daemon CLI (pmd-cli) on a machine from which you perform the updates.
13
-
14
-## Procedure
15
-
16
-1. To initiate remote upgrade, log in to a machine that has Photon Management Daemon CLI installed over SSH.
17
-2. Identify packages that can be upgraded on the client machine.
18
-	2. List the available updates for the machine.
19
-		
20
-		`# pmd-cli --server-name <machine-IP-address> --user root pkg list updates`
21
-	3. Verify the currently installed version of a package, for example `sed`.
22
-
23
-		`# `# pmd-cli --server-name <machine-IP-address> --user root pkg installed sed`
24
-		The installed version number shows as earlier than the one listed under the available updates.
25
-
26
-
27
-4. Initiate the upgrade, in this example of the `sed` package, enter password, and wait for the command to complete.
28
- 
29
-	`# pmd-cli --server-name <machine-IP-address> --user root pkg update sed`
30
-
31
-5. (Optional) Verify that the client machine package was upgraded successfully.
32
-	1. Log in to the machine that was upgraded over SSH.
33
-	2. List the installed version of the `sed` package.
34
-		
35
-		`# pmd-cli --server-name <machine-IP-address> --user root pkg installed sed`
36 1
\ No newline at end of file
37 2
deleted file mode 100644
... ...
@@ -1,262 +0,0 @@
1
-# Running Photon OS on Amazon Elastic Cloud Compute
2
-
3
-This guide describes how to get Photon OS up and running on Amazon Web Services Elastic Cloud Compute (EC2), customize Photon with cloud-init, connect to it with SSH, and run a containerized application.
4
- 
5
-## About Photon OS?
6
-Photon OS™ is an open source Linux container host optimized for cloud-native applications, cloud platforms, and VMware infrastructure. Photon OS provides a secure run-time environment for efficiently running containers. For an overview, see [https://vmware.github.io/photon/](#https://vmware.github.io/photon/).
7
-
8
-## Prerequisites
9
-
10
-Using Photon OS within AWS EC2 requires the following resources:
11
-
12
-- **AWS account**. Working with EC2 requires an Amazon account for AWS with valid payment information. Keep in mind that, if you try the examples in this document, you will be charged by Amazon. See [Setting Up with Amazon EC2](#http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/get-set-up-for-amazon-ec2.html).
13
-- **Amazon tools**. The following examples also assume that you have installed and configured the Amazon AWS CLI and the EC2 CLI and AMI tools, including ec2-ami-tools.
14
-
15
-See [Installing the AWS Command Line Interface](#http://docs.aws.amazon.com/cli/latest/userguide/installing.html), [Setting Up the Amazon EC2 Command Line Interface Tools on Linux](#http://docs.aws.amazon.com/AWSEC2/latest/CommandLineReference/set-up-ec2-cli-linux.html), and [Configuring AWS Command-Line Interface](#http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html). Also see [Setting Up the AMI Tools](#http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/set-up-ami-tools.html).
16
-This article uses an Ubuntu 14.04 workstation to generate the keys and certificates that AWS requires.
17
-
18
-## Downloading the Photon OS Image for Amazon
19
-
20
-VMware packages Photon OS as a cloud-ready Amazon machine image (AMI) that you can download for free from [Bintray](https://bintray.com/vmware/photon).
21
-
22
-Download the Photon OS AMI now and save it on your workstation. For instructions, see [Downloading Photon OS](Downloading-Photon-OS.md).
23
-
24
-**Note**: The AMI version of Photon is a virtual appliance with the information and packages that Amazon needs to launch an instance of Photon in the cloud. To build the AMI version, VMware starts with the minimal version of Photon OS and adds the sudo and tar packages to it. 
25
-
26
-## Getting Photon OS Up and Running on EC2
27
-
28
-To run Photon OS on EC2, you must use cloud-init with an EC2 data source. The cloud-init service configures the cloud instance of a Linux image. An _instance_ is a virtual server in the Amazon cloud. 
29
-
30
-The examples in this article show how to generate SSH and RSA keys for your Photon instance, upload the Photon OS `.ami` image to the Amazon cloud, and configure it with cloud-init. In many of the examples, you must replace information with your own paths, account details, or other information from Amazon. 
31
-
32
-### Step 1: Create a Key Pair
33
-
34
-The first step is to generate SSH keys on, for instance, an Ubuntu workstation: 
35
-
36
-	ssh-keygen -f ~/.ssh/mykeypair
37
-
38
-The command generates a public key in the file with a `.pub` extension and a private key in a file with no extension. Keep the private key file and remember the name of your key pair; the name is the file name of the two files without an extension. You'll need the name later to connect to the Photon instance.
39
-
40
-Change the mode bits of the public key pair file to protect its security. In the command, include the path to the file if you need to. 
41
-
42
-	chown 600 mykeypair.pub
43
-
44
-Change the mode bits on your private key pair file so that only you can view it:
45
-
46
-	chmod 400 mykeypair
47
-
48
-To import your public key pair file (but not your private key pair file), connect to the EC2 console at https://console.aws.amazon.com/ec2/ and select the region for the key pair. A key pair works in only one region, and the instance of Photon that will be uploaded later must be in the same region as the key pair. Select `key pairs` under `Network & Security`, and then import the public key pair file that you generated earlier. 
49
-
50
-For more information, see [Importing Your Own Key Pair to Amazon EC2](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html#how-to-generate-your-own-key-and-import-it-to-aws).
51
-
52
-### Step 2: Generate a Certificate
53
-
54
-When you bundle up an image for EC2, Amazon requires an RSA user signing certificate. You create the certificate by using openssl to first generate a private RSA key and then to generate the RSA certificate that references the private RSA key. Amazon uses the pairing of the private key and the user signing certificate for  handshake verification. 
55
-
56
-First, on Ubuntu 14.04 or another workstation that includes openssl, run the following command to generate a private key. If you change the name of the key, keep in mind that you will need to include the name of the key in the next command, which generates the certificate. 
57
-
58
-	openssl genrsa 2048 > myprivatersakey.pem
59
-
60
-Remember where you store your private key locally; you'll need it again later. 
61
-
62
-Second, run the following command to generate the certificate. The command prompts you to provide more information, but because you are generating a user signing certificate, not a server certificate, you can just type `Enter` for each prompt to leave all the fields blank. 
63
-
64
-	openssl req -new -x509 -nodes -sha256 -days 365 -key myprivatersakey.pem -outform PEM -out certificate.pem
65
-
66
-For more information, see the Create a Private Key and the Create the User Signing Certificate sections of [Setting Up the AMI Tools](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/set-up-ami-tools.html#ami-upload-bundle).
67
-
68
-Third, upload to AWS the certificate value from the `certificate.pem` file that you created in the previous command. Go to the Identity and Access Management console at https://console.aws.amazon.com/iam/, navigate to the name of your user, open the `Security Credentials` section, click `Manage Signing Certificates`, and then click `Upload Signing Certificate`. Open `certificate.pem` in a text editor, copy and paste the contents of the file into the `Certificate Body` field, and then click `Upload Signing Certificate`.
69
-
70
-For more information, see the Upload the User Signing Certificate section of [Setting Up the AMI Tools](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/set-up-ami-tools.html#ami-upload-bundle).
71
-
72
-### Step 3: Create a Security Group
73
-
74
-The next prerequisite is to create a security group and set it to allow SSH, HTTP, and HTTPS connections over ports 22, 80, and 443, respectively. Connect to the EC2 command-line interface and run the following commands: 
75
-
76
-	aws ec2 create-security-group --group-name photon-sg --description "My Photon security group"
77
-	{
78
-	    "GroupId": "sg-d027efb4"
79
-	}
80
-	aws ec2 authorize-security-group-ingress --group-name photon-sg --protocol tcp --port 22 --cidr 0.0.0.0/0
81
-
82
-The `GroupId` is returned by EC2. Write it down; you'll need it later.
83
-
84
-By using `0.0.0.0/0` for SSH ingress on Port 22, you are opening the port to all IP addresses--which is not a security best practice but a convenience for the examples in this article. For a production instance or other instances that are anything more than temporary machines, you should authorize only a specific IP address or range of addresses. See Amazon's document on [Authorizing Inbound Traffic for Linux Instances](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/authorizing-access-to-an-instance.html).
85
-
86
-Repeat the command to allow incoming traffic on Port 80 and on Port 443: 
87
-
88
-	aws ec2 authorize-security-group-ingress --group-name photon-sg --protocol tcp --port 80 --cidr 0.0.0.0/0
89
-
90
-	aws ec2 authorize-security-group-ingress --group-name photon-sg --protocol tcp --port 443 --cidr 0.0.0.0/0
91
-
92
-Check your work: 
93
-
94
-	aws ec2 describe-security-groups --group-names photon-sg
95
-
96
-### Step 4: Extract the Tarball 
97
-
98
-Next, make a directory to store the image, and then extract the Photon OS image from its archive by running the following `tar` command. (You might have to change the file name to match the version you have.)    
99
-
100
-	mkdir bundled
101
-	tar -zxvf ./photon-ami.tar.gz
102
-
103
-### Step 5: Bundle the Image
104
-
105
-The next step is to run the `ec2-bundle-image` command to create an instance store-backed Linux AMI from the Photon OS image that you extracted in the previous step. The result of the `ec2-bundle-image` command is a manifest that describes the machine in an XML file. 
106
-
107
-The command uses the certificate path to your PEM-encoded RSA public key certificate file; the path to your PEM-encoded RSA private key file; your EC2 user account ID; the correct architecture for Photon OS; the path to the Photon OS AMI image extracted from its tar file; and the `bundled` directory from the previous step. 
108
-
109
-You must replace the values of the certificate path, the private key, and the user account with your own values.
110
-
111
-	$ ec2-bundle-image --cert certificate.pem --privatekey myprivatersakey.pem --user <EC2 account id>  --arch x86_64 --image photon-ami.raw --destination ./bundled/
112
-
113
-### Step 6: Put the Bundle in a Bucket
114
-
115
-Next, make an S3 bucket, replacing `<bucket-name>` with the name that you want. The command creates the bucket in the region specified in your Amazon configuration file, which should be the same region in which you are using your key pair file: 
116
-
117
-	$ aws s3 mb s3://<bucket-name>
118
-
119
-Now upload the bundle to the Amazon S3 cloud. The following command includes the path to the XML file containing the manifest for the Photon OS machine created during the previous step, though you might have to change the file name to match the version you have. The manifest file is typically located in the same directory as the bundle. 
120
-
121
-The command also includes the name of the Amazon S3 bucket in which the bundle is to be stored; your AWS access key ID; and your AWS secret access key.
122
-
123
-	$ ec2-upload-bundle --manifest ./bundled/photon-ami.manifest.xml --bucket <bucket-name> --access-key <Account Access Key> --secret-key <Account Secret key>
124
-
125
-### Step 7: Register the Image
126
-
127
-The final step in creating an AMI before you can launch it is to register it. The following command includes a name for the AMI, its architecture, and its virtualization type. The virtualization type for Photon OS is `hvm`.
128
-
129
-	$ ec2-register <bucket-name>/photon-ami.manifest.xml --name photon-ami --architecture x86_64 --virtualization-type hvm
130
-
131
-Once registered, you can launch as many new instances as you want.
132
-
133
-### Step 8: Run an Instance of the Image with Cloud-Init
134
-
135
-Now things get a little tricky. In the following command, the `user-data-file` option instructs cloud-init to import the cloud-config data in `user-data.txt`.  
136
-
137
-The command also includes the ID of the AMI, which you can obtain by running `ec2-describe-images`; the instance type of `m3.medium`, which is a general purpose instance type; and the name of key pair, which should be replaced with your own--otherwise, you won't be able to connect to the instance. 
138
-
139
-Before you run the command, change directories to the directory containing the `mykeypair` file and add the path to the `user-data.txt`. 
140
-
141
-	$ ec2-run-instances <ami-ID> --instance-type m3.medium -g photon-sg --key mykeypair --user-data-file user-data.txt
142
-
143
-Here are the contents of the `user-data.txt` file that cloud-init applies to the machine the first time it boots up in the cloud.  
144
-
145
-	#cloud-config
146
-	hostname: photon-on-01
147
-	groups:
148
-	- cloud-admins
149
-	- cloud-users
150
-	users:
151
-	- default
152
-	- name: photonadmin
153
-	   gecos: photon test admin user
154
-	   primary-group: cloud-admins
155
-	   groups: cloud-users
156
-	   lock-passwd: false
157
-	   passwd: vmware
158
-	- name: photonuser
159
-	   gecos: photon test user
160
-	   primary-group: cloud-users
161
-	   groups: users
162
-	   passwd: vmware
163
-	packages:
164
-	- vim
165
-
166
-### Step 9: Get the IP Address of Your Image
167
-
168
-Now run the following command to check on the state of the instance that you launched: 
169
-
170
-	$ ec2-describe-instances
171
-
172
-Finally, you can obtain the external IP address of the instance by running the following query: 
173
-
174
-	$ aws ec2 describe-instances --instance-ids <instance-id> --query 'Reservations[*].Instances[*].PublicIpAddress' --output=text
175
-
176
-If need be, check the cloud-init output log file on EC2 at `/var/log/cloud-init-output.log` to see how EC2 handled the settings in the cloud-init data file. 
177
-
178
-For more information on using cloud-init user data on EC2, see [Running Commands on Your Linux Instance at Launch](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html).
179
-
180
-## Deploy a Containerized Application in Photon OS
181
-
182
-This section shows you how to connect to the Photon instance by using SSH and to launch a web server by running it in Docker.
183
-
184
-### Step 1: Connect with SSH
185
-
186
-Connect to the instance over SSH by specifying the private key (.pem) file and the user name for the Photon machine, which is `root`:
187
-
188
-	ssh -i ~/.ssh/mykeypair root@<public-ip-address-of-instance>
189
-
190
-For complete instructions, see [Connecting to Your Linux Instance Using SSH](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AccessingInstancesLinux.html). 
191
-
192
-### Step 2: Run Docker
193
-
194
-On the minimal version of Photon OS, the docker engine is enabled and running by default, which you can see by running the following command: 
195
-
196
-	systemctl status docker
197
-
198
-### Step 3: Start the Web Server
199
-
200
-**Note**: Please make sure that the proper security policies have been enabled on the Amazon AWS side to enable traffic to port 80 on the VM. 
201
-
202
-Since Docker is running, you can run an application in a container--for example, the Nginx Web Server. This example uses the popular open source web server Nginx. The Nginx application has a customized VMware package that the Docker engine can download directly from the Docker Hub.
203
-
204
-To pull Nginx from its Docker Hub and start it, run the following command: 
205
-
206
-	docker run -p 80:80 vmwarecna/nginx
207
-
208
-The Nginx web server should be bound to the public DNS value for  the instance of Photon OS--that is, the same address with which you connected over SSH. 
209
-
210
-### Step 4: Test the Web Server
211
-
212
-On your local workstation, open a web browser and go to the the public address of the Photon OS instance running Docker. The following screen should appear, showing that the web server is active:
213
-
214
-![Nginx](images/Nginx.jpg)
215
-
216
-When you're done, halt the Docker container by typing `Ctrl+c` in the SSH console where you are connected to EC2. 
217
-
218
-You can now run other containerized applications from the Docker Hub or your own containerized application on Photon OS in the Amazon cloud. 
219
-
220
-## Launching the Web Server with Cloud-Init
221
-
222
-To eliminate the manual effort of running Docker, you can add `docker run` and its arguments to the cloud-init user data file by using `runcmd`: 
223
-
224
-	#cloud-config
225
-	hostname: photon-on-01
226
-	groups:
227
-	- cloud-admins
228
-	- cloud-users
229
-	users:
230
-	- default
231
-	- name: photonadmin
232
-	   gecos: photon test admin user
233
-	   primary-group: cloud-admins
234
-	   groups: cloud-users
235
-	   lock-passwd: false
236
-	   passwd: vmware
237
-	- name: photonuser
238
-	   gecos: photon test user
239
-	   primary-group: cloud-users
240
-	   groups: users
241
-	   passwd: vmware
242
-	packages:
243
-	- vim
244
-	runcmd:
245
-	- docker run -p 80:80 vmwarecna/nginx
246
-
247
-To try this addition, you'll have to run another instance with this new cloud-init data source and then get the instance's public IP address to check that the Nginx web server is running. 
248
-
249
-## Terminating the AMI Instance
250
-
251
-Because Amazon charges you while the instance is running, make sure to shut it down when you're done.  
252
-
253
-First, get the ID of the AMI so you can terminate it: 
254
-
255
-	$ ec2-describe-instances
256
-
257
-Finally, terminate the Photon OS instance by running the following command, replacing the placeholder with the ID that the `ec2-describe-images` command returned. If you ran a second instance of Photon OS with the cloud-init file that runs docker, terminate that instance, too. 
258
-
259
-	$ ec2-terminate-instances <instance-id>
260
-
261
-
262
-
263 1
deleted file mode 100644
... ...
@@ -1,117 +0,0 @@
1
-# Running Photon OS on Google Compute Engine
2
-
3
-This guide describes how to get started using Photon OS as a virtual machine on Google Compute Engine (GCE). Once Photon OS is installed as an image on GCE, this document shows how to deploy a containerized application in Docker with a single command.
4
-
5
-- [About Photon OS](#about-photon-os)
6
-- [Prerequisites for Photon OS on GCE](#prerequisites-for-photon-os-on-gce)
7
-- [Downloading Photon OS](#downloading-photon-os)
8
-- [Installing Photon OS on Google Compute Engine](#installing-photon-os-on-google-compute-engine)
9
-- [Deploying a Containerized Application in Photon OS](#deploying-a-containerized-application-in-photon-os)
10
-
11
-## About Photon OS
12
-
13
-Photon OS™ is an open source Linux container host optimized for cloud-native applications, cloud platforms, and VMware infrastructure. Photon OS provides a secure run-time environment for efficiently running containers. For an overview, see  [https://vmware.github.io/photon/](https://vmware.github.io/photon/).
14
-
15
-## Prerequisites for Photon OS on GCE
16
-
17
-Using Photon OS on Google Compute Engine requires the following resources:
18
-
19
-* An account on Google Compute Engine
20
-* The Google Cloud SDK
21
-* The Photon OS image for GCE
22
-
23
-Keep in mind that, if you try the examples in this document, Google will charge your account for the cloud services that you use. The GCE-ready version of Photon OS, however, comes for free.
24
-
25
-## Downloading Photon OS
26
-
27
-VMware recommends that administrators use the Photon OS image for Google Compute Engine (GCE) to create Photon OS instances on GCE. Although earlier releases of Photon OS required heavy modification of the Photon instance to make the image compatible with GCE, Photon OS 1.0 comes with pre-modified images for popular cloud providers, including GCE.
28
-
29
-You can download the Photon OS image for GCE from the following URL:
30
-
31
-[https://bintray.com/vmware/photon](https://bintray.com/vmware/photon)
32
-
33
-For instructions, see [Downloading Photon OS](Downloading-Photon-OS.md).
34
-
35
-## Installing Photon OS on Google Compute Engine
36
-
37
-After you download the Photon OS image for GCE, log into GCE and complete the following steps.
38
-
39
-### Step 1: Create a New Bucket
40
-
41
-Create a new bucket to store your Photon OS image for GCE.
42
-
43
-![gce1](images/gce1.jpg)
44
-
45
-### Step 2: Upload the Photon OS Image
46
-
47
-Once you’ve created the bucket, you’re ready to upload the Photon OS image. While viewing the bucket that you’ve created, click the `Upload files` button, navigate to your Photon OS image and click the `Choose` button. 
48
-
49
-As the image below shows, when the upload finishes, you should see your Photon OS compressed image in the file list for the bucket that you created.
50
-
51
-![gce2](images/gce2.jpg)
52
-
53
-### Step 3: Create a New Image
54
-
55
-Next, you need to create a new image. Click on `Images` in the `Compute` category in the left panel; then, click on the `New Image` button. 
56
-
57
-Enter a name for the image in the `Name` field and change the `Source` to `Cloud Storage file` using the pull-down menu. Then, in the `Cloud Storage file` field, enter the bucket name and filename as the path to the Photon OS image for GCE. In this example, where the bucket was named `photon_storage,` the path is as follows:
58
- 
59
-	photon_storage/photon-gce-2.0-tar.gz
60
-
61
-*Note: The new image form will autopopulate the `gs://` file path prefix.*
62
-
63
-After you’re finished completing the name and Cloud Storage object path, click the `Create` button to create your image. You should be returned to your Images catalog and your Photon OS image should be at the top of the list. 
64
-
65
-### Step 4: Create a New Instance
66
-
67
-To create an instance, check the box next to the Photon OS image and click the `Create Instance` button. 
68
-
69
-On the `Create a new instance` form, provide a name for this instance, confirm the zone into which this instance is to be deployed and, before clicking `Create,` place a check in the boxes for `Allow HTTP traffic` and `Allow HTTPS traffic.` 
70
-
71
-Outside of this demo, your application may or may not require these firewall rules. Please choose accordingly outside of this demo. However, since we will demonstrate a running web server container, we want these ports to be open for our instance. 
72
-
73
-![gce4](images/gce4.jpg)
74
-
75
-When the instance is created you will be returned to your list of VM instances. If you click on the instance, the status page for the instance will allow you to SSH into your Photon OS environment using the SSH button at the top of the panel. 
76
-
77
-At this point, your instance is running and you are ready to start the Docker engine and run a container workload.
78
-
79
-## Deploying a Containerized Application in Photon OS
80
-
81
-Now that you have your container runtime environment up and running, you can easily deploy a containerized application. For this example, you will deploy the popular open source Web Server Nginx. The Nginx application has a customized VMware package that is published as a dockerfile and can be downloaded directly through the Docker module from the Docker Hub.
82
-
83
-### Step 1: Run Docker
84
-
85
-To run Docker from the command prompt, enter the command below to initialize the Docker engine:
86
-
87
-    systemctl start docker
88
-
89
-To ensure Docker daemon service runs on every subsequent VM reboot, enter:
90
- 
91
-    systemctl enable docker
92
-
93
-### Step 2: Run the Nginx Web Server
94
-
95
-Now that the Docker daemon service is running, it is a simple task to pull and then start the Nginx Web Server container from Docker Hub.  To do this, type the following command:
96
- 
97
-    docker run -d -p 80:80 vmwarecna/nginx
98
-
99
-This command pulls the Nginx Web Server files and the dependent containers to ensure this containerized application can run.  You will see a screenshot similar to the one below, as the container and dependencies are downloaded and the container is prepared to run:
100
-
101
-![gce5](images/gce5.jpg)
102
-
103
-Once the `docker run` process is completed, you will be returned to the command prompt.  You now have a fully active website up and running through typing just a single command within Photon OS using containers.
104
-
105
-### Step 3: Test the Web Server
106
-
107
-**Note** : Please make sure that the proper security policies have been enabled on the Google GCE side to enable traffic to port 80 on the VM.
108
-
109
-To test that your web server is active, we need to get the IP address of the Photon OS virtual machine. To get the IP address, enter the following command:
110
-
111
-This command displays a list of network adapters connected to the virtual machine. Typically, the web server daemon will be bound to `eth0;` record the IP address associated with `eth0.` Alternatively, visit the status page of your Photon OS instance in GCE where the IP address is listed under `External IP.`
112
-
113
-Start a browser on your host machine and enter the IP address of your Photon OS virtual machine. The following screen should appear, showing that your web server is active:
114
-
115
-![gce6](images/gce6.jpg)
116
-
117
-You can now run any other containerized application from Docker Hub or your own containerized application within Photon OS.
118 1
deleted file mode 100644
... ...
@@ -1,247 +0,0 @@
1
-# Running Photon OS on Microsoft Azure
2
-
3
-Photon OS can serve as a run-time environment for Linux containers on Microsoft Azure. This topic describes how to set up and run the cloud-ready version of Photon OS as an instance of a virtual machine in the Azure cloud. Once running, Docker can run a containerized application in the Photon OS instance.
4
-
5
-**Note:** These instructions apply to Photon OS 2.0. There is no Photon OS 1.0 distribution image for Microsoft Azure.
6
-
7
-- [About Photon OS](#about-photon-os)
8
-- [Prerequisites](#prerequisites)
9
-- [Downloading and Extracting the Photon OS VHD File](#downloading-and-extracting-the-photon-os-vhd-file)
10
-- [Setting Up Azure Storage and Uploading the VHD](#setting-up-azure-storage-and-uploading-the-vhd)
11
-- [Deploying a Containerized Application in Photon OS](#deploying-a-containerized-application-in-photon-os)
12
-
13
-# About Photon OS
14
-
15
-Photon OS™ is an open source Linux container host optimized for cloud-native applications, cloud platforms, and VMware infrastructure. Photon OS provides a secure run-time environment for efficiently running containers. For an overview, see  [https://vmware.github.io/photon/](https://vmware.github.io/photon/).
16
-
17
-# Prerequisites
18
-
19
-- Microsoft Azure account ([sign up](https://azure.microsoft.com) if you don&#39;t already have one)
20
-- Azure CLI 2.0 (install the latest version) - see  [Install Azure CLI 2.0](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest) and  [Get started with Azure CLI 2.0](https://docs.microsoft.com/en-us/cli/azure/get-started-with-azure-cli?view=azure-cli-latest).
21
-- Pair of SSH public / private keys
22
-
23
-# Downloading and Extracting the Photon OS VHD File
24
-
25
-VMware packages Photon OS as a cloud-ready virtual hard disk (VHD file) that you can download for free from  [Bintray](https://bintray.com/vmware/photon). This VHD file is a virtual appliance with the information and packages that Azure needs to launch an instance of Photon in the cloud. After you have downloaded the distribution archive, extract the VHD file from it. You will later need to upload this VHD file to Azure, where it will be stored in an Azure storage account. For download instructions, see [Downloading Photon OS](Downloading-Photon-OS.md).
26
-
27
-# Setting Up Azure Storage and Uploading the VHD
28
-
29
-You can use either the Azure Portal or the Azure CLI to set up your Azure storage space, upload the Photon OS VHD file, and create the Photon OS VM.
30
-
31
-## Setting Up Using the Azure Portal
32
-
33
-You can use the Azure portal to set up Photon OS 2.0 in the Azure cloud. The following instructions are brief. Refer to the Azure documentation for details.
34
-
35
-1. Log in to the Azure portal at  [http://portal.azure.com](http://portal.azure.com/).
36
-2. Create a resource group. In the toolbar, choose Resource Groups, click **+Add** , fill in the resource group fields, and choose **Create**.
37
-3. Create a storage account. In the toolbar, choose Storage Accounts, click **+Add** , fill in the storage account fields (and the resource group you just created), and choose **Create**.
38
-4. Select the storage account.
39
-5. Scroll down the storage account control bar, click Containers (below BLOB SERVICE), click **+Container** , fill in the container fields, and choose **Create**.
40
-6. Select the container you just created.
41
-7. Click **Upload** and upload the Photon OS VHD image file to this container.
42
-8. Once the VHD file is uploaded, refer to the Azure documentation for instructions on how to create and manage your Photon OS VM.
43
-
44
-## Setting Up Using the Azure CLI
45
-
46
-You can use the Azure CLI 2.0 to set up Photon OS. You must first  [Install Azure CLI 2.0](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest).
47
-
48
-**Note:**  Except where overridden with parameter values, these commands create objects with default settings.
49
-
50
-### Step 1: Create a Resource Group
51
-
52
-From the Azure CLI, create a resource group.
53
-````
54
-az group create \
55
- --name &lt;your_resource_group&gt; \
56
- --location westus
57
-````
58
-
59
-### Step 2: Create a Storage Account
60
-
61
-Create a storage account associated with this resource group.
62
-````
63
-az storage account create \
64
-    --resource-group &lt;your_resource_group&gt; \
65
-    --location westus \
66
-    --name &lt;your_account_name&gt; \
67
-    --kind Storage \
68
-    --sku Standard_LRS
69
-````
70
-### Step 3: List the Keys for the Storage Account
71
-
72
-Retrieve the keys associated with your newly created storage account.
73
-````
74
-az storage account keys list \
75
-    --resource-group &lt;your_resource_group&gt; \
76
-    --account-name &lt;your_account_name&gt;
77
-````
78
-### Step 4: Create the Storage Container
79
-
80
-Create a storage container associated with your newly created storage account.
81
-
82
-**Note:** The sample create.sh script, described below, does this for you programmatically.
83
-````
84
-az storage container create \
85
-    --account-name &lt;your_account_name&gt; \
86
-    --name &lt;your_container_name&gt;
87
-````
88
-### Step 5: Verify Your Setup in the Azure Portal
89
-
90
-1. Log into the Azure portal using your account credentials.
91
-2. From the left toolbar, click **Storage Accounts**. You should see your storage accounts.
92
-3. Select the storage account.
93
-4. Scroll down the storage account control bar and click **Containers** (below BLOB SERVICE). You should see the container you created.
94
-
95
-### Step 6: Upload the Photon OS Distribution to Your Storage Container
96
-
97
-The Photon OS distribution for Azure is 16GB. You can download it locally or to a mounted, shared location.
98
-````
99
-az storage blob upload \
100
-    --account-name &lt;your_account_name&gt; \
101
-    --account-key &lt;your_account_key&gt; \
102
-    --container-name &lt;your_container_name&gt; \
103
-    --type page \
104
-    --file &lt;vhd_path&gt; \
105
-    --name &lt;vm_name&gt;.vhd
106
-````
107
-### Example Setup Script
108
-
109
-You can use the following script (create.sh) to upload your VHD file programmatically and create the VM. Before you run it, specify the following settings:
110
-
111
-- resource_group name
112
-- account_name
113
-- account_key (public or private)
114
-- container_name
115
-- public_key_file
116
-- vhd_path and and vm_name of the Photon OS VHD distribution file
117
-
118
-This script returns the complete IP address of the newly created VM.
119
-````
120
-#!/bin/bash
121
-vhd_path=$1
122
-vm_name=$2
123
-export PATH=$PATH:/root/azure_new/bin/az
124
-echo PATH=$PATH
125
-resource_group=&quot;&quot;
126
-account_name=&quot;&quot;
127
-account_key=&quot;&quot;
128
-container_name=&quot;mydisks&quot;
129
-url=&quot;https://${account_name}.blob.core.windows.net/${container_name}/${vm_name}.vhd&quot;
130
-public_key_file=&quot;/root/azure_new/jenkins.pub&quot;
131
-echo &quot;########################&quot;
132
-echo &quot;#   Create container   #&quot;
133
-echo &quot;########################&quot;
134
-/root/azure_new/bin/az storage container create --account-name ${account_name} --name ${container_name}
135
-echo &quot;##################&quot;
136
-echo &quot;#   Upload vhd   #&quot;
137
-echo &quot;##################&quot;
138
-/root/azure_new/bin/az storage blob upload --account-name ${account_name} \
139
-    --account-key ${account_key} \
140
-    --container-name ${container_name} \
141
-    --type page \
142
-    --file ${vhd_path} \
143
-    --name ${vm_name}.vhd
144
-echo &quot;##################&quot;
145
-echo &quot;#   Create vm    #&quot;
146
-echo &quot;##################&quot;
147
-echo &quot;az vm create --resource-group ${resource_group} --location westus --name ${vm_name} --storage-account ${account_name} --os-type linux --admin-username michellew --ssh-key-value ${public_key_file} --image ${url} --use-unmanaged-disk ... ...&quot;
148
-/root/azure_new/bin/az vm create --resource-group ${resource_group} --location westus --name ${vm_name} --storage-account ${account_name} --os-type linux --admin-username michellew --ssh-key-value ${public_key_file} --image ${url} --use-unmanaged-disk
149
-````
150
-### Removing Photon OS from Azure
151
-
152
-You can use the following delete.sh script to programmatically (and silently) remove the VM instance, VHD file, and container.
153
-
154
-**Note:**  Consider deleting idle VMs so that you are not charged when not in use.
155
-
156
-Before you run it, specify the following settings:
157
-
158
-- resource_group name (from step 1, above)
159
-- account_name (from step 2, above)
160
-- account_key (public or private) (from step 3, above)
161
-- container_name (from step 4, above)
162
-- public_key_file
163
-- vm_name of the Photon OS VHD distribution file
164
-
165
-**delete.sh**
166
-
167
-````
168
-#!/bin/bash
169
-vm_name=$1
170
-resource_group=&quot;&quot;
171
-account_name=&quot;&quot;
172
-account_key=&quot;&quot;
173
-container_name=&quot;mydisks&quot;
174
-url=&quot;https://${account_name}.blob.core.windows.net/${container_name}/${vm_name}.vhd&quot;
175
-public_key_file=&quot;/root/azure_new/jenkins.pub&quot;
176
-exit_code=0
177
-echo &quot;##################&quot;
178
-echo &quot;#   Delete vm    #&quot;
179
-echo &quot;##################&quot;
180
-echo &quot;az vm list  --resource-group ${resource_group} ... ...&quot;
181
-/root/azure_new/bin/az vm list  --resource-group ${resource_group}
182
-echo &quot;az vm delete --resource-group ${resource_group} --name ${vm_name} --yes ... ...&quot;
183
-/root/azure_new/bin/az vm delete --resource-group ${resource_group} --name ${vm_name} --yes
184
-if [$? -ne 0];then
185
-   exit_code=1
186
-fi
187
-echo &quot;az vm list  --resource-group ${resource_group} ... ...&quot;
188
-/root/azure_new/bin/az vm list  --resource-group ${resource_group}
189
-echo &quot;##############$####&quot;
190
-echo &quot;#   Delete vhd    #&quot;
191
-echo &quot;###############$###&quot;
192
-echo &quot;az storage blob list --account-name ${account_name} --container-name ${container_name} ... ...&quot;
193
-/root/azure_new/bin/az storage blob list --account-name ${account_name} --container-name ${container_name}
194
-echo &quot;az storage blob delete --account-name ${account_name} --container-name ${container_name} --name ${vm_name}.vhd ... ...&quot;
195
-/root/azure_new/bin/az storage blob delete --account-name ${account_name} --container-name ${container_name} --name ${vm_name}.vhd
196
-if [$? -ne 0];then
197
-   exit_code=1
198
-fi
199
-echo &quot;az storage blob list --account-name ${account_name} --container-name ${container_name} ... ...&quot;
200
-/root/azure_new/bin/az storage blob list --account-name ${account_name} --container-name ${container_name}
201
-echo &quot;########################&quot;
202
-echo &quot;#   Delete container   #&quot;
203
-echo &quot;########################&quot;
204
-/root/azure_new/bin/az storage container delete --account-name ${account_name} --name ${container_name}
205
-/root/azure_new/bin/az storage container delete --account-name ${account_name} --name vhds
206
-exit ${exit_code}
207
-````
208
-
209
-## Deploying a Containerized Application in Photon OS
210
-
211
-Now that you have your container runtime environment up and running, you can easily deploy a containerized application. For this example, you will deploy the popular open source Web Server Nginx. The Nginx application has a customized VMware package that is published as a dockerfile and can be downloaded, directly, through the Docker module from the Docker Hub.
212
-
213
-### Step 1: Run Docker
214
-
215
-To run Docker from the command prompt, enter the following command, which initializes the docker engine:
216
-````
217
-systemctl start docker
218
-````
219
-To ensure Docker daemon service runs on every subsequent VM reboot, enter the following command:
220
-````
221
-systemctl enable docker
222
-````
223
-### Step 2: Run the Nginx Web Server
224
-
225
-Now the Docker daemon service is running, it is a simple task to &quot;pull&quot; and start the Nginx Web Server container from Docker Hub. To do this, type the following command:
226
-````
227
-docker run -d -p 80:80 vmwarecna/nginx
228
-````
229
-
230
-This pulls the Nginx Web Server files and appropriate dependent container filesystem layers required for this containerized application to run.
231
-
232
-![Azure docker run](images/azure-docker-run.png)
233
-
234
-After the "docker run" process completes, you return to the command prompt. You now have a fully active website up and running in a container.
235
-
236
-### Step 3: Test the Web Server
237
-
238
-**Note** : Please make sure that the proper security policies have been enabled on the Microsoft Azure side to enable traffic to port 80 on the VM.
239
-
240
-To test that your Web Server is active:
241
-
242
-1. Run the ifconfig command to get the IP address of the Photon OS Virtual Machine.
243
-The output displays a list of adapters that are connected to the virtual machine. Typically, the web server daemon will be bound on "eth0."
244
-2. Start a browser on your host machine and enter the IP address of your Photon OS Virtual Machine.
245
-3. You should see a screen confirming that the nginx web server is successfully installed and working.
246
-
247
-You can now run any other containerized application from Docker Hub or your own containerized application within Photon OS.
248 1
deleted file mode 100644
... ...
@@ -1,359 +0,0 @@
1
-# Running Photon OS on Workstation 
2
-
3
-This guide describes how to get started using Photon OS as a virtual machine within VMware Workstation. It provides instructions for downloading Photon OS (as an OVA or ISO file), describes the various installation options, and walks through the steps of installing the Photon OS distribution on Workstation. Once Photon OS is installed, this document shows how to deploy a containerized application in Docker with a single command.
4
-
5
-- [About Photon OS](#about-photon-os)
6
-- [Requirements](#requirements)
7
-- [Deciding Whether to Use OVA or ISO](#deciding-whether-to-use-ova-or-iso)
8
-- [Downloading Photon OS](#downloading-photon-os)
9
-- [Importing the OVA for Photon OS 2.0](#importing-the-ova-for-photon-os-20)
10
-- [Installing the ISO Image for Photon OS 2.0](#installing-the-iso-image-for-photon-os-20)
11
-- [Deploying a Containerized Application in Photon OS](#deploying-a-containerized-application-in-photon-os)
12
-- [Installing Photon OS 1.0](#installing-photon-os-10)
13
-
14
-**Note**: If you want to upgrade an existing Photon 1.0 VM, refer to the instructions in [Upgrading to Photon OS 2.0](Upgrading-to-Photon-OS-2.0.md). 
15
-
16
-# About Photon OS
17
-
18
-Photon OS™ is an open source Linux container host optimized for cloud-native applications, cloud platforms, and VMware infrastructure. Photon OS provides a secure run-time environment for efficiently running containers. For an overview, see  [https://vmware.github.io/photon/](https://vmware.github.io/photon/).
19
-
20
-# Requirements
21
-
22
-Using Photon OS within VMware Workstation requires the following resources:
23
-
24
-| **Resource** | **Description** |
25
-| --- | --- |
26
-| VMware Workstation | VMware Workstation must be installed (Workstation 10 or higher). The latest version is recommended. |
27
-| Memory | 2GB of free RAM (recommended) |
28
-| Storage | **Minimal Photon install** : 512MB of free space (minimum); **Full Photon install** : 4GB of free space (minimum); 8GB is recommended |
29
-| Distribution File | Photon OS ISO or OVA file downloaded from bintray ([https://bintray.com/vmware/photon/](https://bintray.com/vmware/photon/)).
30
-
31
-Resource requirements and recommendations vary depending on several factors, including the host environment (for example, VMware Workstation and VMware vSphere), the distribution file used (ISO or OVA), and the selected installation settings (for example, full or basic installation).
32
-
33
-**Note:**  The setup instructions in this guide use VMware Workstation Professional version 12.5.7.
34
-
35
-![Workstation version](images/ws_version.png)
36
-
37
-# Deciding Whether to Use OVA or ISO
38
-
39
-The first step is decide whether to use the the OVA or ISO distribution to set up Photon OS.
40
-
41
-- **OVA import** : Because of the nature of an OVA, you're getting a pre-installed version of Photon OS. For Workstation, choose the OVA with Hardware Version 11 (_not_ 13). The OVA benefits from a simple import process and some kernel tuning for VMware environments. However, because it's a pre-installed version, the set of packages that are installed are predetermined. Any additional packages that you need can be installed using tdnf.
42
-- **ISO install** : The ISO, on the other hand, allows for a more complete installation or automated installation via kickstart.
43
-
44
-If you're just looking for the fastest way to get up and running, start with the OVA.
45
-
46
-# Downloading Photon OS
47
-
48
-Once you've decided which way to install, you'll need to download the correct binaries. Go to the following Bintray URL and download the latest release of Photon OS:
49
-
50
-[https://bintray.com/vmware/photon/](https://bintray.com/vmware/photon/)
51
-
52
-For instructions, see [Downloading Photon OS](Downloading-Photon-OS.md).
53
-
54
-# Importing the OVA for Photon OS 2.0
55
-
56
-Using the OVA is the easiest way to create a Photon OS VM on VMware Workstation.
57
-
58
-## Step 1: Start the Import Process
59
-
60
-After you've downloaded the OVA file (OVA with Hardware Version 11), do one of the following:
61
-
62
-- Double-click it to start the import process, or
63
-- Start VMware Workstation and, from the File menu, choose **Open**.
64
-
65
-![OVA file](images/ws-ova-import.png)
66
-
67
-## Step 2: Specify the Name and Storage Location
68
-
69
-Change the name and storage location, if you want.
70
-
71
-![Name and Storage Location](images/ws-ova-path.png)
72
-
73
-Choose **Import**.
74
-
75
-![License](images/ws-ova-license.png)
76
-
77
-Review the License Agreement and choose **Accept**.
78
-
79
-## Step 3: Configure VM Settings
80
-
81
-Once the OVA is imported, Workstation displays a summary of the settings for your Photon OS VM.
82
-
83
-![Settings](images/ws-ova-settings.png)
84
-
85
-Choose **Edit virtual machine settings**. Workstation displays the Virtual Machine settings. You can either accept the defaults or change settings as needed.
86
-
87
-![OVA settings](images/ws-ova-settings-edit.png)
88
-
89
-Select the Options tab.
90
-
91
-![Options](images/ws-ova-settings-options.png)
92
-
93
-Under Guest operating system, select **Linux**.
94
-
95
-For Version, click the list and select **VMWare Photon 64-bit**.
96
-
97
-![Version](images/ws-ova-os.png)
98
-
99
-**Note:**  If you want to configure a secure boot for the Photon OS VM, select **Advanced**  and select (check) **Boot with EFI instead of BIOS**. The EFI boot ensures that the ISO content is signed by VMware and that the entire stack is secure.
100
-
101
-![EFI boot](images/ws-ova-settings-efi.png)
102
-
103
-Choose **OK**.
104
-
105
-## Step 4: Power on the VM
106
-
107
-From the tab, choose  **Power on this virtual machine**.
108
-
109
-![OVA splash](images/ws-ova-splash.png)
110
-
111
-After the splash screen, Workstation will prompt you to log in.
112
-
113
-## Step 5: Update Login Credentials
114
-
115
-**Note** : Because of limitations within OVA support on Workstation, it was necessary to specify a default password for the OVA option. However, all Photon OS instances that are created by importing the OVA will require an immediate password change upon login. The default account credentials are:
116
-
117
-| **Setting** | **Value** |
118
-| --- | --- |
119
-| Username | ``root`` |
120
-| Password | ``changeme`` |
121
-
122
-After you provide these credentials, Workstation prompts you to create a new password and type it a second time to verify it. For security, Photon OS forbids common dictionary words for the root password. Once logged in, you will see the shell prompt.
123
-
124
-![OVA password](images/ws-ova-password.png)
125
-
126
-Once complete, proceed to [Deploying a Containerized Application in Photon OS](#deploying-a-containerized-application-in-photon-os).
127
-
128
-# Installing the ISO Image for Photon OS 2.0
129
-
130
-After you have downloaded the Photon OS ISO image into a folder of your choice, open VMware Workstation.
131
-
132
-## Step 1: Start the Installation Process
133
-
134
-From the File menu, choose **New Virtual Machine**  to create a new virtual machine.
135
-
136
-![New virtural machine](images/ws-iso-new.png)
137
-
138
-Select **Typical** or **Custom**, and then choose **Next**. These instructions refer to a Typical installation.
139
-
140
-![Typical installation](images/ws-iso-typical.png)
141
-
142
-## Step 2: Select the ISO Image
143
-
144
-Select **Installer disc image file (iso)**, choose **Browse** and select the Photon OS ISO file.
145
-
146
-![Photon ISO file](images/ws-iso-selected.png)
147
-
148
-## Step 3: Select the Operating System
149
-
150
-Choose **Next**. Select the Guest operating system.
151
-
152
-For the Guest operating system, select **Linux**.
153
-
154
-Click the Version dropdown and select **VMware Photon 64-bit**  from the list.
155
-
156
-![Operating System](images/ws-iso-os.png)
157
-
158
-## Step 4: Specify the VM Name and Location
159
-
160
-Choose **Next**. Specify a virtual machine name and location.
161
-
162
-![VM Name and Location](images/ws-iso-name.png)
163
-
164
-## Step 5: Specify Disk Options
165
-
166
-Choose **Next**. Specify the maximum disk size and whether you want to split the virtual disk into multiple files or store it as a single file.
167
-
168
-![Disk options](images/ws-iso-disk.png)
169
-
170
-## Step 6: Configure VM Settings
171
-
172
-Choose **Next**. Workstation displays a summary of your selections.
173
-
174
-![Workstation settings](images/ws-iso-summary.png)
175
-
176
-**Important** : _Before_ you finish creating the Photon OS Virtual Machine, we strongly recommend that you customize the virtual machine and remove any unwanted devices that are not needed for a container run-time environment. To remove unnecessary devices, choose **Customize hardware**.
177
-
178
-![Customize hardware](images/ws-iso-customize.png)
179
-
180
-Consider removing the following components, which are not used by Photon OS:
181
-
182
-- Select **Sound Card**, un-tick the **Connect at power on** option. Confirm your action and choose **Close** to return to the VM Settings by .
183
-- Select **USB Controller** and ensure that the **Share Bluetooth devices with the virtual machine** setting is unchecked (it should be unchecked, by default) and then choose **Close**.
184
-- Select **Display** and ensure that the **Accelerate 3D Graphics** option is unchecked (it should be unchecked, by default) and then choose **Close**.
185
-- At this stage we have now made all the necessary customizations and you are ready to select the Photon OS ISO image to boot and begin the installation process.
186
-- Choose  **Finish**.
187
-
188
-In Workstation, choose **Edit virtual machine settings**, select **CD/DVD (IDE)**, and verify that **Connect at power on** is selected.
189
-
190
-![CD/DVD](images/ws-iso-cd.png)
191
-
192
-## Step 7: Configure a Secure Boot (Optional)
193
-
194
-**Note:**  If you want to configure a secure boot for the Photon OS VM, in Workstation, choose  **Edit virtual machine settings**, select  **Options**, choose **Advanced**, and select **Boot with EFI instead of BIOS**.
195
-
196
-![Boot with EFI](images/ws-iso-efi.png)
197
-
198
-The EFI boot ensures that the ISO content is signed by VMware and that the entire stack is secure.
199
-
200
-Choose **OK**.
201
-
202
-![ISO settings](images/ws-iso-settings.png)
203
-
204
-## Step 8: Power On the VM
205
-
206
-Choose **Power on this virtual machine**.
207
-
208
-When you see the Photon Installer boot menu, press Enter on your keyboard to start installing.
209
-
210
-![Installer](images/ws-iso-installer.png)
211
-
212
-Review the license agreement.
213
-
214
-![License agreement](images/ws-iso-license.png)
215
-
216
-Choose **Accept** and press Enter.
217
-
218
-## Step 9: Configure the Partition
219
-
220
-The installer will detect one disk, which should be the 8GB volume configured as part of the virtual machine creation. Choose **Auto**  to have the installer automatically allocate the partition, or choose **Custom**  if you want to configure individual partitions, and then press the Enter key.
221
-
222
-![Partition](images/ws-iso-disk-partition.png)
223
-
224
-**Note:**  If you choose Custom, the installer displays the following screen.
225
-
226
-![Custom partition](images/ws-iso-disk-partition-custom.png)
227
-
228
-For each custom partition, choose **Create New**  and specify the following information:
229
-
230
-![New partition](images/ws-iso-disk-partition-new.png)
231
-
232
-**Size** - Preallocated size of this partition, in MB.
233
-
234
-**Type** - One of the following options:
235
-
236
-- **ext3** - ext3 file system
237
-- **ext4** - ext4 file system
238
-- **swap** - swap partition
239
-
240
-**Mountpoint** - Mount point for this partition.
241
-
242
-Choose **OK** and press the Enter key. When you are done defining custom partitions, choose **Next** and press the Enter key.
243
-
244
-The installer prompts you to confirm that you want to erase the entire disk. Choose  **Yes**  and press the Enter key.
245
-
246
-![Disk erase](images/ws-iso-disk-erase.png)
247
-
248
-## Step 10: Select an Installation Option
249
-
250
-After partitioning the disk, the installer will prompt you to select an installation option.
251
-
252
-![installation option](images/ws-iso-install-option.png)
253
-
254
-Each installation option provides a different run-time environment, depending on your requirements.
255
-
256
-| **Option** | **Description** |
257
-| --- | --- |
258
-| **Photon Minimal** | Photon Minimum is a very lightweight version of the container host runtime that is best suited for container management and hosting. There is sufficient packaging and functionality to allow most common operations around modifying existing containers, as well as being a highly performant and full-featured runtime. |
259
-| **Photon Full** | Photon Full includes several additional packages to enhance the authoring and packaging of containerized applications and/or system customization. For simply running containers, Photon Full will be overkill. Use Photon Full for developing and packaging the application that will be run as a container, as well as authoring the container, itself. For testing and validation purposes, Photon Full will include all components necessary to run containers. |
260
-| **Photon OSTree Server** | This installation profile will create the server instance that will host the filesystem tree and managed definitions for rpm-ostree managed hosts created with the "Photon OSTree Host" installation profile. Most environments should need only one Photon OSTree Server instance to manage the state of the Photon OSTree Hosts. Use Photon OSTree Server when you are establishing a new repository and management node for Photon OS hosts. |
261
-
262
-**Note:**  The option you choose determines the disk and memory resources required for your installation.
263
-
264
-Select the option you want and press the Enter key.
265
-
266
-## Step 11: Select the Linux Kernel
267
-
268
-Select a Linux kernel to install.
269
-
270
-![Kernel](images/ws-iso-kernel.png)
271
-
272
-- **Hypervisor optimized** means that any components that are not needed for running under a VMware hypervisor have been removed for faster boot times.
273
-- **Generic** means that all components are included.
274
-
275
-Choose **Next** and press the Enter key.
276
-
277
-## Step 12: Specify the Hostname
278
-
279
-The installer prompts you for a hostname and suggest a randomly generated, unique hostname that you can change if you want.
280
-
281
-![Hostname](images/ws-iso-hostname.png)
282
-
283
-Press the Enter key.
284
-
285
-## Step 13: Specify the System root Password
286
-
287
-**_Note_** _: Photon OS will not permit commonly used dictionary words to be set as a root password._
288
-
289
-The installer prompts you to enter the system root password. Type the password and press the Enter key.
290
-
291
-![Password](images/ws-iso-root-password.png)
292
-
293
-The installer prompts you to confirm the root password by typing it a second time.
294
-
295
-![Confirm password](images/ws-iso-root-password-confirm.png)
296
-
297
-Press the Enter key. The installer proceeds to install the software. Installation times will vary based on the system hardware and installation options you selected. Most installations complete in less than one minute.
298
-
299
-## Step 14: Reboot the VM and Log In
300
-
301
-Once finished, the installer displays a confirmation message (which includes how long it took to install Photon OS) and prompts you to press a key on your keyboard to boot the new VM.
302
-
303
-![confirmation message](images/ws-iso-installed.png)
304
-
305
-Press any key on the keyboard and the virtual machine will reboot into Photon OS.
306
-
307
-As the initial boot process begins, the installer displays the Photon splash screen, and then a login prompt.
308
-
309
-![Splash screen](images/ws-iso-splash.png)
310
-
311
-At the login prompt, type **root**  as the username and provide the password chosen during the installation.
312
-
313
-![Password](images/ws-iso-login.png)
314
-
315
-You have now successfully set up Photon OS and are ready to use your container run-time environment. Proceed to the next section to deploy a containerized application.
316
-
317
-# Deploying a Containerized Application in Photon OS
318
-
319
-Now that you have your container runtime environment up and running, you can easily deploy a containerized application. For this example, you will deploy the popular open source Web Server Nginx. The Nginx application has a customized VMware package that is published as a dockerfile and can be downloaded directly through the Docker module from the Docker Hub.
320
-
321
-## Step 1: Run Docker
322
-
323
-To run Docker from the command prompt, enter the following command, which initializes the docker engine:
324
-
325
-    systemctl start docker
326
-
327
-To ensure Docker daemon service runs on every subsequent VM reboot, enter the following command:
328
-
329
-    systemctl enable docker
330
-
331
-## Step 2: Run the Nginx Web Server
332
-
333
-Now the Docker daemon service is running, it is a simple task to "pull" and start the Nginx Web Server container from Docker Hub. To do this, type the following command:
334
-
335
-    docker run -d -p 80:80 vmwarecna/nginx
336
-
337
-This pulls the Nginx Web Server files and appropriate dependent container filesystem layers required for this containerized application to run.
338
-
339
-![Docker run](images/ws-docker-run.png)
340
-
341
-After the **docker run**  process completes, you return to the command prompt. You now have a fully active website up and running in a container.
342
-
343
-## Step 3: Test the Web Server
344
-
345
-To test that your Web Server is active, run the **ifconfig** command to get the IP address of the Photon OS Virtual Machine.
346
-
347
-![IP config](images/ws-docker-ifconfig.png)
348
-
349
-The output displays a list of adapters that are connected to the virtual machine. Typically, the web server daemon will be bound on "**eth0**".
350
-
351
-Start a browser on your host machine and enter the IP address of your Photon OS Virtual Machine (the **inet addr** for eth0). You should see a screen similar to the following example as confirmation that your web server is active.
352
-
353
-![Confirmation](images/ws-docker-confirm.png)
354
-
355
-You can now run any other containerized application from Docker Hub or your own containerized application within Photon OS.
356
-
357
-# Installing Photon OS 1.0
358
-
359
-Refer to the Photon OS 1.0 installation instructions in [Running Photon OS on Fusion](Running-Project-Photon-on-Fusion.md).
360 1
deleted file mode 100644
... ...
@@ -1,503 +0,0 @@
1
-# Running Photon OS on vSphere
2
-
3
-This guide describes how to get started using Photon OS as a virtual machine within VMware vSphere. It provides instructions for downloading Photon OS (as an OVA or ISO file), describes the various installation options, and walks through the steps of installing the Photon OS distribution on vSphere. Once Photon OS is installed, this document highlights how to deploy a containerized application in Docker with a single command.
4
-
5
-- [About Photon OS](#about-photon-os)
6
-- [Deciding Whether to Use OVA or ISO](#deciding-whether-to-use-ova-or-iso)
7
-- [Downloading Photon OS](#downloading-photon-os)
8
-- [Importing the OVA for Photon OS 2.0](#importing-the-ova-for-photon-os-20)
9
-- [Installing the ISO Image for Photon OS 2.0](#installing-the-iso-image-for-photon-os-20)
10
-- [Deploying a Containerized Application in Photon OS](#deploying-a-containerized-application-in-photon-os)
11
-- [Installing Photon OS v1.0](#installing-photon-os-10)
12
-
13
-**Note**: If you want to upgrade an existing Photon 1.0 VM, refer to the instructions in [Upgrading to Photon OS 2.0](Upgrading-to-Photon-OS-2.0.md). 
14
-
15
-## About Photon OS
16
-
17
-Photon OS™ is an open source Linux container host optimized for cloud-native applications, cloud platforms, and VMware infrastructure. Photon OS provides a secure run-time environment for efficiently running containers. For an overview, see  [https://vmware.github.io/photon/](https://vmware.github.io/photon/).
18
-
19
-## Requirements
20
-
21
-Using Photon OS within VMware vSphere requires the following resources:
22
-
23
-| **Resources** | **Description** |
24
-| --- | --- |
25
-| VMware vSphere installed | VMware web client (v6.5) for ESXi hosts (recommended) **Note:** vSphere 6 and vSphere 5.5 (these clients provide limited support; not all features are available). |
26
-| Memory | ESXi host with 2GB of free RAM (recommended) |
27
-| Storage | **Minimal Photon install** : ESXi host with at least 512MB of free space (minimum); **Full Photon install** : ESXi host with at least 4GB of free space (minimum); 16GB is recommended |
28
-| Distribution File | Photon OS ISO or OVA file downloaded from Bintray |
29
-
30
-Resource requirements and recommendations vary depending on several factors, including the host environment (for example, VMware vSphere and VMware Fusion), the distribution file used (ISO or OVA), and the selected installation settings (for example, full or basic installation).
31
-
32
-**Note:** The setup instructions in this guide use VMware vSphere 6 and the vSphere web client.
33
-
34
-## Deciding Whether to Use OVA or ISO
35
-
36
-The first step is decide whether to use the OVA or ISO distribution to set up Photon OS.
37
-
38
-- **OVA import** : Because of the nature of an OVA, you're getting a pre-installed version of Photon OS. You can choose the hardware version you want (OVA with hardware version 13 or 11). The OVA benefits from a simple import process and some kernel tuning for VMware environments. However, because it's a pre-installed version, the set of packages that are installed are predetermined. Any additional packages that you need can be installed using tdnf.
39
-- **ISO install** : The ISO, on the other hand, allows for a more complete installation or automated installation via kickstart.
40
-
41
-If you're just looking for the fastest way to get up and running, start with the OVA.
42
-
43
-## Downloading Photon OS
44
-
45
-Once you've decided which way to install, you'll need to download the correct binaries. Go to the following Bintray URL and download the latest release of Photon OS:
46
-
47
-[https://bintray.com/vmware/photon/](https://bintray.com/vmware/photon/)
48
-
49
-For instructions, see [Downloading Photon OS](Downloading-Photon-OS.md).
50
-
51
-**Note:** For ISO installation, you will need to upload to a datashare that is attached to the ESXi host, or mount the file share (where the ISO resides) as a data store.
52
-
53
-## Importing the OVA for Photon OS 2.0
54
-
55
-Using the OVA is a fast and easy way to create a Photon OS VM on VMware vSphere.
56
-
57
-After you've downloaded the OVA, log in to your vSphere environment.
58
-
59
-### Step 1: Start the Import Process
60
-
61
-From the Actions pull-down menu, choose **Create/Register VM**.
62
-
63
-![Create/Register VM](images/vs-ova-new-vm.png)
64
-
65
-In the Select creation type window, choose  **Deploy a virtual machine from an OVF or OVA file**.
66
-
67
-(images/vs-ova-new-vm-ova.png)
68
-
69
-Choose **Next**.
70
-
71
-### Step 2: Select the OVA File
72
-
73
-Enter a name for the virtual machine, and select the OVA file.
74
-
75
-![OVA file](images/vs-ova-name-selected.png)
76
-
77
-Choose **Next**.
78
-
79
-### Step 3: Specify the Target Datastore
80
-
81
-From the Select storage screen, select the target datastore for your VM.
82
-
83
-![Target datastore](images/vs-ova-storage.png)
84
-
85
-Choose  **Next**.
86
-
87
-### Step 4: Accept the License Agreement
88
-
89
-Read through the Photon OS License Agreement, and then choose **I Agree**.
90
-
91
-![License](images/vs-ova-license.png)
92
-
93
-Choose **Next**.
94
-
95
-### Step 5: Select Deployment Options
96
-
97
-Select deployment options.
98
-
99
-![Deployment Options](images/vs-ova-deployment-options.png)
100
-
101
-Photon OS is provisioned with a maximum disk size. By default, Photon OS uses only the portion of disk space that it needs, usually much less that the entire disk size ( **Thin** client). If you want to pre-allocate the entire disk size (reserving it entirely for Photon OS instead), select **Thick**  instead.
102
-
103
-Choose **Next**.
104
-
105
-### Step 6: Verify Deployment Settings
106
-
107
-Verify your deployment settings.
108
-
109
-![Deployment settings](images/vs-ova-settings.png)
110
-
111
-Click **Finish**. vSphere uploads and validates your OVA. Depending on bandwidth, this operation might take a while.
112
-
113
-When finished, vShield powers up a new VM based on your selections.
114
-
115
-### Step 7: Change Login Settings
116
-
117
-![Login settings](images/vs-ova-splash.png)
118
-
119
-After the VM is booted, open the command window. vSphere prompts you to log in.
120
-
121
-**Note**: Because of limitations within OVA support on vSphere, it was necessary to specify a default password for the OVA option. However, all Photon OS instances that are created by importing the OVA will require an immediate password change upon login. The default account credentials are:
122
-
123
-| **Setting** | **Value** |
124
-| --- | --- |
125
-| Username | ``root`` |
126
-| Password | ``changeme`` |
127
-
128
-After you provide these credentials, vSphere prompts you to create a new password and type it a second time to verify it.
129
-
130
-**Note:** For security, Photon OS forbids common dictionary words for the root password.  
131
-
132
-Once logged in, you will see the shell prompt.
133
-
134
-![Shell prompt](images/vs-ova-login.png)
135
-
136
-Once complete, proceed to [Deploying a Containerized Application in Photon OS](#deploying-a-containerized-application-in-photon-os).
137
-
138
-### Step 9: Export the VM as a Template (Optional)
139
-
140
-Consider converting this imported VM into a template (from the Actions menu, choose **Export** ) so that you have a master Photon OS instance that can be combined with vSphere Guest Customization to enable rapid provisioning of Photon OS instances.
141
-
142
-## Installing the ISO Image for Photon OS 2.0
143
-
144
-After you have downloaded the Photon OS ISO image into a folder of your choice, complete the following steps.
145
-
146
-### Step 1: Upload the ISO Image
147
-
148
-Upload the ISO image to a datastore that is attached to the host on which you'll create the Photon OS virtual machine.
149
-
150
-### Step 2: Create a New VM
151
-
152
-Log in to your vSphere environment. In the Virtual Machines window, choose **Create/Register VM**.
153
-
154
-On the Select creation type screen, select **Create a new virtual machine**.
155
-
156
-![Create new virtual machine](images/vs-iso-new.png)
157
-
158
-Choose **Next**.
159
-
160
-### Step 3: Configure VM Settings
161
-
162
-Specify a VM name.
163
-
164
-![VM name](images/vs-iso-name.png)
165
-
166
-Specify a guest operating system.
167
-
168
-- For Compatibility, select **ESXi 6.5**.
169
-- For Guest OS family, select **Linux**.
170
-- For Guest OS version, select **VMware Photon OS (64-bit)**.
171
-
172
-![Guest operating system](images/vs-iso-os.png)
173
-
174
-Choose  **Next**.
175
-
176
-### Step 4: Select the Target Datastore
177
-
178
-Select the datastore where you want to store the VM.
179
-
180
-![Target datastore](images/vs-iso-datastore.png)
181
-
182
-Click **Next**.
183
-
184
-### Step 5: Customize VM Settings
185
-
186
-Customize the virtual machine settings.
187
-
188
-![v](images/vs-iso-customize.png)
189
-
190
-For CD/DVD Drive 1, click the drop-down and select **Datastore ISO file**.
191
-
192
-In the Datastore browser, select the ISO that you want to import.
193
-
194
-Change other settings as applicable.
195
-
196
-- The recommended virtual hardware settings for your Photon VM are heavily dependent upon the container load you intend to run within Photon OS – more containers or more intensive containers will require you to adjust these settings for your application load. VMware suggests 2 vCPU, 1024MB memory, 20GB hard disk. Any unwanted devices should be removed. Be sure to mount the Photon OS ISO on the CD/DVD Drive and put a check in the box next to, Connect At Power On.
197
-- If you want to configure a secure boot for the Photon OS VM you created, choose the VM Options tab, expand Boot Options, and select EFI from the firmware drop-down.  An EFI boot ensures that the ISO content is signed by VMware and that the entire stack is secure.
198
-
199
-Choose **Next**.
200
-
201
-### Step 6: Verify VM Settings
202
-
203
-The installer displays a summary of your selected settings.
204
-
205
-![Summary](images/vs-iso-ready.png)
206
-
207
-Click **Finish**. vSphere creates the VM.
208
-
209
-### Step 7: Power on the VM
210
-
211
-Select the VM and power it on.
212
-
213
-![Power on VM](images/vs-iso-install.png)
214
-
215
-When you see the Photon Installer boot menu, press Enter on your keyboard to start installing.
216
-
217
-### Step 8: Accept the License Agreement
218
-
219
-Read the License Agreement and press the Enter key to accept.
220
-
221
-![License Agreement](images/vs-iso-license.png)
222
-
223
-### Step 9: Configure the Partition
224
-
225
-The installer will detect one disk, which should be the 16GB volume configured as part of the virtual machine creation. Choose **Auto**  to have the installer automatically allocate the partition, or choose **Custom**  if you want to configure individual partitions, and then press the Enter key.
226
-
227
-![Partition](images/vs-iso-partition.png)
228
-
229
-**Note:**  If you choose Custom, the installer displays the following screen.
230
-
231
-![Custom Partition](images/vs-iso-partition-custom.png)
232
-
233
-For each custom partition, choose **Create New**  and specify the following information:
234
-
235
-![New Partition](images/vs-iso-partition-new.png)
236
-
237
-**Size** - Preallocated size of this partition, in MB.
238
-
239
-**Type** - One of the following options:
240
-
241
-- **ext3** - ext3 file system
242
-- **ext4** - ext4 file system
243
-- **swap** - swap partition
244
-
245
-**Mountpoint** - Mount point for this partition.
246
-
247
-Choose **OK** and press the Enter key. When you are done defining custom partitions, choose **Next** and press the Enter key.
248
-
249
-The installer prompts you to confirm that you want to erase the entire disk.
250
-
251
-![Erase disk](images/vs-iso-erase.png)
252
-
253
-Choose **Yes** and press the Enter key.
254
-
255
-### Step 10: Select an Installation Option
256
-
257
-After partitioning the disk, the installer will prompt you to select an installation option.
258
-
259
-![Installation Option](images/vs-iso-install-option.png)
260
-
261
-Each install option provides a different run-time environment, depending on your requirements.
262
-
263
-| **Option** | **Description** |
264
-| --- | --- |
265
-| **Photon Minimal** | Photon Minimum is a very lightweight version of the container host runtime that is best suited for container management and hosting. There is sufficient packaging and functionality to allow most common operations around modifying existing containers, as well as being a highly performant and full-featured runtime. |
266
-| **Photon Full** | Photon Full includes several additional packages to enhance the authoring and packaging of containerized applications and/or system customization. For simply running containers, Photon Full will be overkill. Use Photon Full for developing and packaging the application that will be run as a container, as well as authoring the container, itself. For testing and validation purposes, Photon Full will include all components necessary to run containers. |
267
-| **Photon OSTree Server** | This installation profile will create the server instance that will host the filesystem tree and managed definitions for rpm-ostree managed hosts created with the "Photon OSTree Host" installation profile. Most environments should need only one Photon OSTree Server instance to manage the state of the Photon OSTree Hosts. Use Photon OSTree Server when you are establishing a new repository and management node for Photon OS hosts. |
268
-
269
-**Note:**  The option you choose determines the disk and memory resources required for your installation.
270
-
271
-Select the option you want and press the Enter key.
272
-
273
-### Step 11: Select the Linux Kernel
274
-
275
-Select a Linux kernel to install.
276
-
277
-![Linux Kernel](images/vs-iso-kernel.png)
278
-
279
-- **Hypervisor**  optimized means that any components that are not needed for running under a VMware hypervisor have been removed for faster boot times.
280
-- **Generic**  means that all components are included.
281
-
282
-Choose **Next** and press the Enter key.
283
-
284
-### Step 12: Specify the Hostname
285
-
286
-The installer prompts you for a hostname and suggest a randomly generated, unique hostname that you can change if you want.
287
-
288
-![Hostname](images/vs-iso-hostname.png)
289
-
290
-Press the Enter key.
291
-
292
-### Step 13: Specify the System root Password
293
-
294
-The installer prompts you to enter the system root password.
295
-
296
-_Note: Photon OS will not permit commonly used dictionary words to be set as a root password._
297
-
298
-![Root password](images/vs-iso-root-password.png)
299
-
300
-Type a password and press the Enter key.
301
-
302
-The installer prompts you to confirm your root password by typing it a second time.
303
-
304
-![Password confirmation](images/vs-iso-root-password-confirm.png)
305
-
306
-**Note:** If you have trouble with unintentional repeated characters in the Remote Console, follow VMware KB 196 ( [http://kb.vmware.com/kb/196](http://kb.vmware.com/kb/196)) for a setting to apply to the virtual machine.
307
-
308
-Press the Enter key. The installer proceeds to install the software. Installation times will vary based on the system hardware and installation options you selected. Most installations complete in less than one minute.
309
-
310
-### Step 14: Reboot the VM and Log In
311
-
312
-Once finished, the installer displays a confirmation message (which includes how long it took to install Photon OS) and prompts you to press a key on your keyboard to boot the new VM.
313
-
314
-![Boot VM](images/vs-iso-installed.png)
315
-
316
-As the initial boot process begins, the installer displays the Photon splash screen, and then a login prompt.
317
-
318
-![Login prompt](images/vs-iso-splash.png)
319
-
320
-At the login prompt, type **root**  as the username and provide the password chosen during the installation.
321
-
322
-![Password](images/vs-iso-login.png)
323
-
324
-You have now successfully setup Photon OS and are ready to use your container runtime environment. Proceed to the next section to deploy a containerized application.
325
-
326
-## Deploying a Containerized Application in Photon OS
327
-
328
-Now that you have your container runtime environment up and running, you can easily deploy a containerized application. For this example, you will deploy the popular open source Web Server Nginx. The Nginx application has a customized VMware package that is published as a dockerfile and can be downloaded, directly, through the Docker module from the Docker Hub.
329
-
330
-### Step 1: Run Docker
331
-
332
-To run Docker from the command prompt, enter the following command, which initializes the docker engine:
333
-
334
-    systemctl start docker
335
-
336
-To ensure Docker daemon service runs on every subsequent VM reboot, enter the following command:
337
-
338
-    systemctl enable docker
339
-
340
-### Step 2: Run the Nginx Web Server
341
-
342
-Now the Docker daemon service is running, it is a simple task to "pull" and start the Nginx Web Server container from Docker Hub. To do this, type the following command:
343
-
344
-    docker run -d -p 80:80 vmwarecna/nginx
345
-
346
-This pulls the Nginx Web Server files and appropriate dependent container filesystem layers required for this containerized application to run.
347
-
348
-![Docker run](images/vs-docker-run.png)
349
-
350
-After the **docker run**  process completes, you return to the command prompt. You now have a fully active website up and running in a container!
351
-
352
-### Step 3: Test the Web Server
353
-
354
-To test that your Web Server is active, run the ifconfig command to get the IP address of the Photon OS Virtual Machine.
355
-
356
-![IP address](images/vs-docker-ifconfig.png)
357
-
358
-The output displays a list of adapters that are connected to the virtual machine. Typically, the web server daemon will be bound on **eth0**.
359
-
360
-Start a browser on your host machine and enter the IP address of your Photon OS Virtual Machine. You should see a screen similar to the following example as confirmation that your web server is active.
361
-
362
-![Docker confirmation](images/vs-docker-confirm.png)
363
-
364
-You can now run any other containerized application from Docker Hub or your own containerized application within Photon OS.
365
-
366
-## Installing Photon OS v1.0
367
-
368
-This section provides installation instructions for Photon OS v1.0.
369
-
370
-### Photon OS 1.0 Prerequisites
371
-
372
-In order to install and start using Photon OS with VMware vSphere, the following pre-requisites must be satisfied: 
373
-
374
-* VMware vSphere 5.5 or VMware vSphere 6.0 installed 
375
-* ESXi host with recommended 2GB of free RAM
376
-* ESXi host with recommended 8GB of free disk space
377
-* The Photon OS ISO downloaded from Bintray
378
-
379
-This document uses VMware vSphere 6. VMware recommends that you use the latest version, though vSphere 5.5 or later should work as well. 
380
-
381
-### Importing the Photon OS 1.0 OVA
382
-
383
-Using the OVA is a fast and easy way to create a Photon OS VM. Once you’ve downloaded the OVA, log in to your vSphere environment and, from the `Actions` pull-down menu, select, `Deploy OVF Template …` On the popup window, point vSphere to the OVA file that you’ve downloaded. 
384
-
385
-![vsphere1](images/vsphere1.jpg)
386
-
387
-Click the `Next` button at the bottom of the window and vSphere will upload and validate your OVA. Depending on bandwidth, this operation might take a while. 
388
-
389
-After validating the image, vSphere will present a summary of the details of the OVA. Click the `Next` button to proceed to selecting a location to store the imported Photon OS instance.
390
-
391
-Click `Finish`
392
-
393
-At this point, you’ve got a Photon OS instance ready to go; but before you power on that Photon OS instance, consider first converting this VM into a template. By converting this imported VM to a template, you have a master Photon OS instance that can be combined with vSphere Guest Customization to enable rapid provisioning of Photon OS instances. 
394
-
395
-The OVA contains a default password of "changeme" for the root account that must be changed upon initial login. For security, Photon OS forbids common dictionary words for the root password.
396
- 
397
-### Installing the Photon OS 1.0 ISO Image
398
-
399
-Once the ISO image has been uploaded to a datastore that is attached to the host on which you’ll create the Photon OS virtual machine, start the installation process by creating a new virtual machine.
400
-When creating a new VM, the first thing you’ll need to specify is the compatibility of that VM with ESXi versions. Select a compatibility level for your VM, as shown below. Photon OS shouldn’t require any particular compatibility, but VMware recommends that you choose the latest available option for your release of vSphere.
401
-
402
-![vsphere2](images/vsphere2.jpg)
403
-
404
-When prompted for the `Guest OS Family,` choose `Linux` and, for Guest OS Version, choose `Other 3.x Linux (64-bit)`. 
405
-
406
-![vsphere3](images/vsphere3.jpg)
407
-
408
-The recommended virtual hardware settings for your Photon VM are heavily dependent upon the container load you intend to run within Photon OS – more containers or more intensive containers will require you to adjust these settings for your application load. VMware suggests 2 vCPU, 1024MB memory, 20GB hard disk. Any unwanted devices should be removed.  Be sure to mount the Photon OS ISO on the CD/DVD Drive and put a check in the box next to, `Connect At Power On.`
409
-
410
-![vsphere4](images/vsphere4.jpg)
411
-
412
-To summarize, these are the settings we recommend as a starting point for your Photon OS container runtime host: Thin provisioned, hardware compatibility: ESXi 6.0 and later (VM version 11).
413
-
414
-Power on the Photon OS virtual machine and, within a few seconds, the Photon Installer Boot Menu will appear.  Download and install the Remote Console if you do not have it already; otherwise, click `Launch Remote Console` to interact with the installer.
415
-
416
-![vsphere5](images/vsphere5.jpg)
417
-
418
-Once connected to the remote console, select `Install` to proceed.
419
-
420
-![vsphere6](images/vsphere6.png)
421
-
422
-After you accept the EULA, the installer will detect one disk, which should be the 20GB volume configured as part of the virtual machine creation. Select the disk and press enter.  When you are prompted to confirm that it is okay to erase the entire disk, select `Yes` to accept and proceed with the installation.
423
-
424
-![vsphere7](images/vsphere7.jpg)
425
-
426
-You will now be presented with several installation options:
427
-
428
-![vsphere8](images/vsphere8.png)
429
-
430
-Each install option provides a different runtime environment:
431
-
432
-* Photon Minimal: Photon Minimum is a very lightweight version of the container host runtime that is best suited for container management and hosting. There is sufficient packaging and functionality to allow most common operations around modifying existing containers, as well as being a highly performant and full-featured runtime. 
433
-
434
-* Photon Full: Photon Full includes several additional packages to enhance the authoring and packaging of containerized applications and system customization. For simply running containers, Photon Full will be overkill. Use Photon Full for developing and packaging the application that will be run as a container, as well as authoring the container itself. For testing and validation purposes, Photon Full will include all components necessary to run containers. 
435
-
436
-* Photon OSTree Host: This installation profile creates a Photon OS instance that will source its packages from a central rpm-ostree server and continue to have the library and state of packages managed by the definition that is maintained on the central rpm-ostree server. Use Photon OStree Hosts when you are interested in experimenting with the concept of a centrally authored and maintained OS version. This concept of treating the OS as a versioned, atomic entity can simplify lifecycle management and security at scale. 
437
-
438
-* Photon OSTree Server: This installation profile will create the server instance that will host the filesystem tree and managed definitions for rpm-ostree managed hosts created with the Photon OSTree Host installation profile. Most environments should need only one Photon OSTree Server instance to manage the state of the Photon OSTree Hosts. Use Photon OSTree Server when you are establishing a new repository and management node for Photon OS hosts.  
439
-
440
-For the purposes of this how-to guide, select the option to install Photon Minimal. Once `Photon Minimal` is highlighted, press the Enter key on your keyboard.
441
-
442
-You will now be prompted for a hostname. Photon OS will prepopulate a randomly generated, unique hostname; you can either use this suggestion or enter your own hostname, as shown in the screenshot below:
443
-
444
-![vsphere9](images/vsphere9.jpg)
445
-
446
-After selecting a hostname and pressing Enter, you will be prompted to first type and, then, confirm the system root password. If you have trouble with unintentional repeated characters in the Remote Console, follow VMware KB 196 (http://kb.vmware.com/kb/196) for a setting to apply to the virtual machine.
447
-
448
-*Note: Photon OS will not permit commonly used dictionary words to be set as a root password.*
449
-
450
-After confirming the password, the installation process should begin.
451
-
452
-Installation times will vary based on system hardware and installation options, but most installations complete in less than a minute. Once the installation completes, press any key and the virtual machine will reboot into Photon OS.
453
-
454
-As the initial boot process begins, you will see the Photon splash screen before you are taken to a login prompt.
455
-
456
-At the login prompt, enter `root` as the username and provide the password chosen during the installation. 
457
-
458
-You have now successfully setup Photon OS and are ready to use your container runtime environment.
459
- 
460
-### Installing a Containerized Application in Photon OS 1.0
461
-Now that you have your container runtime environment up and running, you may be wondering, “what can I do now?” A command prompt is not the most exciting thing. To help demonstrate the ease with which you can deploy a containerized application, this section showcases how you can quickly get a web server up and running.
462
-
463
-For this example, we will use the popular open source web server Nginx. The Nginx application has a customized VMware package  published as a dockerfile that can be downloaded directly in Docker from the Docker Hub.
464
-
465
-To run Docker from the command prompt, enter the command below to initialize the docker engine:
466
-
467
-`systemctl start docker`
468
-
469
-To ensure the docker daemon service runs on every subsequent VM reboot, enter:
470
-
471
-`systemctl enable docker`
472
-
473
-Now that the docker daemon service is running, it is a simple task to pull and start the Nginx Web Server container from Docker Hub.  To do this, enter the following command:
474
-
475
-`docker run -d -p 80:80 vmwarecna/nginx`
476
-
477
-This will then pull the Nginx Web Server files and appropriate dependent containers to ensure this containerized application can run.  You will see a screenshot similar to below, as the container and dependencies are downloaded and the container is prepared to run: 
478
-
479
-![vsphere12](images/vsphere12.jpg)
480
-
481
-Once the `docker run` process is completed, you will be returned to the command prompt.  You now have a fully active web server up and running through typing just a single command within Photon OS using containers.
482
-
483
-To test that your web server is active, we need to get the IP address of the Photon OS Virtual Machine. To get the IP address, enter the following command: 
484
-
485
-	ifconfig
486
-
487
-This will now display a list of adapters connected to the virtual machine.  Typically, the web server daemon will be bound to `eth0.`  
488
-
489
-Start a browser on your host machine and enter the IP address of your Photon OS Virtual Machine.  The following screen will appear showing that your web server is active:
490
-
491
-![vsphere13](images/vsphere13.jpg)
492
-
493
-You can now run any other containerized application from Docker Hub or your own containerized application within Photon OS.
494
-
495
-If you are having trouble viewing the screen that shows the web server is active, you might have to add an iptables rule to your container VM to allow traffic on Port 80:
496
-
497
-`iptables -I INPUT 1 -p tcp --dport 80 -j ACCEPT`
498
-
499
-In addition, you might have to modify /etc/httpd/httpd.conf to listen on Port 80 by adding the following line:  
500
-
501
-`Listen 0.0.0.0:80`
502
-
503
-
504 1
deleted file mode 100644
... ...
@@ -1,514 +0,0 @@
1
-# Running Photon OS on Fusion
2
-
3
-This guide describes how to get started using Photon OS as a virtual machine within VMware Fusion. It provides instructions for downloading Photon OS (as an OVA or ISO file), describes the various installation options, and walks through the steps of installing the Photon OS distribution on Fusion. Once Photon OS is installed, this document shows how to deploy a containerized application in Docker with a single command.
4
-
5
-- [About Photon OS](#about-photon-os)
6
-- [Requirements](#requirements)
7
-- [Deciding Whether to Use an OVA or ISO](#deciding-whether-to-use-an-ova-or-iso)
8
-- [Downloading Photon OS](#downloading-photon-os)
9
-- [Importing the OVA for Photon OS 2.0](#importing-the-ova-for-photon-os-20)
10
-- [Installing the ISO Image for Photon OS 2.0](#installing-the-iso-image-for-photon-os-20)
11
-- [Deploying a Containerized Application in Photon OS](#deploying-a-containerized-application-in-photon-os)
12
-- [Installing Photon OS 1.0](#installing-photon-os-10)
13
-
14
-**Note**: If you want to upgrade an existing Photon 1.0 VM, refer to the instructions in [Upgrading to Photon OS 2.0](Upgrading-to-Photon-OS-2.0.md). 
15
-
16
-# About Photon OS
17
-
18
-Photon OS™ is an open source Linux container host optimized for cloud-native applications, cloud platforms, and VMware infrastructure. Photon OS provides a secure run-time environment for efficiently running containers. For an overview, see [https://vmware.github.io/photon/](https://vmware.github.io/photon/).
19
-
20
-# Requirements
21
-
22
-Using Photon OS within VMware Fusion requires the following resources:
23
-
24
-| **Resource** | **Description** |
25
-| --- | --- |
26
-| VMware Fusion | VMware Fusion (v7.0 or higher) must be installed. The latest version is recommended. |
27
-| Memory | 2GB of free RAM (recommended) |
28
-| Storage | **Minimal Photon install** : 512MB of free space (minimum); **Full Photon install** : 4GB of free space (minimum); 8GB recommended. |
29
-| Distribution File | Photon OS ISO or OVA file downloaded from bintray ( [https://bintray.com/vmware/photon/](https://bintray.com/vmware/photon/)). |
30
-
31
-Resource requirements and recommendations vary depending on several factors, including the host environment (for example, VMware Fusion and VMware vSphere), the distribution file used (ISO or OVA), and the selected installation settings (for example, full or basic installation).
32
-
33
-**Note:** The setup instructions in this guide use VMware Fusion Professional version 8.5.8, as per the following screenshot.
34
-
35
-![Fusion version](images/fs-version.png)
36
-
37
-# Deciding Whether to Use an OVA or ISO
38
-
39
-The first step is decide whether to use the OVA or ISO distribution to set up Photon OS.
40
-
41
-- **OVA import**: Because of the nature of an OVA, you're getting a pre-installed version of Photon OS. Choose the OVA with Hardware Version 11 (_not_ 13). The OVA benefits from a simple import process and some kernel tuning for VMware environments. However, because it's a pre-installed version, the set of packages that are installed are predetermined. Any additional packages that you need can be installed using **tdnf**.
42
-- **ISO install**: The ISO, on the other hand, allows for a more complete installation or automated installation via kickstart.
43
-
44
-If you're just looking for the fastest way to get up and running, start with the OVA.
45
-
46
-# Downloading Photon OS
47
-
48
-Once you've decided which way to install, you'll need to download the correct binaries. Go to the following Bintray URL and download the latest release of Photon OS:
49
-
50
-[https://bintray.com/vmware/photon/](https://bintray.com/vmware/photon/)
51
-
52
-For instructions, see  [Downloading Photon OS](Downloading-Photon-OS.md).
53
-
54
-# Importing the OVA for Photon OS 2.0
55
-
56
-Importing the OVA image is the easiest way to create a Photon OS VM.
57
-
58
-## Step 1: Start the Import Process
59
-
60
-After you have downloaded the latest Photon OS OVA image (OVA with Hardware Version 11) into a folder of your choice, open VMware Fusion. From the File menu, choose **Import …**. Fusion prompts you to choose an existing virtual machine.
61
-
62
-![Import process](images/fs-ova-import.png)
63
-
64
-Choose the **Choose File …**  button to locate and select the Photon OS OVA, then choose **Continue**.
65
-
66
-![Select OVA ](images/fs-ova-selected.png)
67
-
68
-## Step 2: Specify the Name and Storage Location
69
-
70
-Provide the name and storage location for your Photon OS VM, then choose **Save**.
71
-
72
-![Name and storage location](images/fs-ova-name.png)
73
-
74
-Review the Photon OS License Agreement, then choose **Accept** to start the import process.
75
-
76
-![License](images/fs-ova-license.png)
77
-
78
-## Step 3: Configure VM Settings
79
-
80
-After the OVA is imported, Fusion displays a confirmation that the import has completed and a summary of the settings for your Photon OS VM. The following screen shot is an example (your settings may vary).
81
-
82
-![VM settings](images/fs-ova-finish.png)
83
-
84
-**Important:** Choose **Customize Settings**  to change the operating system (as recognized by the hypervisor) for the newly imported VM.
85
-
86
-![Custom settings](images/fs-ova-settings.png)
87
-
88
-Choose **General**.
89
-
90
-Click the selection box next to **OS**, select **Linux** , and then select **VMware Photon 64-bit**.
91
-
92
-![Operating system](images/fs-ova-os.png)
93
-
94
-Close the settings window. Fusion prompts you to verify that you want to change the operating system.
95
-
96
-![Confirm settings](images/fs-ova-os-confirm.png)
97
-
98
-Click **Change**. Your Photon OS VM is ready to power on.
99
-
100
-## Step 4: Power on the VM
101
-
102
-Power on the Photon OS VM. Fusion may ask you whether you want to upgrade this VM.
103
-
104
-![Upgrade VM](images/fs-ova-upgrade.png)
105
-
106
-How you respond depends on which hardware version (13 or 11) that you want to use. Upgrade if you need to use devices supported only in hardware version 13. Don't upgrade if you want to be compatible with older tools that are supported in hardware version 11.
107
-
108
-## Step 5: Update Login Credentials
109
-
110
-![Splash screen](images/fs-ova-splash.png)
111
-
112
-After the VM is booted, Fusion prompts you to log in.
113
-
114
-**Note** : Because of limitations within OVA support on Fusion, it was necessary to specify a default password for the OVA option. However, all Photon OS instances that are created by importing the OVA will require an immediate password change upon login. The default account credentials are:
115
-
116
-| **Setting** | **Value** |
117
-| --- | --- |
118
-| Username | ``root`` |
119
-| Password | ``changeme`` |
120
-
121
-After you provide these credentials, Fusion prompts you to create a new password and type it a second time to verify it. For security, Photon OS forbids common dictionary words for the root password. Once logged in, you will see the shell prompt.
122
-
123
-![Login](images/fs-ova-login.png)
124
-
125
-Once complete, proceed to [Deploying a Containerized Application in Photon OS](#deploying-a-containerized-application-in-photon-os).
126
-
127
-# Installing the ISO Image for Photon OS 2.0
128
-
129
-After you have downloaded the latest Photon OS ISO image into a folder of your choice, open VMware Fusion.
130
-
131
-## Step 1: Start the Installation Process
132
-
133
-From the File menu, choose  **New**.
134
-
135
-![Installation](images/fs-iso-new.png)
136
-
137
-From the Select the Installation Method dialog, select **Install from disc or image**, and then choose **Continue**.
138
-
139
-![Installation method](images/fs-iso-new-prompt.png)
140
-
141
-## Step 2: Select the ISO Image
142
-
143
-Drag a disc image onto the window or choose **Use another disc or disc image...**, choose the ISO file you want, and then choose **Continue**.
144
-
145
-![ISO image](images/fs-iso-new-selected.png)
146
-
147
-## Step 3: Select the Operating System
148
-
149
-On the Choose Operating System dialog, select **Linux**  in the left-hand column and **VMware Photon 64-bit**  in the right-hand column.
150
-
151
-![Operating system](images/fs-iso-os.png)
152
-
153
-Choose **Continue**.
154
-
155
-## Step 4: Select the Virtual Disk (Optional)
156
-
157
-If you are using a Fusion version that is older than Fusion 8, you might see the following dialog.
158
-
159
-![Virtual disk](images/fs-iso-virtual-disk.png)
160
-
161
-If you see this dialog, unless you're installing into an existing machine, choose **Create a new virtual disk**  from the Choose a Virtual Disk dialog, and then choose **Continue**.
162
-
163
-**Note:** Fusion v8 and later automatically defaults to creating a new 8GB disk and formats it automatically. If you want to use an existing disk, or if you want to pre-allocate all 8GB, go into VM Settings, choose **Add Device**, and choose either **New Hard Disk** or **Existing Hard Disk**. Expand **Advanced options**  and configure whether you want to pre-allocate disk space (disabled by default) or split into multiple files (enabled by default).
164
-
165
-## Step 5: Configure VM Settings
166
-
167
-**Important:** Before you finish creating the Photon OS Virtual Machine, we strongly recommend that you customize the virtual machine and remove any unwanted devices that are not needed for a container run-time environment.
168
-
169
-![VM settings](images/fs-iso-finish.png)
170
-
171
-To remove unnecessary devices, choose **Customize Settings**.
172
-
173
-First, choose a name for your Virtual Machine, along with the folder into which you create the Virtual Machine (or accept the default folder).
174
-
175
-![Custom settings](images/fs-iso-name.png)
176
-
177
-Choose **Save**. The virtual machine will be created. The Settings screen allows you to customize virtual hardware for the new virtual machine. If it does not automatically appear, open **Settings** from the Virtual Machine menu bar.
178
-
179
-![Settings](images/fs-iso-settings.png)
180
-
181
-You can remove (recommended) the following components that are not used by Photon OS:
182
-
183
-- Select **Display** and ensure that the **Accelerate 3D Graphics** option is unchecked (it should be unchecked, by default). Select **Show All** to return to the VM Settings.
184
-- Select **CD/DVD (IDE)** and ensure that the **Connect CD/DVD Drive** box is checked (it should be checked by default). Select **Show All** to return to the VM Settings.
185
-- Select **Sound Card**, un-check the **Connect Sound Card** Option, and click **Remove Sound Card.** Choose **Remove** to confirm your action. Select **Show All** to return to the VM Settings.
186
-- Select **USB &amp; Bluetooth** and uncheck the **Share Bluetooth devices with Linux** setting. Select **Show All** to return to the VM Settings.
187
-- Select **Printer** and press the **Remove Printer Port** button in the bottom left hand corner. Choose **Remove** to confirm your action. Select **Show All** to return to the VM Settings.
188
-- Select **Camera** and press the **Remove Camera** button in the bottom left hand corner. Choose **Remove** to confirm your action. Select **Show All** to return to the VM Settings.
189
-- Select **Advanced** and ensure that the **Pass Power Status to VM** option is unchecked (it should be unchecked, by default). Select **Show All,** but do not close the VM Settings window.
190
-
191
-By default, Photon OS is configured with a disk size of 8GB. However, Photon OS uses only the portion of disk space it needs, usually much less that the entire disk size. If you want to pre-allocate the entire disk size (reserving it entirely for Photon OS instead), select **Hard Disk**, expand **Advanced options**, and check **Pre-allocate disk space** (by default, it is unchecked). Select **Show All** to return to the VM Settings.
192
-
193
-## Step 6: Configure a Secure Boot (Optional)
194
-
195
-**Note:**  If you want to configure a secure boot for the Photon OS VM you created, edit its .vmx file  and add the following line:
196
-
197
-**firmware = "efi"**
198
-
199
-The EFI boot ensures that the ISO content is signed by VMware and that the entire stack is secure.
200
-
201
-After you have made the customizations you want, close the Virtual Machine Settings window. You are now ready to boot and begin the installation process.
202
-
203
-## Step 7: Power On the VM
204
-
205
-Return to the Fusion main menu, select the Photon OS Virtual Machine, and click **Start Up** (you can also choose **Start Up** from the Virtual Machine menu).
206
-
207
-Fusion powers on the host and starts the installation. Within a few seconds, Fusion displays the Photon OS installer boot menu.
208
-
209
-![Photon OS installer](images/fs-iso-install.png)
210
-
211
-Press the Enter key on your keyboard to start installing.
212
-
213
-![License](images/fs-iso-license.png)
214
-
215
-Read the License Agreement and press the Enter key to accept.
216
-
217
-## Step 8: Configure the Partition
218
-
219
-The Installer will detect one disk, which should be the 8GB volume configured as part of the virtual machine creation.
220
-
221
-![Partition](images/fs-iso-partition.png)
222
-
223
-Choose **Auto**  to have the installer automatically allocate the partition, or choose **Custom** if you want to configure individual partitions, and then press the Enter key.
224
-
225
-**Note:** If you choose **Custom**, the installer displays the following screen.
226
-
227
-![Custom partition](images/fs-iso-partition-custom.png)
228
-
229
-For each custom partition, choose **Create New**  and specify the following information:
230
-
231
-![New partition](images/fs-iso-partition-new.png)
232
-
233
-**Size** - Preallocated size of this partition, in MB.
234
-
235
-**Type** - One of the following options:
236
-
237
-- **ext3** - ext3 file system
238
-- **ext4** - ext4 file system
239
-- **swap** - swap partition
240
-
241
-**Mountpoint** - Mount point for this partition.
242
-
243
-Choose **OK** and press the Enter key. When you are done defining custom partitions, choose **Next**  and press the Enter key.
244
-
245
-The installer prompts you to confirm that you want to erase the entire disk.
246
-
247
-![Disk erase](images/fs-iso-disk-erase.png)
248
-
249
-Choose **Yes** and press the Enter key to accept and proceed with the installation.
250
-
251
-## Step 9: Select an Installation Option
252
-
253
-After partitioning, the installer prompts you to select one of three installation options:
254
-
255
-![Installation options](images/fs-iso-install-option.png)
256
-
257
-Each install option provides a different run-time environment. Select the option that best meets your requirements.
258
-
259
-| **Option** | **Description** |
260
-| --- | --- |
261
-| **Photon Minimal** | Photon Minimum is a very lightweight version of the container host runtime that is best suited for container management and hosting. There is sufficient packaging and functionality to allow most common operations around modifying existing containers, as well as being a highly performant and full-featured runtime. |
262
-| **Photon Full** | Photon Full includes several additional packages to enhance the authoring and packaging of containerized applications and/or system customization. For simply running containers, Photon Full will be overkill. Use Photon Full for developing and packaging the application that will be run as a container, as well as authoring the container, itself. For testing and validation purposes, Photon Full will include all components necessary to run containers. |
263
-| **Photon OSTree Server** | This installation profile will create the server instance that will host the filesystem tree and managed definitions for rpm-ostree managed hosts created with the "Photon OSTree Host" installation profile. Most environments should need only one Photon OSTree Server instance to manage the state of the Photon OSTree Hosts. Use Photon OSTree Server when you are establishing a new repository and management node for Photon OS hosts. |
264
-
265
-**Note:** The option you choose determines the disk and memory resources required for your installation.
266
-
267
-Select the option you want and press the Enter key.
268
-
269
-## Step 10: Select the Linux Kernel
270
-
271
-The installer prompts you to select the Linux kernel to install:
272
-
273
-![Linux kernel](images/fs-iso-kernel.png)
274
-
275
-- **Hypervisor optimized** means that any components that are not needed for running under a VMware hypervisor have been removed for faster boot times.
276
-- **Generic** means that all components are included.
277
-
278
-## Step 11: Specify the Hostname
279
-
280
-The installer prompts you for a hostname and suggest a randomly generated, unique hostname that you can change if you want.
281
-
282
-![Hostname](images/fs-iso-hostname.png)
283
-
284
-Press the Enter key.
285
-
286
-## Step 12: Specify the System root Password
287
-
288
-_Note: Photon OS will not permit commonly used dictionary words to be set as a root password._
289
-
290
-The installer prompts you to enter the system root password. Type the password, and then press the Enter key.
291
-
292
-![Password](images/fs-iso-root-password.png)
293
-
294
-Confirm the root password by typing it a second time.
295
-
296
-![Password confirmation](images/fs-iso-root-password-confirm.png)
297
-
298
-Press the Enter key. The installer proceeds to install the software. Installation times will vary based on the system hardware and installation options you selected. Most installations complete in less than one minute.
299
-
300
-Once finished, the installer displays a confirmation message (which includes how long it took to install Photon OS) and prompts you to press a key on your keyboard to boot the new VM.
301
-
302
-![Confirmation](images/fs-iso-installed.png)
303
-
304
-## Step 13: Reboot the VM and Log In
305
-
306
-Press any key on the keyboard and the virtual machine will reboot into Photon OS.
307
-
308
-![Reboot](images/fs-iso-splash.png)
309
-
310
-As the initial boot process begins, the installer displays the Photon splash screen, and then a login prompt.
311
-
312
-At the login prompt, enter **root**  as the username and provide the password chosen during the installation.
313
-
314
-![Password](images/fs-iso-login.png)
315
-
316
-You have now successfully setup Photon OS and are ready to use your container run-time environment. Proceed to the next section to deploy a containerized application.
317
-
318
-# Deploying a Containerized Application in Photon OS
319
-
320
-Now that you have your container runtime environment up and running, you can easily deploy a containerized application. For this example, you will deploy the popular open source Web Server Nginx. The Nginx application has a customized VMware package that is published as a dockerfile and can be downloaded, directly, through the Docker module from the Docker Hub.
321
-
322
-## Step 1: Run Docker
323
-
324
-To run Docker from the command prompt, enter the following command, which initializes the docker engine:
325
-
326
-    systemctl start docker
327
-
328
-To ensure Docker daemon service runs on every subsequent VM reboot, enter the following command:
329
-
330
-    systemctl enable docker
331
-
332
-## Step 2: Run the Nginx Web Server
333
-
334
-Now the Docker daemon service is running, it is a simple task to "pull" and start the Nginx Web Server container from Docker Hub. To do this, type the following command:
335
-
336
-    docker run -d -p 80:80 vmwarecna/nginx
337
-
338
-This pulls the Nginx Web Server files and appropriate dependent container filesystem layers required for this containerized application to run.
339
-
340
-![Docker run](images/fs-docker-run.png)
341
-
342
-After the **docker run** process completes, you return to the command prompt. You now have a fully active website up and running in a container.
343
-
344
-## Step 3: Test the Web Server
345
-
346
-To test that your Web Server is active, run the ifconfig command to get the IP address of the Photon OS Virtual Machine.
347
-
348
-![IP Address](images/fs-docker-ifconfig.png)
349
-
350
-The output displays a list of adapters that are connected to the virtual machine. Typically, the web server daemon will be bound on "eth0."
351
-
352
-Start a browser on your host machine and enter the IP address of your Photon OS Virtual Machine. You should see a screen similar to the following example as confirmation that your web server is active.
353
-
354
-![Confirmation](images/fs-docker-confirm.png)
355
-
356
-You can now run any other containerized application from Docker Hub or your own containerized application within Photon OS.
357
-
358
-# Installing Photon OS 1.0
359
-
360
-This section provides setup instructions for Photon OS 1.0.
361
-
362
-## Photon OS 1.0 Prerequisites
363
-In order to install and start using Photon OS with VMware Fusion the following pre-requisites must be satisfied:
364
-* VMware Fusion or VMware Workstation must be installed
365
-* Recommended 2GB of free RAM
366
-* Recommended at least 300MB of free disk space
367
-* Photon OS ISO or OVA
368
-
369
-## Importing the Photon OS 1.0 OVA 
370
-
371
-Using the OVA is the easiest way to create a Photon OS VM. Once you’ve downloaded the OVA, open VMware Fusion and select, “Import …” from the File menu. This will open the “Choose an Existing Virtual Machine” wizard. Use the “Choose File …” button to locate and select the Photon OS OVA.
372
-Note: The “Import” operation is specific to Fusion. For Workstation users, simply double-clicking on the OVA will start the import. 
373
-
374
-![Import](https://cloud.githubusercontent.com/assets/11306358/16094763/4ac80e12-3307-11e6-8e7b-10ea353ddbfc.png)
375
-
376
-Click “Continue” and provide the name and storage location for your Photon OS VM. Then, click "Save."
377
-
378
-![Save](https://cloud.githubusercontent.com/assets/11306358/16094759/4ac50000-3307-11e6-8a34-538f36b95f64.png)
379
-
380
-Clicking “Save” will immediately present the Photon OS EULA. In order to start the import process, you'll need to click "Accept" to accept the EULA. 
381
-
382
-![Accept](https://cloud.githubusercontent.com/assets/11306358/16094758/4ac50668-3307-11e6-86ce-943afa12946f.png)
383
-
384
-Once the import is complete, you should get confirmation that the import was Finished and a summary of the settings for your Photon OS VM. Click “Customize Settings” to change the operating system, as recognized by the hypervisor. Within the "General" System Settings for the newly imported VM, click the selection box next to "OS" and select, "VMware Photon 64-bit," as shown below.
385
-
386
-![Settings](https://cloud.githubusercontent.com/assets/11306358/16095187/24abc4f6-3309-11e6-9faa-c4e7b15ba63a.png) 
387
-
388
-Close the settings window and your Photon OS VM is ready to power on.
389
-
390
-![Confirmation](https://cloud.githubusercontent.com/assets/11306358/16094764/4acf69dc-3307-11e6-9d62-7dd37546a233.png)
391
-
392
-Clicking “Finish” will immediately power on your Photon OS VM. Once the VM is booted, you will be presented with a login prompt. Because of limitations within OVA support on Fusion and Workstation, it was necessary to specify a default password for the OVA option. However, all Photon OS instances that are created by importing the OVA will require an immediate password change upon login. The default account credentials are:
393
-
394
-`Username: root`
395
-`Password: changeme`
396
-
397
-As soon as you enter these credentials, you will be forced to create a new password by entering the new password twice before you can access the shell prompt.
398
-
399
-![Login](https://cloud.githubusercontent.com/assets/11306358/16094765/4ad06ce2-3307-11e6-827f-e61107185f42.png)
400
- 
401
-## Installing Photon OS 1.0 on VMware Fusion from an ISO Image	
402
-With the latest Photon OS ISO image downloaded into a folder of your choice, Open VMware Fusion and Select “File->New.” The following screen will appear: 
403
-
404
-![File->New](https://cloud.githubusercontent.com/assets/11306358/14651747/df593c52-0636-11e6-9cbe-bfd0db9bfa89.png)
405
-
406
-Select "Create a custom virtual machine" from the "Select the Installation Method" dialog, then, click continue. On the "Choose Operating System" dialog, select, "Linux" in the left-hand column and "VMware Photon 64-bit" in the right-hand column. 
407
-
408
-![fusion7](https://cloud.githubusercontent.com/assets/11306358/14651749/df6fbd74-0636-11e6-8070-a584bddf39f5.png)
409
-
410
-Unless you're installing into an existing machine, select, "Create a new virtual disk" from the "Choose a Virtual Disk dialog, then click "Continue."
411
-
412
-![fusion7b](https://cloud.githubusercontent.com/assets/11306358/14651751/df7428a0-0636-11e6-85b2-64e2dff9be84.png)
413
-
414
-You're almost finished; but, before finishing the Photon OS Virtual Machine Creation, we strongly recommend that you customize the virtual machine and remove any unwanted devices that are not needed for a container runtime environment.  
415
-
416
-![fusion9](https://cloud.githubusercontent.com/assets/11306358/14651750/df7385f8-0636-11e6-9310-0d7f375dd7b5.png) 
417
-
418
-To remove unnecessary devices, from the screen shown below, select “Customize Settings."
419
-
420
-First, choose a name for your Virtual Machine and the folder into which you would like to create the Virtual Machine.  If the default folder of “Virtual Machines” is acceptable, click “Save”.  
421
-
422
-![Save](https://cloud.githubusercontent.com/assets/11306358/16105478/724ea650-3350-11e6-8e69-272f6a1f6097.png)
423
-
424
-The virtual machine will be created and a new screen will appear, as shown below, that will allow virtual hardware customization to the new virtual machine. If it does not automatically appear, open "Settings" from the Virtual Machine menu bar. 
425
-
426
-![fusion11](https://cloud.githubusercontent.com/assets/11306358/14653053/cd434ffc-063c-11e6-9861-924489b26d75.png)
427
-
428
-It is our recommendation that the following components are removed, since they’re not used by Photon OS:
429
-* Select “Sound Card” and un-tick the “Connect Sound Card” Option and click "Remove Sound Card." Confirm your action and return to the VM Settings by clicking “Show All.”
430
-* Select “Camera” and press the “Remove Camera” button in the bottom left hand corner, confirm your action and then select “Show All” to return to the VM Settings.
431
-* Select “Printer” and press the “Remove Printer Port” button in the bottom left hand corner, confirm your action and then select “Show All” to return to the VM Settings.
432
-* Select “USB & Bluetooth” and uncheck the “Share Bluetooth devices with Linux” setting and then select “Show All”
433
-* Select “Display” and ensure that the “Accelerate 3D Graphics” option is unchecked (it should be unchecked, by default) and, then, return to the VM Settings by selecting “Show All.”
434
-* Select “Advanced” and ensure that the “Pass Power Status to VM” option is unchecked. Select “Show All," but do not close the VM Settings window.
435
-
436
-At this stage we have now made all the necessary customizations and we are ready to select the Photon OS ISO image to boot and begin the installation process. 
437
-
438
-From the Virtual Machine Settings menu in Fusion, select "CD/DVD (IDE)" and, as shown below, point to the downloaded Photon OS ISO and ensure that there is a check in the "Connect CD/DVD Drive" box.
439
-
440
-![Connect CD/DVD](https://cloud.githubusercontent.com/assets/11306358/16105475/72391e0c-3350-11e6-94a2-64587a06e838.png)
441
-
442
-Return to the Fusion main menu, select the Photon OS Virtual Machine and press the “Play” button to power on the host and start the installation.
443
-Within a few seconds the Photon OS Installer Boot Menu will appear.
444
-
445
-![Boot menu](https://cloud.githubusercontent.com/assets/11306358/16105477/724e902a-3350-11e6-8482-7544d2a6c3fb.png)
446
-
447
-Select – “Install” to proceed. 
448
-
449
-![Install](https://cloud.githubusercontent.com/assets/11306358/16105480/7251abca-3350-11e6-8f8e-d26244fd75ff.png)
450
-
451
-After you accept the EULA, the Installer will detect one disk, which should be the 8GB volume configured as part of the virtual machine creation. Select the disk and press enter.  You will be prompted to confirm it is okay to erase the entire disk, select “Yes” to accept and proceed with the installation.
452
-You will now be presented with four installation options:
453
-
454
-![fusion15](https://cloud.githubusercontent.com/assets/11306358/14651982/d464f31c-0637-11e6-938d-5d6132ccd63f.png)
455
-
456
-Each install option provides a different runtime environment, depending on your requirements:
457
-
458
-* Photon Minimal: Photon Minimum is a very lightweight version of the container host runtime that is best suited for container management and hosting. There is sufficient packaging and functionality to allow most common operations around modifying existing containers, as well as being a highly performant and full-featured runtime. 
459
-
460
-* Photon Full: Photon Full includes several additional packages to enhance the authoring and packaging of containerized applications and/or system customization. For simply running containers, Photon Full will be overkill. Use Photon Full for developing and packaging the application that will be run as a container, as well as authoring the container, itself. For testing and validation purposes, Photon Full will include all components necessary to run containers. 
461
-
462
-* Photon OSTree Host: This installation profile creates a Photon OS instance that will source its packages from a central rpm-ostree server and continue to have the library and state of packages managed by the definition that is maintained on the central rpm-ostree server. Use Photon OStree Hosts when you are interested in experimenting with the concept of a centrally authored and maintained OS version. This concept of treating the OS as a versioned, atomic entity can simplify lifecycle and security management at scale. 
463
-
464
-* Photon OSTree Server: This installation profile will create the server instance that will host the filesystem tree and managed definitions for rpm-ostree managed hosts created with the “Photon OSTree Host” installation profile. Most environments should need only one Photon OSTree Server instance to manage the state of the Photon OSTree Hosts. Use Photon OSTree Server when you are establishing a new repository and management node for Photon OS hosts.  
465
-
466
-For the purposes of this how-to guide, select option 1, “Photon Minimal.”  Once this selection is highlighted, press the Enter key on your keyboard.
467
-
468
-You will now be prompted for a hostname. Photon OS will prepopulate a randomly generated, unique hostname; you can either use this suggestion or enter your own hostname. After selecting a hostname and pressing “Enter,” you will be prompted to first enter and, then, confirm the system root password.
469
-
470
-*Note: Photon OS will not permit commonly used dictionary words to be set as a root password.*
471
-
472
-After confirming the password, the installation process should begin.
473
-Installation times will vary based on system hardware and installation options, but most installations complete in less than one minute. Once the install is complete you will get a confirmation prompt on the screen stating “Congratulations, Photon has been installed in xx secs, Press any key to continue to boot…”  - Press any key and the virtual machine will reboot into Photon OS.
474
-
475
-![Reboot](https://cloud.githubusercontent.com/assets/11306358/16105476/724e70c2-3350-11e6-84af-0c487266108d.png)
476
-
477
-As the initial boot process begins, you will see the Photon splash screen before you are taken to a login prompt.
478
-
479
-![Login](https://cloud.githubusercontent.com/assets/11306358/16094764/4acf69dc-3307-11e6-9d62-7dd37546a233.png)
480
-
481
-At the login prompt, enter “root” as the username and provide the password chosen during the installation. 
482
-
483
-You have now successfully setup Photon OS and are ready to use your container runtime environment.
484
-
485
-## Installing a Containerized Application on Photon OS 1.0
486
-
487
-Now that you have your container runtime environment up and running, you may be wondering, “what can I do now?” A command prompt is not the most exciting!  To help to demonstrate the ease in which you can deploy a containerized application, we will showcase how you can quickly get a Web Server up and running.
488
-For this example, we will use the popular open source Web Server Nginx. The Nginx application has a customized VMware package and published as a dockerfile and can be downloaded, directly, through the Docker module from the Docker Hub.
489
-
490
-To run Docker from the command prompt, enter the command below to initialize the docker engine:
491
-
492
-`systemctl start docker`
493
-
494
-To ensure Docker daemon service runs on every subsequent VM reboot, enter:
495
-
496
-`systemctl enable docker`
497
-
498
-Now the Docker daemon service is running, it is a simple task to “pull” and start the Nginx Web Server container from Docker Hub.  To do this, type the following command:
499
-
500
-`docker run -d -p 80:80 vmwarecna/nginx`
501
-
502
-This will then pull the Nginx Web Server files and appropriate dependent container filesystem layers to ensure this containerized application can run.  You will see a screenshot similar to below, as the container and dependencies are downloaded and the container is prepared to run:
503
-
504
-![fusion19](https://cloud.githubusercontent.com/assets/11306358/9568066/b3950dd8-4f04-11e5-9333-ac0551a22ace.jpg)
505
-
506
-Once “docker run” process is completed, you will be returned to the command prompt.  You now have a fully active website up and running in a container!
507
-
508
-To test that your Web Server is active, we need to get the IP address of the Photon OS Virtual Machine. To get the IP address, enter the following command ifconfig. This will now display a list of adapters connected to the virtual machine.  Typically, the web server daemon will be bound on “eth0.”  
509
- 
510
-Start a browser on your host machine and enter the IP address of your Photon OS Virtual Machine.  The following screen will appear and that will show that your web server is active: -
511
-
512
-![fusion20](https://cloud.githubusercontent.com/assets/11306358/9568067/b3b6e278-4f04-11e5-93f6-de8383530518.jpg)
513
-
514
-You can now run any other containerized application from Docker Hub or your own containerized application within Photon OS.
515 1
deleted file mode 100644
... ...
@@ -1,68 +0,0 @@
1
-# Running Project Photon on vCloud Air
2
-
3
-Most of the contents are generally applicable, but some items have changed slightly. We're working through the catalog of changes. If you see something that's terribly out of sorts or incorrect, kindly either make the edit or raise an issue. Thanks - the Photon OS Team
4
-
5
-## What is Photon OS?
6
-Photon OS is a tech preview of an open source, Linux container host runtime optimized for vSphere. Photon OS is extensible, lightweight, and supports the most common container formats including Docker, Rocket (rkt) and Garden.
7
-Photon OS includes a small footprint, yum-compatible, package-based lifecycle management system – called “tdnf”- and, alternatively, supports an rpm-ostree image-based system versioning.
8
-
9
-When used with development tools and environments such as VMware Fusion, VMware Workstation, HashiCorp (Vagrant and Atlas) and production runtime environment (vSphere, vCloud Air), Photon OS allows seamless migration of container based apps from development to production.  
10
-
11
-## Introduction
12
-This document explains how to get started using Photon OS as a runtime environment for Linux containers by running Photon OS as a VM instance on vCloud Air.  This guide will provide instructions on deploying Photon OS from the vCloud Air public catalog. 
13
-
14
-Once Photon OS is installed, this guide will also provide instructions on how to demonstrate how simple it can be to deploy a containerized application with Docker and will highlight the installation of a web server simply by running one command!
15
-
16
-## Photon OS on vCloud Air Prerequisites
17
-The following items are required for preparing and launching Photon OS on Google Compute Engine:
18
-
19
-* An account on vCloud Air
20
-
21
-With the TP2 release, Photon OS is published in the vCloud Air catalog. Therefore, it is no longer to download a Photon OS image before getting started. 
22
-
23
-## Creating a Photon OS Instance
24
-Begin by logging into your vCloud Air account and selecting the Service into which you'd like to deploy your Photon OS instance. In this example, we'll use the Virtual Private Cloud OnDemand Service. 
25
-
26
-![Photon OS Instance](images/photon-os-instance.png)
27
- 
28
-Once you've selected the Service for your instance, you'll need to specify the Location for your virtual datacenter from the list of vCloud Air locations. Clicking "Continue" will start the process of creating your virtual datacenter, an associated gateway and a routed network. 
29
-
30
-After vCloud Air is finished creating your virtual datacenter, you're ready to click the "Create your first virtual machine" button to create your Photon OS instance. 
31
-
32
-![Create virtual machine](images/create-virtual-machine.png)
33
- 
34
-When you click the "Create your first virtual machine" button, you'll be presented the list of templates available in vCloud Air. Select the "64 Bit" option of VMware Photon OS - Tech Preview 2 and click the "Continue" button.
35
-
36
-![64-bit option](images/64-bit-option.png)
37
- 
38
-Before vCloud Air can create your Photon OS VM, you need to confirm the hardware configuration. The defaults presented are the recommended values; adjust as necessary to accommodate the container workloads that you expect to run in this Photon OS instance. Once you're satisfied with the hardware configuration, click "Create Virtual Machine" Once complete, you should see your powered-on Photon OS instance ready to start the Docker engine and run a container workload.
39
- 
40
-## Installing a Containerized Application to Help Demonstrate Capability
41
-Now that you have your container runtime environment up and running, you may be wondering, “what can I do now?” A command prompt is not the most exciting!  To help to demonstrate the ease in which you can deploy a containerized application, we will showcase how you can quickly get a Web Server up and running.
42
-
43
-For this example, we will use the popular open source Web Server Nginx. The Nginx application has a customized VMware package and published as a dockerfile and can be downloaded, directly, through the Docker module from the Docker Hub.
44
-
45
-To run Docker from the command prompt, enter the command below to initialize the Docker engine:
46
-
47
-`systemctl start docker`
48
-
49
-To ensure Docker daemon service runs on every subsequent VM reboot, enter:
50
-
51
-`systemctl enable docker`
52
-
53
-Now the Docker daemon service is running, you're almost ready to “pull” and start the Nginx Web Server container from Docker Hub.  First, you'll need to ensure that you've configured your vCloud Air VM to be connected to the Internet by following the instructions found, [here](http://vcloud.vmware.com/using-vcloud-air/tutorials/connecting-a-virtual-machine-to-recieve-data-from-the-internet).  Once your Photon OS VM is connected to the Internet, the Docker engine can pull images from the Docker hub; to pull down the VMware-modified nginx container, type the following command:
54
-
55
-`docker run -d -p 80:80 vmwarecna/nginx`
56
-
57
-This will then pull the Nginx Web Server files and appropriate dependent containers to ensure this containerized application can run.  You will see a screenshot similar to below, as the container and dependencies are downloaded and the container is prepared to run:
58
- 
59
-Once “docker run” process is completed, you will be returned to the command prompt.  You now have a fully active website up and running through typing just a single command within Photon OS using containers.
60
-
61
-To test that your Web Server is active, we need to get the IP address of the Photon OS Virtual Machine. To get the IP address, enter the following command 'ifconfig'. This command will display a list of network adapters connected to the virtual machine.  Typically, the web server daemon will be bound on “eth0;” record the IP address associated with eth0. Alternatively, visit the network tab of the status page of your Photon OS instance where the IP address is listed under “Virtual Machine IP."
62
- 
63
-Start a browser on your host machine and enter the IP address of your Photon OS Virtual Machine.  The following screen should appear and that will show that your web server is active:
64
- 
65
-You can now run any other containerized application from Docker Hub or your own containerized application within Photon OS.
66
-
67
-
68
-
... ...
@@ -5,30 +5,52 @@
5 5
 ----
6 6
 
7 7
 - [Introduction](README.md)
8
+    - [Quick Start Links](photon_quickstart.md)
8 9
 - [Overview](Overview.md)
9 10
     - [Introduction to Photon OS](Introduction.md) 
10
-- [Getting Started Guides](getting-started-guides.md)
11
-    - [Downloading Photon OS](Downloading-Photon-OS.md)
12
-    -  [Quick Start](photon-admin-guide.md#getting-started-with-photon-os-20)
13
-    -  [Running Photon OS on vSphere](Running-Photon-OS-on-vSphere.md)
14
-    -  [Running Photon OS on Fusion](Running-Project-Photon-on-Fusion.md)
15
-    -  [Running Photon OS on Workstation](Running-Photon-OS-on-Workstation.md)
16
-    -  [Running Photon OS on AWS EC2](Running-Photon-OS-on-Amazon-Elastic-Cloud-Compute.md)
17
-    -  [Running Photon OS on Microsoft Azure](Running-Photon-OS-on-Microsoft-Azure.md)
18
-    -  [Running Photon OS on Google Compute Engine](Running-Photon-OS-on-Google-Compute-Engine.md)
19
-        -  [Photon OS on GCE](gce.md)      
20
-- [Photon OS Administration Guide](photon_admin/README.md)
21
-    -  [Examining the Packages in the SPECS Directory on Github](photon_admin/examining_packages_spec_dir.md)
22
-    -  [Looking at the Differences Between the Minimal and the Full Version](photon_admin/differences_between_minimal_and_full_version.md)
23
-        -   [The Root Account and the `sudo` and `su` Commands](photon_admin/root_account_and_sudo_commands.md)
24
-    -   [Tiny DNF for Package Management](photon_admin/tiny-dnf-for-package-management.md)
25
-        -   [Configuration Files and Repositories](photon_admin/configuration-files-and-repositories.md)
26
-        -   [Options for Commands](photon_admin/options-for-commands.md)
27
-        -   [Commands](photon_admin/commands.md)
28
-        -   [Adding a New Repository](photon_admin/adding-a-new-repository.md)
29
-        -   [Adding the Dev Repository to Get New Packages from the GitHub Dev Branch](photon_admin/adding-the-dev-repository.md)
30
-    -   [Managing Services with systemd](photon_admin/managing-services-with-systemd.md)
31
-        -   [Using the Photon Management Daemon](photon_admin/using-the-photon-management-daemon.md)
11
+    - [Versions](PhotonOS-versions.md)
12
+    - [Features](features.md)
13
+- [Installation Guide](photon_installation/README.md)
14
+    - [Downloading Photon OS](photon_installation/Downloading-Photon-OS.md)
15
+    - [Build an ISO from the source code for Photon OS](photon_installation/build-photon.md)
16
+    - [Running Photon OS on vSphere](photon_installation/Running-Photon-OS-on-vSphere.md)
17
+    - [Running Photon OS on Fusion](photon_installation/Running-Project-Photon-on-Fusion.md)
18
+    - [Running Photon OS on Workstation](photon_installation/Running-Photon-OS-on-Workstation.md)
19
+    - [Running Photon OS on AWS EC2](photon_installation/Running-Photon-OS-on-Amazon-Elastic-Cloud-Compute.md)
20
+    - [Running Photon OS on Microsoft Azure](photon_installation/Running-Photon-OS-on-Microsoft-Azure.md)
21
+    - [Running Photon OS on Google Compute Engine](photon_installation/Running-Photon-OS-on-Google-Compute-Engine.md)
22
+        -  [Photon OS on GCE](photon_installation/gce.md)
23
+    - [Installing and Using Lightwave on Photon OS](photon_installation/Installing-and-Using-Lightwave-on-Photon-OS.md)
24
+        - [Installing the Lightwave Server and Configuring It as a Domain Controller on a Photon Image](photon_installation/Installing-Lightwave-Server-and-Setting-Up-a-Domain.md) 
25
+        - [Installing the Lightwave Client on a Photon Image and Joining the Client to a Domain](photon_installation/Installing-Lightwave-Client-and-Joining-a-Domain.md)
26
+        - [Installing the Photon Management Daemon on a Lightwave Client](photon_installation/Installing-the-Photon-Management-Daemon-on-a-Lightwave-Client.md)
27
+        - [Remotely Upgrade a Single Photon OS Machine With Lightwave Client and Photon Management Daemon Installed](photon_installation/Remotely-Upgrade-a-Photon-OS-Machine-With-Lightwave-Client-and-Photon-Management-Daemon-Installed.md)
28
+        - [Remotely Upgrade Multiple Photon OS Machines With Lightwave Client and Photon Management Daemon Installed](photon_installation/Remotely-Upgrade-Photon-OS-Machine-With-Lightwave-Client-and-Photon-Management-Daemon-Installed.md)
29
+    - [Photon Management Daemon](photon_installation/using-the-photon-management-daemon.md)
30
+        - [Installing the pmd Package](photon_installation/installing_pmd_package.md)
31
+        - [Available APIs](photon_installation/available_apis.md)
32
+    - [Command-line Interfaces](photon_installation/command-line_interfaces.md)
33
+        - [Photon Management Daemon Command-line Interface (pmd-cli)](photon_installation/pmd-cli.md)
34
+        - [Photon Network Manager Command-line Interface (netmgr)](photon_installation/netmgr-cli.md)   
35
+- [Administration Guide](photon_admin/README.md)
36
+    - [Photon OS Packages](photon_admin/photon_os_packages.md) 
37
+        - [Examining the Packages in the SPECS Directory on Github](photon_admin/examining_packages_spec_dir.md)
38
+        - [Looking at the Differences Between the Minimal and the Full Version](photon_admin/differences_between_minimal_and_full_version.md)
39
+        - [The Root Account and the `sudo` and `su` Commands](photon_admin/root_account_and_sudo_commands.md)
40
+        -  [Photon OS Package Repositories](photon_admin/photon-os-package-repositories.md)
41
+        -  [Examining Signed Packages](photon_admin/signed-packages.md)
42
+        -  [Building a Package from a Source RPM](photon_admin/building-a-package-from-a-source-rpm.md)
43
+        -  [Compiling C++ Code on the Minimal Version of Photon OS](photon_admin/compiling-c-code-on-the-minimal-version-of-photon-os.md)
44
+    - [Package Management in Photon OS with `tdnf`](photon_admin/package_management.md)  
45
+        - [Introduction to `tdnf`](photon_admin/tdnf.md)
46
+        - [Configuration Files and Repositories](photon_admin/configuration-files-and-repositories.md)
47
+        - [Adding a New Repository](photon_admin/adding-a-new-repository.md)
48
+        - [Configure a Repository](photon_admin/configure-a-repository.md)
49
+        - [Adding the Dev Repository to Get New Packages from the GitHub Dev Branch](photon_admin/adding-the-dev-repository.md)
50
+        - [Standard Syntax for `tdnf` Commands](photon_admin/standard_tdnf_syntax.md)
51
+            -   [Options for Commands](photon_admin/options-for-commands.md)
52
+            -   [Commands](photon_admin/commands.md)
53
+    - [Managing Services with systemd](photon_admin/managing-services-with-systemd.md)
32 54
         -   [Viewing Services](photon_admin/viewing-services.md)
33 55
         -   [Controlling Services](photon_admin/controlling-services.md)
34 56
         -   [Creating a Startup Service](photon_admin/creating-a-startup-service.md)
... ...
@@ -36,7 +58,9 @@
36 36
         -   [Auditing System Events with auditd](photon_admin/auditing-system-events-with-auditd.md)
37 37
         -   [Analyzing systemd Logs with journalctl](photon_admin/analyzing-systemd-logs-with-journalctl.md)
38 38
         -   [Migrating Scripts to systemd](photon_admin/migrating-scripts-to-systemd.md)
39
+        -   [Installing Sendmail](photon_admin/installing-sendmail.md)
39 40
     -   [Managing the Network Configuration](photon_admin/managing-the-network-configuration.md)
41
+        -   [Commands to Manage Network Service](photon_admin/network_management_commands.md)
40 42
         -   [Using the Network Configuration Manager](photon_admin/using-the-network-configuration-manager.md)
41 43
         -   [Use `ip` and `ss` Commands Instead of `ifconfig` and `netstat`](photon_admin/use-ip-and-ss-commands.md)
42 44
         -   [Configuring Network Interfaces](photon_admin/configuring-network-interfaces.md)
... ...
@@ -44,47 +68,39 @@
44 44
         -   [Turning Off DHCP](photon_admin/turning-off-dhcp.md)
45 45
         -   [Adding a DNS Server](photon_admin/adding-a-dns-server.md)
46 46
         -   [Setting Up Networking for Multiple NICs](photon_admin/setting-up-networking-for-multiple-nics.md)
47
-        -   [Combining DHCP and Static IP Addresses with IPv4 and IPv6](photon_admin/combining-dhcp-and-static-ip-addresses-with-ipv4-and-ipv6.md)
47
+            -   [Combining DHCP and Static IP Addresses with IPv4 and IPv6](photon_admin/combining-dhcp-and-static-ip-addresses-with-ipv4-and-ipv6.md)
48 48
         -   [Clearing the Machine ID of a Cloned Instance for DHCP](photon_admin/clearing-the-machine-id-of-a-cloned-instance-for-dhcp.md)
49 49
         -   [Using Predictable Network Interface Names](photon_admin/using-predictable-network-interface-names.md)
50 50
         -   [Inspecting the Status of Network Links with `networkctl`](photon_admin/inspecting-the-status-of-network-links-with-networkctl.md)
51
-        -   [Turning on Network Debugging](photon_admin/turning-on-network-debugging.md)
51
+        -   [Network Debugging](photon_admin/turning-on-network-debugging.md)
52 52
         -   [Mounting a Network File System](photon_admin/mounting-a-network-file-system.md)
53 53
         -   [Installing the Packages for tcpdump and netcat with tdnf](photon_admin/installing-the-packages-for-tcpdump-and-netcat-with-tdnf.md)
54
+        - [Network Configuration Manager - C API](photon_admin/netmgr.c.md)
55
+        - [Network Configuration Manager - Python API](photon_admin/netmgr.python.md)
54 56
     -   [Cloud-Init on Photon OS](photon_admin/cloud-init-on-photon-os.md)
55
-        -   [Creating a Stand-Alone Photon Machine with cloud-init](photon_admin/creating-a-stand-alone-photon-machine-with-cloud-init.md)
57
+        - [Deploy Photon OS With `cloud-init`](photon_admin/deploy_photon_with_cloud-init.md  
58
+        - [Creating a Stand-Alone Photon Machine with cloud-init](photon_admin/creating-a-stand-alone-photon-machine-with-cloud-init.md)
56 59
         -   [Customizing a Photon OS Machine on EC2](photon_admin/customizing-a-photon-os-machine-on-ec2.md)
57 60
         -   [Running a Photon OS Machine on GCE](photon_admin/running-a-photon-os-machine-on-gce.md)
58
-    -   [Docker Containers](photon_admin/docker-containers.md)
59
-    -   [Kubernetes](photon_admin/kubernetes.md)
60
-    -   [Installing Sendmail](photon_admin/installing-sendmail.md
61
+    -   [Containers](photon_admin/photon_os_containers.md)
62
+        - [Docker Containers](photon_admin/docker-containers.md)
63
+        - [Kubernetes](photon_admin/kubernetes.md)
61 64
     -   [Changing the Locale](photon_admin/changing-the-locale.md)
62
-    -   [The Default Security Policy of Photon OS](photon_admin/default-security-policy-of-photon-os.md)
65
+    -   [Security Policy](photon_admin/default-security-policy-of-photon-os.md)
63 66
         -   [Default Firewall Settings](photon_admin/default-firewall-settings.md)
64 67
         -   [Default Permissions and umask](photon_admin/default-permissions-and-umask.md)
65
-    -   [Disabling TLS 1.0 to Improve Transport Layer Security](photon_admin/disabling-tls.md)
66
-    -   [Working with Repositories and Packages](photon_admin/working-with-repositories-and-packages.md)
67
-        -   [Photon OS Package Repositories](photon_admin/photon-os-package-repositories.md)
68
-        -   [Examining Signed Packages](photon_admin/signed-packages.md)
69
-        -   [Building a Package from a Source RPM](photon_admin/building-a-package-from-a-source-rpm.md)
70
-        -   [Compiling C++ Code on the Minimal Version of Photon OS](photon_admin/compiling-c-code-on-the-minimal-version-of-photon-os.md)
71
-    - [Photon Management Daemon Command-line Interface (pmd-cli)](photon_admin/pmd-cli.md)
72
-    - [Network Configuration Manager - C API](photon_admin/netmgr.c.md)
73
-    - [Photon Network Manager Command-line Interface (netmgr)](photon_admin/netmgr-cli.md)
74
-    - [Network Configuration Manager - Python API](photon_admin/netmgr.python.md)
75
-    - [Managing Packages in Photon OS with tdnf](photon_admin/tdnf.md)
76
-- [How-To Guides](how-to-guides.md)
77
-    - [Setting Up a Network PXE Boot Server](PXE-boot.md)
78
-    - [Working with Kickstart](kickstart.md)
79
-    - [Running Kubernetes](kubernetes.md)
80
-    - [Mounting Remote File Systems](nfs-utils.md)
81
-    - [Building Photon OS from the Source Code](build-photon.md)
82
-    - [Installing and Using Lightwave on Photon OS](Installing-and-Using-Lightwave-on-Photon-OS.md)
83
-        - [Installing the Lightwave Server and Configuring It as a Domain Controller on a Photon Image](Installing-Lightwave-Server-and-Setting-Up-a-Domain.md) 
84
-        - [Installing the Lightwave Client on a Photon Image and Joining the Client to a Domain](Installing-Lightwave-Client-and-Joining-a-Domain.md)
85
-        - [Installing the Photon Management Daemon on a Lightwave Client](Installing-the-Photon-Management-Daemon-on-a-Lightwave-Client.md)
86
-        - [Remotely Upgrade a Single Photon OS Machine With Lightwave Client and Photon Management Daemon Installed](Remotely-Upgrade-a-Photon-OS-Machine-With-Lightwave-Client-and-Photon-Management-Daemon-Installed.md)
87
-        - [Remotely Upgrade Multiple Photon OS Machines With Lightwave Client and Photon Management Daemon Installed](Remotely-Upgrade-Photon-OS-Machine-With-Lightwave-Client-and-Photon-Management-Daemon-Installed.md)
88
-- [Troubleshooting](photon-os-troubleshooting-guide.md)
68
+        -   [Disabling TLS 1.0 to Improve Transport Layer Security](photon_admin/disabling-tls-1.0.md)      
69
+- [User Guide](photon_user/README.md)
70
+    - [Setting Up a Network PXE Boot Server](photon_user/PXE-boot.md)
71
+    - [Working with Kickstart](photon_user/kickstart.md)
72
+    - [Kubernetes on Photon OS](photon_user/kubernetes_intro.md)
73
+        - [Prerequisites](photon_user/prerequisites.md)
74
+        - [Running Kubernetes on Photon OS](photon_user/running_kubernetes.md)
75
+            - [System Information](photon_user/system_information.md)
76
+            - [Prepare the Hosts](photon_user/prepare_the_hosts.md)
77
+            - [Configure Kubernetes Services on Master](photon_user/configure_kubernetes_on_master.md)
78
+            - [Configure Kubernetes Services on Node](photon_user/configure_kubernetes_on_node.md)
79
+    - [Mounting Remote File Systems](photon_user/nfs-utils.md)
80
+- [Troubleshooting](photon_troubleshoot/README.md)
89 81
 - [Frequently Asked Questions](Frequently-Asked-Questions.md)
90 82
 * [Security Advisories](https://github.com/vmware/photon/wiki/Security-Advisories)
91 83
\ No newline at end of file
92 84
deleted file mode 100644
... ...
@@ -1,91 +0,0 @@
1
-# Building an ISO from the Source Code for Photon OS
2
-
3
-This document describes how to build an ISO from the source code for Photon OS, the open-source minimalist Linux operating system from VMware that is optimized for cloud computing platforms, VMware vSphere deployments, and applications native to the cloud. 
4
-
5
-## Folder Layout
6
-
7
-Here is the structure of the directories on GitHub that contain the source code for Photon OS:
8
-
9
-```
10
-photon/
11
-├── Makefile
12
-├── README
13
-├── Dockerfile
14
-├── Vagrantfile
15
-├── SPECS        # RPM SPEC files
16
-├── common       # Build, packaging config
17
-├── docs         # Documentation
18
-├── installer    # Installer used at runtime
19
-├── support      # Build scripts
20
-└── tools
21
-```
22
-
23
-## How to Build the ISO
24
-
25
-The following process for building the ISO assumes that the following prerequisites are in place:
26
-
27
-* A build operating system running the 64-bit version of Ubuntu 14.04 or later
28
-* Packages: bison, gawk, g++, createrepo, python-aptdaemon, genisoimage, texinfo, python-requests
29
-* Docker
30
-* Downloaded the source code from the Photon OS repository on GitHub into `$HOME/workspaces/photon`.
31
-
32
-Here's how to install the packages on Ubuntu: 
33
-
34
-```
35
-sudo apt-get -y install bison gawk g++ createrepo python-aptdaemon genisoimage texinfo python-requests libfuse-dev libssl-dev uuid-dev libreadline-dev kpartx git bc
36
-```
37
-Here's how to get Docker:
38
-```
39
-wget -qO- https://get.docker.com/ | sh
40
-```
41
-
42
-Here's how to make the ISO, assuming you checked out the workspace under `$HOME/workspaces/photon`:
43
-```
44
-cd $HOME/workspaces/photon
45
-sudo make iso
46
-```
47
-The ISO is created at `$HOME/workspaces/photon/stage/photon.iso`
48
-
49
-
50
-## How to Use the Cached Toolchain and RPMS
51
-```
52
-mkdir $HOME/photon-cache
53
-sudo make iso PHOTON_CACHE_PATH=$HOME/photon-cache
54
-```
55
-Directory format of `PHOTON_CACHE_PATH` is as follows.
56
-```
57
-photon-cache/
58
-├──tools-build.tar.gz
59
-├──RPMS/x86-64/*.rpm
60
-└──RPMX/noarch/*.rpm
61
-```
62
-## How to Use Cached Sources
63
-```
64
-mkdir $HOME/photon-sources
65
-sudo make iso PHOTON_SOURCES_PATH=$HOME/photon-sources
66
-```
67
-Directory format of `PHOTON_SOURCES_PATH` is as follows.
68
-```
69
-photon-sources/
70
-├──src1.tar.gz
71
-├──src2.tar.gz
72
-└──...
73
-```
74
-
75
-## Where are the Build Logs?
76
-```
77
-$HOME/workspaces/photon/stage/LOGS
78
-```
79
-
80
-## Building RPMs from their Source RPMs
81
-
82
-For instructions on how to install and build a package on Photon OS from the package's source RPM, see the [Photon OS Administration Guide](https://github.com/vmware/photon/blob/master/docs/photon-admin-guide.md#building-a-package-from-a-source-rpm).
83
-
84
-## Complete Build Environment Using Vagrant
85
-A `Vagrantfile` is available to ensure a quick standup of a development or build environment for Photon. This Vagrantfile uses a box called `photon-build-machine` that is created through a [Packer](http://packer.io) template available under `support/packer-templates`; see the [README.md](https://github.com/vmware/photon/blob/master/support/packer-templates/README.md) for more information on how to build `photon-build-machine`.
86
-
87
-## Photon Vagrant Box
88
-As with the build-machine a Packer template is available under `support/packer-templates` to build a Photon based Vagrant box running Docker, see the [README.md](https://github.com/vmware/photon/blob/master/support/packer-templates/README.md) for more information on how to build it. 
89
-
90
-## Automated Build Environment and Vagrant Boxes
91
-Convenience `make` targets also exist to build both the `photon-build-machine` and the `photon` Packer templates as well as building a fresh ISO using the `photon-build-machine`. See the [README.md](https://github.com/vmware/photon/blob/master/support/packer-templates/README.md) for details.
92 1
new file mode 100644
... ...
@@ -0,0 +1,15 @@
0
+# Features
1
+
2
+The two distinguishing features of Photon OS are as follows:
3
+
4
+- It manages services with systemd. 
5
+    
6
+    By using systemd, Photon OS adopts a contemporary Linux standard to manage system services. Photon OS bootstraps the user space and concurrently starts services with systemd. The systemctl utility controls services on Photon OS. For example, instead of running the /etc/init.d/ssh script to stop and start the OpenSSH server on a init.d-based Linux system, you run the following systemctl commands on Photon OS: 
7
+        
8
+    - systemctl stop sshd
9
+    - systemctl start sshd
10
+
11
+
12
+- It manages packages with an open source, yum-compatible package manager called tdnf for Tiny DNF.
13
+    
14
+    Tdnf keeps the operating system as small as possible while preserving yum's robust package-management capabilities. On Photon OS, tdnf is the default package manager for installing new packages. It is a C implementation of the DNF package manager. 
0 15
deleted file mode 100644
... ...
@@ -1,151 +0,0 @@
1
-# Photon OS on GCE
2
-
3
-## Google Compute Engine (GCE) Image background
4
-GCE is a service that lets you run virtual machines on Google's infrastructure. You can customize the virtual machine as much as you want, and you can even install your own custom operating system image. Or, you can adopt one of the public [images](https://cloud.google.com/compute/docs/operating-systems/) provided by Google. For any operating system to work with GCE, it must match Google's infrastructure needs. 
5
-Google provides tools that VM instances require to work correctly on GCE:
6
-
7
- *   __[Google startup scripts](https://cloud.google.com/compute/docs/startupscript)__: User can provide some startup script to configure their instances at startup.
8
- *   __[Google Daemon](https://cloud.google.com/compute/docs/metadata)__: Google Daemon creates new accounts and configures ssh to accept public keys using the metadata server.
9
- *   __[Google Cloud SDK](https://cloud.google.com/sdk/)__: Command line tools to manage your images, instances and other objects on GCE.
10
-
11
-Following is the list (extracted from [this link](https://cloud.google.com/compute/docs/tutorials/building-images)) of items that must be done to make Photon OS work on GCE:
12
-
13
- *   Install Google Compute Engine Image packages
14
- *   Install Google Cloud SDK
15
- *   Change GPT partition table to MBR 
16
- *   Update the Grub config for new MBR and serial console output
17
- *   Update ssh configuration
18
- *   Delete ssh host keys
19
- *   Set the time zone to UTC
20
- *   Use the Google NTP server
21
- *   Delete the hostname file.
22
- *   Add Google hosts /etc/hosts
23
- *   Set MTU to 1460. SSH will not work without it.
24
- *   Create /etc/ssh/sshd_not_to_be_run with just the contents “GOOGLE\n”.
25
-
26
-## The GCE-Ready Image of Photon OS 
27
-
28
-The latest version of Photon OS does all of this for you. It bundles the Google startup scripts, daemon, and cloud SDK into a GCE-ready image that has been modified to meet the configuration requirements of GCE. To download the GCE-ready image of Photon OS for free, go to [Bintray](https://bintray.com/vmware/photon/). To use Photon OS with GCE, you do not need to perform the following steps unless you want to go through the exercise of customizing Photon OS to work with GCE. The Photon OS team has already done it for you. For more information, see [Running Photon OS on Google Compute Engine](Running-Photon-OS-on-Google-Compute-Engine.md). 
29
-
30
-## Creating Photon image for GCE
31
-### 1. Prepare Photon Disk
32
-#### Install Photon Minimal on Fusion/Workstation and install some required packages.
33
-      mount /dev/cdrom /media/cdrom
34
-      tdnf install yum
35
-      tdnf install python2-libs
36
-      yum install ntp sudo wget tar which gptfdisk sed findutils grep gzip --nogpgcheck -y
37
-
38
-#### Photon installer installs GPT partition table by default but GCE only accepts MBR(msdos) type partition table. We need to convert GPT to MBR and update the grub. Following are commands to do that.
39
-  
40
-      # Change partition table to MBR from GPT
41
-      sgdisk -m 1:2 /dev/sda
42
-      grub2-install /dev/sda
43
-      
44
-      # Enable serial console on grub for GCE.
45
-      cat << EOF >> /etc/default/grub
46
-      GRUB_CMDLINE_LINUX="console=ttyS0,38400n8"
47
-      GRUB_TERMINAL=serial
48
-      GRUB_SERIAL_COMMAND="serial --speed=38400 --unit=0 --word=8 --parity=no --stop=1"
49
-      EOF
50
-      
51
-      # Create new grub.cfg based on the settings in /etc/default/grub
52
-      grub2-mkconfig -o /boot/grub2/grub.cfg
53
-      
54
-### 2. Install Google Cloud SDK and GCE Packages
55
-      yum install google-daemon google-startup-scripts
56
-      cp /usr/lib/systemd/system/google* /lib/systemd/system/
57
-      cd /lib/systemd/system/multi-user.target.wants/
58
-      
59
-      # Create links in multi-user.target to auto-start these scripts and services.
60
-      for i in ../google*; do  ln -s $i `basename $i`; done
61
-      
62
-      cd /tmp/; wget https://dl.google.com/dl/cloudsdk/release/google-cloud-sdk.tar.gz --no-check-certificate
63
-      tar -xf google-cloud-sdk.tar.gz
64
-      cd google-cloud-sdk
65
-      ./install.sh
66
-### 3. Update /etc/hosts file with GCE values
67
-      echo "169.254.169.254 metadata.google.internal metadata" >> /etc/hosts
68
-### 4. Remove all servers from ntp.conf and add Google's ntp server.
69
-      sed -i -e "/server/d" /etc/ntp.conf
70
-      cat /etc/ntp.conf
71
-      echo "server 169.254.169.254" >> /etc/ntp.conf
72
-      # Create ntpd.service to auto starting ntp server.
73
-      cat << EOF >> /lib/systemd/system/ntpd.service
74
-      [Unit]
75
-      Description=Network Time Service
76
-      After=network.target nss-lookup.target
77
-
78
-      [Service]
79
-      Type=forking
80
-      PrivateTmp=true
81
-      ExecStart=/usr/sbin/ntpd -g -u ntp:ntp
82
-      Restart=always
83
-      
84
-      [Install]
85
-      WantedBy=multi-user.target
86
-      EOF
87
-      
88
-      # Add link in multi-user.target.wants to auto start this service.
89
-      cd /lib/systemd/system/multi-user.target.wants/
90
-      ln -s ../ntpd.service ntpd.service
91
-      
92
-### 5. Set UTC timezone
93
-      ln -sf /usr/share/zoneinfo/UTC /etc/localtime
94
-
95
-### 6. Update /etc/resolv.conf
96
-      echo "nameserver 8.8.8.8" >> /etc/resolv.conf
97
-
98
-### 7. Remove ssh host keys and add script to regenerate them at boot time.
99
-      rm /etc/ssh/ssh_host_*
100
-      # Depending on the installation, you may need to purge the following keys
101
-      rm /etc/ssh/ssh_host_rsa_key*
102
-      rm /etc/ssh/ssh_host_dsa_key*
103
-      rm /etc/ssh/ssh_host_ecdsa_key*
104
-
105
-      sed -i -e "/exit 0/d" /etc/rc.local
106
-      echo "[ -f /etc/ssh/ssh_host_key ] && echo 'Keys found.' || ssh-keygen -A" >> /etc/rc.local
107
-      echo "exit 0" >> /etc/rc.local
108
-      printf "GOOGLE\n" > /etc/ssh/sshd_not_to_be_run
109
-      
110
-      # Edit sshd_config and ssh_config as per instructions on [this link](https://cloud.google.com/compute/docs/tutorials/building-images).
111
-      
112
-### 8. Change MTU to 1460 for network interface.
113
-      # Create a startup service in systemd that will change MTU and exits
114
-      cat << EOF >> /lib/systemd/system/eth0.service
115
-      [Unit]
116
-      Description=Network interface initialization
117
-      After=local-fs.target network-online.target network.target
118
-      Wants=local-fs.target network-online.target network.target
119
-
120
-      [Service]
121
-      ExecStart=/bin/ifconfig eth0 mtu 1460 up
122
-      Type=oneshot
123
-
124
-      [Install]
125
-      WantedBy=multi-user.target
126
-      EOF
127
-      # Make this service auto-start at boot.
128
-      cd /lib/systemd/system/multi-user.target.wants/
129
-      ln -s ../eth0.service eth0.service
130
-
131
-### 9. Pack and Upload to GCE.
132
-#### Shutdown the Photon VM and copy its disk to tmp folder.       
133
-      # You will need to install Google Cloud SDK on host machine to upload the image and play with GCE.
134
-      cp Virtual\ Machines.localized/photon.vmwarevm/Virtual\ Disk.vmdk /tmp/disk.vmdk
135
-      cd /tmp
136
-      # GCE needs disk to be named as disk.raw with raw format.
137
-      qemu-img convert -f vmdk -O raw disk.vmdk disk.raw
138
-      
139
-      # ONLY GNU tar will work to create acceptable tar.gz file for GCE. MAC's default tar is BSDTar which will not work. 
140
-      # On Mac OS X ensure that you have gtar "GNU Tar" installed. exmaple: gtar -Szcf photon.tar.gz disk.raw 
141
-
142
-      gtar -Szcf photon.tar.gz disk.raw 
143
-      
144
-      # Upload
145
-      gsutil cp photon.tar.gz gs://photon-bucket
146
-      
147
-      # Create image
148
-      gcloud compute --project "<project name>" images create "photon-beta-vYYYYMMDD" --description "Photon Beta" --source-uri https://storage.googleapis.com/photon-bucket/photon032315.tar.gz
149
-      
150
-      # Create instance on GCE of photon image
151
-      gcloud compute --project "photon" instances create "photon" --zone "us-central1-f" --machine-type "n1-standard-1" --network "default" --maintenance-policy "MIGRATE" --scopes "https://www.googleapis.com/auth/devstorage.read_only" "https://www.googleapis.com/auth/logging.write" --image "https://www.googleapis.com/compute/v1/projects/photon/global/images/photon" --boot-disk-type "pd-standard" --boot-disk-device-name "photon"
152 1
deleted file mode 100644
... ...
@@ -1,14 +0,0 @@
1
-# Photon OS Getting Started Guides
2
-
3
--   [Downloading Photon OS](Downloading-Photon-OS.md)
4
--   [Quick Start](photon-admin-guide.md#getting-started-with-photon-os-20)
5
--   [Upgrading to Photon OS 2.0](Upgrading-to-Photon-OS-2.0.md)
6
--   [What is New in Photon OS 2.0](What-is-New-in-Photon-OS-2.0.md)
7
--   [Running Photon OS on vSphere](Running-Photon-OS-on-vSphere.md)
8
--   [Running Photon OS on Fusion](Running-Project-Photon-on-Fusion.md)
9
--   [Running Photon OS on Workstation](Running-Photon-OS-on-Workstation.md)
10
--   [Running Photon OS on AWS EC2](Running-Photon-OS-on-Amazon-Elastic-Cloud-Compute.md)
11
--   [Running Photon OS on Microsoft Azure](Running-Photon-OS-on-Microsoft-Azure.md)
12
--   [Running Photon OS on Google Compute Engine](Running-Photon-OS-on-Google-Compute-Engine.md)
13
-    - [Photon OS on GCE](gce.md)
14
-- [Running Project Photon on vCloud Air](Running-Project-Photon-on-vCloud-Air.md) 
15 1
deleted file mode 100644
... ...
@@ -1,18 +0,0 @@
1
-# Photon OS How-To Guides
2
-
3
-- [Setting Up a Swarm Cluster with DNS](Install-and-Configure-a-Swarm-Cluster-with-DNS-Service-on-PhotonOS.md)
4
-- [Setting Up a Mesos Cluster](Install-and-Configure-a-Production-Ready-Mesos-Cluster-on-Photon-OS.md)
5
-- [Setting Up Marathon for a Mesos Cluster](Install-and-Configure-Marathon-for-Mesos-Cluster-on-PhotonOS.md)
6
-- [Setting Up DCOS CLI for Mesos](Install-and-Configure-DCOS-CLI-for-Mesos.md)
7
-- [Setting Up Mesos DNS on a Mesos Cluster](Install-and-Configure-Mesos-DNS-on-a-Mesos-Cluster.md)
8
-- [Setting Up a Network PXE Boot Server](PXE-boot.md)
9
-- [Working with Kickstart](kickstart.md)
10
-- [Running Kubernetes](kubernetes.md)
11
-- [Mounting Remote File Systems](nfs-utils.md)
12
-- [Building Photon OS from the Source Code](build-photon.md)
13
-- [Installing and Using Lightwave on Photon OS](Installing-and-Using-Lightwave-on-Photon-OS.md)
14
-    - [Installing the Lightwave Server and Configuring It as a Domain Controller on a Photon Image](Installing-Lightwave-Server-and-Setting-Up-a-Domain.md) 
15
-    - [Installing the Lightwave Client on a Photon Image and Joining the Client to a Domain](Installing-Lightwave-Client-and-Joining-a-Domain.md)
16
-    - [Installing the Photon Management Daemon on a Lightwave Client](Installing-the-Photon-Management-Daemon-on-a-Lightwave-Client.md)
17
-    - [Remotely Upgrade a Single Photon OS Machine With Lightwave Client and Photon Management Daemon Installed](Remotely-Upgrade-a-Photon-OS-Machine-With-Lightwave-Client-and-Photon-Management-Daemon-Installed.md)
18
-    - [Remotely Upgrade Multiple Photon OS Machines With Lightwave Client and Photon Management Daemon Installed](Remotely-Upgrade-Photon-OS-Machine-With-Lightwave-Client-and-Photon-Management-Daemon-Installed.md)
19 1
new file mode 100644
... ...
@@ -0,0 +1,437 @@
0
+#
1
+# A fatal error has been detected by the Java Runtime Environment:
2
+#
3
+#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x67f59af3, pid=7412, tid=0x000024d8
4
+#
5
+# JRE version: Java(TM) SE Runtime Environment (8.0_121-b13) (build 1.8.0_121-b13)
6
+# Java VM: Java HotSpot(TM) Client VM (25.121-b13 mixed mode windows-x86 )
7
+# Problematic frame:
8
+# C  [awt.dll+0xa9af3]
9
+#
10
+# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
11
+#
12
+# If you would like to submit a bug report, please visit:
13
+#   http://bugreport.java.com/bugreport/crash.jsp
14
+# The crash happened outside the Java Virtual Machine in native code.
15
+# See problematic frame for where to report the bug.
16
+#
17
+
18
+---------------  T H R E A D  ---------------
19
+
20
+Current thread (0x356ee400):  JavaThread "AWT-EventQueue-0" [_thread_in_native, id=9432, stack(0x364e0000,0x36530000)]
21
+
22
+siginfo: ExceptionCode=0xc0000005, reading address 0x00000004
23
+
24
+Registers:
25
+EAX=0x0000000d, EBX=0x860114b6, ECX=0x00000000, EDX=0x02a3f110
26
+ESP=0x3652dec8, EBP=0x73fd6870, ESI=0x35656a28, EDI=0x3a761f58
27
+EIP=0x67f59af3, EFLAGS=0x00010213
28
+
29
+Top of Stack: (sp=0x3652dec8)
30
+0x3652dec8:   67ede936 860114b6 3a761f58 356ee540
31
+0x3652ded8:   3652df98 3652e450 67f0b3db 356ee540
32
+0x3652dee8:   3a761f58 3652e450 67f0b3f2 00000001
33
+0x3652def8:   00000000 00000000 67edbb85 356ee540
34
+0x3652df08:   3652e450 356ee400 00000000 3647cb60
35
+0x3652df18:   06ad8bb8 2395d2f8 0696b330 3a7c6608
36
+0x3652df28:   3652e454 356ee540 00000000 00000212
37
+0x3652df38:   3652e678 04a50044 3652e678 046bfafc 
38
+
39
+Instructions: (pc=0x67f59af3)
40
+0x67f59ad3:   00 00 c3 8b 41 04 8b 80 0c 0c 00 00 c3 8b 01 83
41
+0x67f59ae3:   78 04 08 7e 03 33 c0 c3 8b 49 04 e9 30 eb fe ff
42
+0x67f59af3:   8b 49 04 85 c9 74 05 e9 3e e9 fe ff 33 c0 c2 04
43
+0x67f59b03:   00 8b 49 04 85 c9 74 05 e9 53 e9 fe ff c2 04 00 
44
+
45
+
46
+Register to memory mapping:
47
+
48
+EAX=0x0000000d is an unknown value
49
+EBX=0x860114b6 is an unknown value
50
+ECX=0x00000000 is an unknown value
51
+EDX=0x02a3f110 is an unknown value
52
+ESP=0x3652dec8 is pointing into the stack for thread: 0x356ee400
53
+EBP=0x73fd6870 is an unknown value
54
+ESI=0x35656a28 is an unknown value
55
+EDI=0x3a761f58 is an unknown value
56
+
57
+
58
+Stack: [0x364e0000,0x36530000],  sp=0x3652dec8,  free space=311k
59
+Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
60
+C  [awt.dll+0xa9af3]
61
+
62
+Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
63
+J 9605  sun.java2d.windows.GDIBlitLoops.nativeBlit(Lsun/java2d/SurfaceData;Lsun/java2d/SurfaceData;Lsun/java2d/pipe/Region;IIIIIIIIIZ)V (0 bytes) @ 0x04461f58 [0x04461e90+0xc8]
64
+j  sun.java2d.windows.GDIBlitLoops.Blit(Lsun/java2d/SurfaceData;Lsun/java2d/SurfaceData;Ljava/awt/Composite;Lsun/java2d/pipe/Region;IIIIII)V+33
65
+J 89487 C1 sun.java2d.pipe.DrawImage.blitSurfaceData(Lsun/java2d/SunGraphics2D;Lsun/java2d/pipe/Region;Lsun/java2d/SurfaceData;Lsun/java2d/SurfaceData;Lsun/java2d/loops/SurfaceType;Lsun/java2d/loops/SurfaceType;IIIIIILjava/awt/Color;)V (145 bytes) @ 0x04d0bf40 [0x04d0bd20+0x220]
66
+J 89489 C1 sun.java2d.pipe.DrawImage.renderImageCopy(Lsun/java2d/SunGraphics2D;Ljava/awt/Image;Ljava/awt/Color;IIIIII)Z (147 bytes) @ 0x04d0c75c [0x04d0c640+0x11c]
67
+J 89508 C1 sun.java2d.pipe.DrawImage.copyImage(Lsun/java2d/SunGraphics2D;Ljava/awt/Image;IILjava/awt/Color;)Z (105 bytes) @ 0x0448b870 [0x0448b690+0x1e0]
68
+J 89507 C1 sun.java2d.pipe.DrawImage.copyImage(Lsun/java2d/SunGraphics2D;Ljava/awt/Image;IILjava/awt/Color;Ljava/awt/image/ImageObserver;)Z (60 bytes) @ 0x044828e8 [0x04482780+0x168]
69
+J 90071 C1 sun.java2d.pipe.ValidatePipe.copyImage(Lsun/java2d/SunGraphics2D;Ljava/awt/Image;IILjava/awt/Color;Ljava/awt/image/ImageObserver;)Z (29 bytes) @ 0x04664ae8 [0x04664a70+0x78]
70
+J 89502 C1 sun.java2d.SunGraphics2D.drawImage(Ljava/awt/Image;IILjava/awt/Color;Ljava/awt/image/ImageObserver;)Z (145 bytes) @ 0x046ee30c [0x046ee110+0x1fc]
71
+J 89501 C1 sun.java2d.SunGraphics2D.drawImage(Ljava/awt/Image;IILjava/awt/image/ImageObserver;)Z (11 bytes) @ 0x0460c880 [0x0460c840+0x40]
72
+J 5670 C1 javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(Ljavax/swing/JComponent;Ljava/awt/Image;Ljava/awt/Graphics;IIII)V (294 bytes) @ 0x04ba3588 [0x04ba33e0+0x1a8]
73
+J 6197 C1 javax.swing.RepaintManager$PaintManager.paint(Ljavax/swing/JComponent;Ljavax/swing/JComponent;Ljava/awt/Graphics;IIII)Z (189 bytes) @ 0x044a510c [0x044a4ed0+0x23c]
74
+J 9480 C1 javax.swing.RepaintManager.paint(Ljavax/swing/JComponent;Ljavax/swing/JComponent;Ljava/awt/Graphics;IIII)V (93 bytes) @ 0x047763f0 [0x04776200+0x1f0]
75
+J 6349 C1 javax.swing.JComponent.paint(Ljava/awt/Graphics;)V (409 bytes) @ 0x0479bc30 [0x0479b8a0+0x390]
76
+j  java.awt.GraphicsCallback$PaintCallback.run(Ljava/awt/Component;Ljava/awt/Graphics;)V+2
77
+j  sun.awt.SunGraphicsCallback.runOneComponent(Ljava/awt/Component;Ljava/awt/Rectangle;Ljava/awt/Graphics;Ljava/awt/Shape;I)V+155
78
+j  sun.awt.SunGraphicsCallback.runComponents([Ljava/awt/Component;Ljava/awt/Graphics;I)V+194
79
+j  java.awt.Container.paint(Ljava/awt/Graphics;)V+58
80
+j  java.awt.Window.paint(Ljava/awt/Graphics;)V+68
81
+J 9473 C1 javax.swing.RepaintManager$4.run()Ljava/lang/Void; (278 bytes) @ 0x0454d4f4 [0x0454d220+0x2d4]
82
+J 9472 C1 javax.swing.RepaintManager$4.run()Ljava/lang/Object; (5 bytes) @ 0x0475e820 [0x0475e800+0x20]
83
+v  ~StubRoutines::call_stub
84
+J 558  java.security.AccessController.doPrivileged(Ljava/security/PrivilegedAction;Ljava/security/AccessControlContext;)Ljava/lang/Object; (0 bytes) @ 0x04530b47 [0x04530ae0+0x67]
85
+J 5621 C1 javax.swing.RepaintManager.paintDirtyRegions(Ljava/util/Map;)V (196 bytes) @ 0x04b919fc [0x04b91620+0x3dc]
86
+J 42029 C1 javax.swing.RepaintManager.paintDirtyRegions()V (50 bytes) @ 0x044df9e4 [0x044df8a0+0x144]
87
+J 15502 C1 javax.swing.RepaintManager.prePaintDirtyRegions()V (91 bytes) @ 0x04b8c3f4 [0x04b8c230+0x1c4]
88
+J 16217 C1 javax.swing.RepaintManager$ProcessingRunnable.run()V (41 bytes) @ 0x0449c024 [0x0449bef0+0x134]
89
+J 4662 C1 java.awt.event.InvocationEvent.dispatch()V (69 bytes) @ 0x04a93c9c [0x04a93bb0+0xec]
90
+J 3280 C1 java.awt.EventQueue.dispatchEventImpl(Ljava/awt/AWTEvent;Ljava/lang/Object;)V (149 bytes) @ 0x045b5ed0 [0x045b5a10+0x4c0]
91
+J 3277 C1 java.awt.EventQueue$3.run()Ljava/lang/Void; (60 bytes) @ 0x0461205c [0x04612000+0x5c]
92
+J 3276 C1 java.awt.EventQueue$3.run()Ljava/lang/Object; (5 bytes) @ 0x04612420 [0x04612400+0x20]
93
+v  ~StubRoutines::call_stub
94
+J 558  java.security.AccessController.doPrivileged(Ljava/security/PrivilegedAction;Ljava/security/AccessControlContext;)Ljava/lang/Object; (0 bytes) @ 0x04530b47 [0x04530ae0+0x67]
95
+J 3272 C1 java.awt.EventQueue.dispatchEvent(Ljava/awt/AWTEvent;)V (80 bytes) @ 0x045b6988 [0x045b6780+0x208]
96
+J 2053 C1 java.awt.EventDispatchThread.pumpOneEventForFilters(I)V (295 bytes) @ 0x0475b850 [0x0475b1c0+0x690]
97
+J 8555% C1 java.awt.EventDispatchThread.pumpEventsForFilter(ILjava/awt/Conditional;Ljava/awt/EventFilter;)V (47 bytes) @ 0x049f09b0 [0x049f0900+0xb0]
98
+j  java.awt.EventDispatchThread.pumpEventsForHierarchy(ILjava/awt/Conditional;Ljava/awt/Component;)V+11
99
+j  java.awt.EventDispatchThread.pumpEvents(ILjava/awt/Conditional;)V+4
100
+j  java.awt.EventDispatchThread.pumpEvents(Ljava/awt/Conditional;)V+3
101
+j  java.awt.EventDispatchThread.run()V+9
102
+v  ~StubRoutines::call_stub
103
+
104
+---------------  P R O C E S S  ---------------
105
+
106
+Java Threads: ( => current thread )
107
+  0x34e68c00 JavaThread "Detect hyperlinks at caret" daemon [_thread_blocked, id=18560, stack(0x02720000,0x02770000)]
108
+  0x39ef0400 JavaThread "Thread-6" daemon [_thread_in_native, id=12800, stack(0x04050000,0x040a0000)]
109
+  0x39eef800 JavaThread "Tooltip timer in CC Editor" daemon [_thread_blocked, id=18596, stack(0x3b990000,0x3b9e0000)]
110
+  0x39eef000 JavaThread "Brackets Highlighter" [_thread_blocked, id=18440, stack(0x3d960000,0x3d9b0000)]
111
+  0x39eefc00 JavaThread "OxygenSingletonChecker-Thread" [_thread_in_native, id=18436, stack(0x3d8d0000,0x3d920000)]
112
+  0x39ef0800 JavaThread "DB Sessions Manager fire timer" daemon [_thread_blocked, id=236, stack(0x3b680000,0x3b6d0000)]
113
+  0x39eee800 JavaThread "AutomaticallyValidation" daemon [_thread_blocked, id=15736, stack(0x3b040000,0x3b540000)]
114
+  0x39eee400 JavaThread "Autosave" daemon [_thread_blocked, id=380, stack(0x3afb0000,0x3b000000)]
115
+  0x3559f400 JavaThread "TimerQueue" daemon [_thread_blocked, id=9548, stack(0x39aa0000,0x39af0000)]
116
+  0x3589c800 JavaThread "AutomaticallyValidation" daemon [_thread_blocked, id=14680, stack(0x38f70000,0x39470000)]
117
+  0x35664400 JavaThread "Autosave" daemon [_thread_blocked, id=13888, stack(0x38d30000,0x38d80000)]
118
+=>0x356ee400 JavaThread "AWT-EventQueue-0" [_thread_in_native, id=9432, stack(0x364e0000,0x36530000)]
119
+  0x35662c00 JavaThread "AWT-Shutdown" [_thread_blocked, id=16980, stack(0x350b0000,0x35100000)]
120
+  0x34bfd000 JavaThread "AWT-Windows" daemon [_thread_in_native, id=14568, stack(0x34f30000,0x34f80000)]
121
+  0x34bfb800 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=8768, stack(0x349f0000,0x34a40000)]
122
+  0x342c1000 JavaThread "Service Thread" daemon [_thread_blocked, id=13732, stack(0x347e0000,0x34830000)]
123
+  0x34295000 JavaThread "C1 CompilerThread0" daemon [_thread_blocked, id=4676, stack(0x34750000,0x347a0000)]
124
+  0x34294000 JavaThread "Attach Listener" daemon [_thread_blocked, id=17952, stack(0x346c0000,0x34710000)]
125
+  0x3429fc00 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=15196, stack(0x34630000,0x34680000)]
126
+  0x34288c00 JavaThread "Finalizer" daemon [_thread_blocked, id=12364, stack(0x344b0000,0x34500000)]
127
+  0x34273400 JavaThread "Reference Handler" daemon [_thread_blocked, id=12572, stack(0x34420000,0x34470000)]
128
+  0x0439e000 JavaThread "main" [_thread_blocked, id=2632, stack(0x00400000,0x00450000)]
129
+
130
+Other Threads:
131
+  0x3426e800 VMThread [stack: 0x34390000,0x343e0000] [id=12312]
132
+  0x342c5000 WatcherThread [stack: 0x34870000,0x348c0000] [id=13116]
133
+
134
+VM state:not at safepoint (normal execution)
135
+
136
+VM Mutex/Monitor currently owned by a thread: None
137
+
138
+Heap:
139
+ PSYoungGen      total 204544K, used 27794K [0x236c0000, 0x31080000, 0x32000000)
140
+  eden space 185856K, 10% used [0x236c0000,0x248eeb58,0x2ec40000)
141
+  from space 18688K, 49% used [0x2ec40000,0x2f535f08,0x2fe80000)
142
+  to   space 18176K, 0% used [0x2fec0000,0x2fec0000,0x31080000)
143
+ ParOldGen       total 139520K, used 113347K [0x06400000, 0x0ec40000, 0x236c0000)
144
+  object space 139520K, 81% used [0x06400000,0x0d2b0ea8,0x0ec40000)
145
+ Metaspace       used 46052K, capacity 46410K, committed 46464K, reserved 46464K
146
+
147
+Card table byte_map: [0x32000000,0x32160000] byte_map_base: 0x31fce000
148
+
149
+Marking Bits: (ParMarkBitMap*) 0x71bf1d88
150
+ Begin Bits: [0x32450000, 0x32f40000)
151
+ End Bits:   [0x32f40000, 0x33a30000)
152
+
153
+Polling page: 0x04030000
154
+
155
+CodeCache: size=32768Kb used=8317Kb max_used=9585Kb free=24450Kb
156
+ bounds [0x043a0000, 0x04d38000, 0x063a0000]
157
+ total_blobs=4388 nmethods=4072 adapters=241
158
+ compilation: enabled
159
+
160
+Compilation events (10 events):
161
+Event: 197196.968 Thread 0x34295000 93066             sun.java2d.loops.GraphicsPrimitiveMgr::locate (104 bytes)
162
+Event: 197196.969 Thread 0x34295000 nmethod 93066 0x0487b2c8 code [0x0487b420, 0x0487b710]
163
+Event: 197196.969 Thread 0x34295000 93067   !         java.awt.GradientPaintContext::<init> (649 bytes)
164
+Event: 197196.971 Thread 0x34295000 nmethod 93067 0x0487e7c8 code [0x0487ea00, 0x0487f524]
165
+Event: 197196.974 Thread 0x34295000 93068             java.awt.Component::getBackground (29 bytes)
166
+Event: 197196.974 Thread 0x34295000 nmethod 93068 0x049ed308 code [0x049ed410, 0x049ed4dc]
167
+Event: 197197.526 Thread 0x34295000 93069             sun.awt.geom.Order1::compareTo (347 bytes)
168
+Event: 197197.527 Thread 0x34295000 nmethod 93069 0x049b1188 code [0x049b1390, 0x049b1b0c]
169
+Event: 197197.528 Thread 0x34295000 93070             sun.awt.geom.Edge::compareTo (118 bytes)
170
+Event: 197197.528 Thread 0x34295000 nmethod 93070 0x0487e208 code [0x0487e330, 0x0487e57c]
171
+
172
+GC Heap History (10 events):
173
+Event: 11269.931 GC heap before
174
+{Heap before GC invocations=187 (full 8):
175
+ PSYoungGen      total 205312K, used 190662K [0x236c0000, 0x31400000, 0x32000000)
176
+  eden space 184576K, 100% used [0x236c0000,0x2eb00000,0x2eb00000)
177
+  from space 20736K, 29% used [0x2ff40000,0x305319f8,0x31380000)
178
+  to   space 20736K, 0% used [0x2eb00000,0x2eb00000,0x2ff40000)
179
+ ParOldGen       total 139520K, used 112979K [0x06400000, 0x0ec40000, 0x236c0000)
180
+  object space 139520K, 80% used [0x06400000,0x0d254e88,0x0ec40000)
181
+ Metaspace       used 46031K, capacity 46407K, committed 46464K, reserved 46464K
182
+Event: 11269.950 GC heap after
183
+Heap after GC invocations=187 (full 8):
184
+ PSYoungGen      total 205312K, used 7890K [0x236c0000, 0x312c0000, 0x32000000)
185
+  eden space 184576K, 0% used [0x236c0000,0x236c0000,0x2eb00000)
186
+  from space 20736K, 38% used [0x2eb00000,0x2f2b4918,0x2ff40000)
187
+  to   space 19968K, 0% used [0x2ff40000,0x2ff40000,0x312c0000)
188
+ ParOldGen       total 139520K, used 113043K [0x06400000, 0x0ec40000, 0x236c0000)
189
+  object space 139520K, 81% used [0x06400000,0x0d264e88,0x0ec40000)
190
+ Metaspace       used 46031K, capacity 46407K, committed 46464K, reserved 46464K
191
+}
192
+Event: 11334.893 GC heap before
193
+{Heap before GC invocations=188 (full 8):
194
+ PSYoungGen      total 205312K, used 192466K [0x236c0000, 0x312c0000, 0x32000000)
195
+  eden space 184576K, 100% used [0x236c0000,0x2eb00000,0x2eb00000)
196
+  from space 20736K, 38% used [0x2eb00000,0x2f2b4918,0x2ff40000)
197
+  to   space 19968K, 0% used [0x2ff40000,0x2ff40000,0x312c0000)
198
+ ParOldGen       total 139520K, used 113043K [0x06400000, 0x0ec40000, 0x236c0000)
199
+  object space 139520K, 81% used [0x06400000,0x0d264e88,0x0ec40000)
200
+ Metaspace       used 46031K, capacity 46407K, committed 46464K, reserved 46464K
201
+Event: 11334.909 GC heap after
202
+Heap after GC invocations=188 (full 8):
203
+ PSYoungGen      total 204288K, used 11110K [0x236c0000, 0x311c0000, 0x32000000)
204
+  eden space 185344K, 0% used [0x236c0000,0x236c0000,0x2ebc0000)
205
+  from space 18944K, 58% used [0x2ff40000,0x30a19b60,0x311c0000)
206
+  to   space 19456K, 0% used [0x2ebc0000,0x2ebc0000,0x2fec0000)
207
+ ParOldGen       total 139520K, used 113111K [0x06400000, 0x0ec40000, 0x236c0000)
208
+  object space 139520K, 81% used [0x06400000,0x0d275e88,0x0ec40000)
209
+ Metaspace       used 46031K, capacity 46407K, committed 46464K, reserved 46464K
210
+}
211
+Event: 11610.701 GC heap before
212
+{Heap before GC invocations=189 (full 8):
213
+ PSYoungGen      total 204288K, used 196454K [0x236c0000, 0x311c0000, 0x32000000)
214
+  eden space 185344K, 100% used [0x236c0000,0x2ebc0000,0x2ebc0000)
215
+  from space 18944K, 58% used [0x2ff40000,0x30a19b60,0x311c0000)
216
+  to   space 19456K, 0% used [0x2ebc0000,0x2ebc0000,0x2fec0000)
217
+ ParOldGen       total 139520K, used 113111K [0x06400000, 0x0ec40000, 0x236c0000)
218
+  object space 139520K, 81% used [0x06400000,0x0d275e88,0x0ec40000)
219
+ Metaspace       used 46049K, capacity 46407K, committed 46464K, reserved 46464K
220
+Event: 11610.716 GC heap after
221
+Heap after GC invocations=189 (full 8):
222
+ PSYoungGen      total 204800K, used 12716K [0x236c0000, 0x31280000, 0x32000000)
223
+  eden space 185344K, 0% used [0x236c0000,0x236c0000,0x2ebc0000)
224
+  from space 19456K, 65% used [0x2ebc0000,0x2f82b2a0,0x2fec0000)
225
+  to   space 19456K, 0% used [0x2ff80000,0x2ff80000,0x31280000)
226
+ ParOldGen       total 139520K, used 113151K [0x06400000, 0x0ec40000, 0x236c0000)
227
+  object space 139520K, 81% used [0x06400000,0x0d27fe88,0x0ec40000)
228
+ Metaspace       used 46049K, capacity 46407K, committed 46464K, reserved 46464K
229
+}
230
+Event: 12021.584 GC heap before
231
+{Heap before GC invocations=190 (full 8):
232
+ PSYoungGen      total 204800K, used 198060K [0x236c0000, 0x31280000, 0x32000000)
233
+  eden space 185344K, 100% used [0x236c0000,0x2ebc0000,0x2ebc0000)
234
+  from space 19456K, 65% used [0x2ebc0000,0x2f82b2a0,0x2fec0000)
235
+  to   space 19456K, 0% used [0x2ff80000,0x2ff80000,0x31280000)
236
+ ParOldGen       total 139520K, used 113151K [0x06400000, 0x0ec40000, 0x236c0000)
237
+  object space 139520K, 81% used [0x06400000,0x0d27fe88,0x0ec40000)
238
+ Metaspace       used 46051K, capacity 46410K, committed 46464K, reserved 46464K
239
+Event: 12021.614 GC heap after
240
+Heap after GC invocations=190 (full 8):
241
+ PSYoungGen      total 203520K, used 9471K [0x236c0000, 0x310c0000, 0x32000000)
242
+  eden space 185856K, 0% used [0x236c0000,0x236c0000,0x2ec40000)
243
+  from space 17664K, 53% used [0x2ff80000,0x308bfec8,0x310c0000)
244
+  to   space 18688K, 0% used [0x2ec40000,0x2ec40000,0x2fe80000)
245
+ ParOldGen       total 139520K, used 113319K [0x06400000, 0x0ec40000, 0x236c0000)
246
+  object space 139520K, 81% used [0x06400000,0x0d2a9ea8,0x0ec40000)
247
+ Metaspace       used 46051K, capacity 46410K, committed 46464K, reserved 46464K
248
+}
249
+Event: 12046.556 GC heap before
250
+{Heap before GC invocations=191 (full 8):
251
+ PSYoungGen      total 203520K, used 195327K [0x236c0000, 0x310c0000, 0x32000000)
252
+  eden space 185856K, 100% used [0x236c0000,0x2ec40000,0x2ec40000)
253
+  from space 17664K, 53% used [0x2ff80000,0x308bfec8,0x310c0000)
254
+  to   space 18688K, 0% used [0x2ec40000,0x2ec40000,0x2fe80000)
255
+ ParOldGen       total 139520K, used 113319K [0x06400000, 0x0ec40000, 0x236c0000)
256
+  object space 139520K, 81% used [0x06400000,0x0d2a9ea8,0x0ec40000)
257
+ Metaspace       used 46051K, capacity 46410K, committed 46464K, reserved 46464K
258
+Event: 12046.564 GC heap after
259
+Heap after GC invocations=191 (full 8):
260
+ PSYoungGen      total 204544K, used 9175K [0x236c0000, 0x31080000, 0x32000000)
261
+  eden space 185856K, 0% used [0x236c0000,0x236c0000,0x2ec40000)
262
+  from space 18688K, 49% used [0x2ec40000,0x2f535f08,0x2fe80000)
263
+  to   space 18176K, 0% used [0x2fec0000,0x2fec0000,0x31080000)
264
+ ParOldGen       total 139520K, used 113347K [0x06400000, 0x0ec40000, 0x236c0000)
265
+  object space 139520K, 81% used [0x06400000,0x0d2b0ea8,0x0ec40000)
266
+ Metaspace       used 46051K, capacity 46410K, committed 46464K, reserved 46464K
267
+}
268
+
269
+Deoptimization events (0 events):
270
+No events
271
+
272
+Internal exceptions (10 events):
273
+Event: 12029.843 Thread 0x356ee400 Exception <a 'java/io/FileNotFoundException'> (0x26da75d8) thrown at [C:\workspace\8-2-build-windows-i586-cygwin\jdk8u121\8372\hotspot\src\share\vm\prims\jni.cpp, line 709]
274
+Event: 12031.924 Thread 0x356ee400 Exception <a 'java/io/FileNotFoundException'> (0x27835228) thrown at [C:\workspace\8-2-build-windows-i586-cygwin\jdk8u121\8372\hotspot\src\share\vm\prims\jni.cpp, line 709]
275
+Event: 12032.452 Thread 0x356ee400 Exception <a 'java/io/FileNotFoundException'> (0x283416c8) thrown at [C:\workspace\8-2-build-windows-i586-cygwin\jdk8u121\8372\hotspot\src\share\vm\prims\jni.cpp, line 709]
276
+Event: 12033.949 Thread 0x356ee400 Exception <a 'java/io/FileNotFoundException'> (0x2914b838) thrown at [C:\workspace\8-2-build-windows-i586-cygwin\jdk8u121\8372\hotspot\src\share\vm\prims\jni.cpp, line 709]
277
+Event: 12034.857 Thread 0x356ee400 Exception <a 'java/io/FileNotFoundException'> (0x29ca17c8) thrown at [C:\workspace\8-2-build-windows-i586-cygwin\jdk8u121\8372\hotspot\src\share\vm\prims\jni.cpp, line 709]
278
+Event: 12035.359 Thread 0x356ee400 Exception <a 'java/io/FileNotFoundException'> (0x2a72aeb0) thrown at [C:\workspace\8-2-build-windows-i586-cygwin\jdk8u121\8372\hotspot\src\share\vm\prims\jni.cpp, line 709]
279
+Event: 12037.776 Thread 0x356ee400 Exception <a 'java/io/FileNotFoundException'> (0x2b2ed528) thrown at [C:\workspace\8-2-build-windows-i586-cygwin\jdk8u121\8372\hotspot\src\share\vm\prims\jni.cpp, line 709]
280
+Event: 12039.552 Thread 0x356ee400 Exception <a 'java/io/FileNotFoundException'> (0x2c2b1a00) thrown at [C:\workspace\8-2-build-windows-i586-cygwin\jdk8u121\8372\hotspot\src\share\vm\prims\jni.cpp, line 709]
281
+Event: 12040.289 Thread 0x356ee400 Exception <a 'java/io/FileNotFoundException'> (0x2cd42590) thrown at [C:\workspace\8-2-build-windows-i586-cygwin\jdk8u121\8372\hotspot\src\share\vm\prims\jni.cpp, line 709]
282
+Event: 12043.506 Thread 0x356ee400 Exception <a 'java/io/FileNotFoundException'> (0x2d9f8250) thrown at [C:\workspace\8-2-build-windows-i586-cygwin\jdk8u121\8372\hotspot\src\share\vm\prims\jni.cpp, line 709]
283
+
284
+Events (10 events):
285
+Event: 197196.907 Thread 0x34295000 flushing nmethod 0x0487f788
286
+Event: 197196.907 Thread 0x34295000 flushing nmethod 0x04881388
287
+Event: 197196.907 Thread 0x34295000 flushing nmethod 0x04881c08
288
+Event: 197196.907 Thread 0x34295000 flushing nmethod 0x04884548
289
+Event: 197196.907 Thread 0x34295000 flushing nmethod 0x04884d48
290
+Event: 197196.907 Thread 0x34295000 flushing nmethod 0x04885888
291
+Event: 197196.907 Thread 0x34295000 flushing nmethod 0x04886288
292
+Event: 197196.940 Thread 0x34295000 flushing nmethod 0x049ed248
293
+Event: 197196.941 Thread 0x34295000 flushing nmethod 0x04ae3008
294
+Event: 197196.941 Thread 0x34295000 flushing nmethod 0x04c15ac8
295
+
296
+
297
+Dynamic libraries:
298
+0x00030000 - 0x000d3000 	C:\Program Files (x86)\Oxygen XML Author 19\oxygenAuthor19.1.exe
299
+0x77370000 - 0x774fd000 	C:\windows\SYSTEM32\ntdll.dll
300
+0x75180000 - 0x75250000 	C:\windows\System32\KERNEL32.DLL
301
+0x75c60000 - 0x75e37000 	C:\windows\System32\KERNELBASE.dll
302
+0x752e0000 - 0x75455000 	C:\windows\System32\USER32.dll
303
+0x752c0000 - 0x752d6000 	C:\windows\System32\win32u.dll
304
+0x73fd0000 - 0x73ff2000 	C:\windows\System32\GDI32.dll
305
+0x75550000 - 0x756ae000 	C:\windows\System32\gdi32full.dll
306
+0x73f50000 - 0x73fcc000 	C:\windows\System32\msvcp_win.dll
307
+0x74560000 - 0x74677000 	C:\windows\System32\ucrtbase.dll
308
+0x75700000 - 0x75778000 	C:\windows\System32\ADVAPI32.dll
309
+0x75780000 - 0x7583d000 	C:\windows\System32\msvcrt.dll
310
+0x756b0000 - 0x756f3000 	C:\windows\System32\sechost.dll
311
+0x73dc0000 - 0x73e7e000 	C:\windows\System32\RPCRT4.dll
312
+0x73d90000 - 0x73db0000 	C:\windows\System32\SspiCli.dll
313
+0x73d80000 - 0x73d8a000 	C:\windows\System32\CRYPTBASE.dll
314
+0x75890000 - 0x758e7000 	C:\windows\System32\bcryptPrimitives.dll
315
+0x748d0000 - 0x748f5000 	C:\windows\System32\IMM32.DLL
316
+0x74680000 - 0x748c6000 	C:\windows\System32\combase.dll
317
+0x73d10000 - 0x73d41000 	C:\windows\System32\AwDmRegI.dll
318
+0x69960000 - 0x69b71000 	C:\windows\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.16299.371_none_5d75084fa7e1cb96\comctl32.dll
319
+0x71860000 - 0x71c2e000 	c:\program files (x86)\oxygen xml author 19\jre\bin\client\jvm.dll
320
+0x77360000 - 0x77366000 	C:\windows\System32\PSAPI.DLL
321
+0x72d10000 - 0x72d18000 	C:\windows\SYSTEM32\VERSION.dll
322
+0x72070000 - 0x7212f000 	C:\windows\SYSTEM32\MSVCR100.dll
323
+0x73400000 - 0x73424000 	C:\windows\SYSTEM32\WINMM.dll
324
+0x728e0000 - 0x728e8000 	C:\windows\SYSTEM32\WSOCK32.dll
325
+0x73e90000 - 0x73ef6000 	C:\windows\System32\WS2_32.dll
326
+0x733d0000 - 0x733f3000 	C:\windows\SYSTEM32\WINMMBASE.dll
327
+0x74f00000 - 0x74f38000 	C:\windows\System32\cfgmgr32.dll
328
+0x71850000 - 0x7185c000 	c:\program files (x86)\oxygen xml author 19\jre\bin\verify.dll
329
+0x706f0000 - 0x70711000 	c:\program files (x86)\oxygen xml author 19\jre\bin\java.dll
330
+0x706d0000 - 0x706e3000 	c:\program files (x86)\oxygen xml author 19\jre\bin\zip.dll
331
+0x76020000 - 0x77353000 	C:\windows\System32\SHELL32.dll
332
+0x75a60000 - 0x75ae8000 	C:\windows\System32\shcore.dll
333
+0x74910000 - 0x74ed6000 	C:\windows\System32\windows.storage.dll
334
+0x73f00000 - 0x73f45000 	C:\windows\System32\shlwapi.dll
335
+0x73db0000 - 0x73dbe000 	C:\windows\System32\kernel.appcore.dll
336
+0x750d0000 - 0x75115000 	C:\windows\System32\powrprof.dll
337
+0x74ee0000 - 0x74ef4000 	C:\windows\System32\profapi.dll
338
+0x706a0000 - 0x706c8000 	C:\Program Files (x86)\Oxygen XML Author 19\.install4j\i4jinst.dll
339
+0x744c0000 - 0x74553000 	C:\windows\System32\OLEAUT32.dll
340
+0x75f20000 - 0x76017000 	C:\windows\System32\ole32.dll
341
+0x71840000 - 0x7184a000 	C:\Program Files (x86)\Oxygen XML Author 19\jre\bin\management.dll
342
+0x70670000 - 0x70691000 	C:\Program Files (x86)\Oxygen XML Author 19\jre\bin\JavaAccessBridge-32.dll
343
+0x67eb0000 - 0x67ff6000 	C:\Program Files (x86)\Oxygen XML Author 19\jre\bin\awt.dll
344
+0x73bc0000 - 0x73c5a000 	C:\windows\SYSTEM32\apphelp.dll
345
+0x73350000 - 0x733c9000 	C:\windows\system32\uxtheme.dll
346
+0x75b10000 - 0x75c54000 	C:\windows\System32\MSCTF.dll
347
+0x71700000 - 0x71787000 	C:\Program Files (x86)\Common Files\Microsoft Shared\Ink\tiptsf.dll
348
+0x73320000 - 0x73343000 	C:\windows\system32\dwmapi.dll
349
+0x70590000 - 0x7066f000 	C:\windows\system32\opengl32.dll
350
+0x70560000 - 0x70585000 	C:\windows\SYSTEM32\GLU32.dll
351
+0x6e4f0000 - 0x6e503000 	C:\windows\SYSTEM32\CRYPTSP.dll
352
+0x6e4c0000 - 0x6e4ef000 	C:\windows\system32\rsaenh.dll
353
+0x73880000 - 0x73899000 	C:\windows\SYSTEM32\bcrypt.dll
354
+0x736a0000 - 0x736c2000 	C:\windows\SYSTEM32\USERENV.dll
355
+0x70540000 - 0x70556000 	C:\Program Files (x86)\Oxygen XML Author 19\jre\bin\net.dll
356
+0x721f0000 - 0x72245000 	C:\windows\system32\mswsock.dll
357
+0x73d50000 - 0x73d80000 	C:\windows\SYSTEM32\IPHLPAPI.DLL
358
+0x74900000 - 0x74907000 	C:\windows\System32\NSI.dll
359
+0x68590000 - 0x685a3000 	C:\windows\SYSTEM32\dhcpcsvc6.DLL
360
+0x68570000 - 0x68584000 	C:\windows\SYSTEM32\dhcpcsvc.DLL
361
+0x70530000 - 0x7053f000 	C:\Program Files (x86)\Oxygen XML Author 19\jre\bin\nio.dll
362
+0x35ea0000 - 0x35edd000 	C:\Program Files (x86)\Oxygen XML Author 19\lib\com\sun\jna\win32-x86\jnidispatch.dll
363
+0x6b7a0000 - 0x6b7d9000 	C:\Program Files (x86)\Oxygen XML Author 19\jre\bin\fontmanager.dll
364
+0x754c0000 - 0x75542000 	C:\windows\System32\clbcatq.dll
365
+0x64040000 - 0x641de000 	C:\Windows\System32\uiautomationcore.dll
366
+0x69dc0000 - 0x69e46000 	C:\windows\SYSTEM32\sxs.dll
367
+0x66010000 - 0x6609c000 	C:\Windows\System32\CoreMessaging.dll
368
+0x6b760000 - 0x6b792000 	C:\Program Files (x86)\Oxygen XML Author 19\jre\bin\t2k.dll
369
+0x63e00000 - 0x64034000 	C:\Windows\System32\CoreUIComponents.dll
370
+0x72db0000 - 0x72dd8000 	C:\windows\SYSTEM32\ntmarta.dll
371
+0x6ae60000 - 0x6af2b000 	C:\windows\SYSTEM32\wintypes.dll
372
+0x6b730000 - 0x6b754000 	C:\Program Files (x86)\Oxygen XML Author 19\jre\bin\dcpr.dll
373
+0x73610000 - 0x7369e000 	C:\windows\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.16299.371_none_d02abd455f338e37\comctl32.dll
374
+0x6b710000 - 0x6b726000 	C:\Program Files (x86)\Oxygen XML Author 19\lib\WindowsNativeHelper32.dll
375
+0x75e40000 - 0x75f14000 	C:\windows\System32\COMDLG32.dll
376
+0x6b6f0000 - 0x6b710000 	C:\Program Files (x86)\Oxygen XML Author 19\jre\bin\sunec.dll
377
+0x72290000 - 0x722a1000 	C:\windows\system32\napinsp.dll
378
+0x72270000 - 0x72286000 	C:\windows\system32\pnrpnsp.dll
379
+0x72250000 - 0x72263000 	C:\windows\system32\NLAapi.dll
380
+0x72150000 - 0x721e4000 	C:\windows\SYSTEM32\DNSAPI.dll
381
+0x72140000 - 0x7214c000 	C:\windows\System32\winrnr.dll
382
+0x72130000 - 0x72140000 	C:\windows\System32\wshbth.dll
383
+0x6a210000 - 0x6a25e000 	C:\windows\System32\fwpuclnt.dll
384
+0x71da0000 - 0x71da8000 	C:\Windows\System32\rasadhlp.dll
385
+0x6b6e0000 - 0x6b6e9000 	C:\Program Files (x86)\Oxygen XML Author 19\jre\bin\sunmscapi.dll
386
+0x74f40000 - 0x750c2000 	C:\windows\System32\CRYPT32.dll
387
+0x73e80000 - 0x73e8e000 	C:\windows\System32\MSASN1.dll
388
+0x69d40000 - 0x69db7000 	C:\windows\System32\TextInputFramework.dll
389
+0x735a0000 - 0x735f6000 	C:\Windows\System32\OLEACC.dll
390
+0x6a790000 - 0x6a7fe000 	C:\windows\SYSTEM32\twinapi.dll
391
+0x68c20000 - 0x68d54000 	C:\windows\SYSTEM32\twinapi.appcore.dll
392
+0x6b660000 - 0x6b67a000 	C:\windows\SYSTEM32\RMCLIENT.dll
393
+0x3ce40000 - 0x3cea1000 	\\?\C:\PROGRA~2\OXYGEN~1\lib\hunspell\HUNSPE~1.DLL
394
+0x66b80000 - 0x66cee000 	C:\windows\SYSTEM32\WindowsCodecs.dll
395
+0x6e510000 - 0x6e558000 	C:\windows\system32\dataexchange.dll
396
+0x6a050000 - 0x6a14e000 	C:\windows\system32\dcomp.dll
397
+0x68d60000 - 0x68f9e000 	C:\windows\system32\d3d11.dll
398
+0x6b510000 - 0x6b5a3000 	C:\windows\system32\dxgi.dll
399
+0x6bb90000 - 0x6bbcd000 	C:\windows\SYSTEM32\edputil.dll
400
+0x6b1c0000 - 0x6b1d6000 	C:\windows\SYSTEM32\CLDAPI.dll
401
+0x6b180000 - 0x6b1b6000 	C:\windows\SYSTEM32\AEPIC.dll
402
+0x6b170000 - 0x6b178000 	C:\windows\SYSTEM32\FLTLIB.DLL
403
+0x736e0000 - 0x7385b000 	C:\windows\SYSTEM32\PROPSYS.dll
404
+0x6ddc0000 - 0x6df4c000 	C:\windows\SYSTEM32\urlmon.dll
405
+0x75af0000 - 0x75b09000 	C:\windows\System32\imagehlp.dll
406
+0x722b0000 - 0x724ca000 	C:\windows\SYSTEM32\iertutil.dll
407
+0x6b040000 - 0x6b09e000 	C:\windows\SYSTEM32\msiso.dll
408
+0x70840000 - 0x709c1000 	C:\windows\SYSTEM32\dbghelp.dll
409
+
410
+VM Arguments:
411
+jvm_args: -Dexe4j.semaphoreName=Local\c:_program_files_(x86)_oxygen_xml_author_19_oxygenauthor19.1.exe -Dexe4j.isInstall4j=true -Dexe4j.moduleName=C:\Program Files (x86)\Oxygen XML Author 19\oxygenAuthor19.1.exe -Dexe4j.tempDir= -Dexe4j.unextractedPosition=0 -Djava.library.path=C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\iCLS\;C:\Program Files\Intel\Intel(R) Management Engine Components\iCLS\;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\RSA SecurID Token Common;C:\Program Files\RSA SecurID Token Common;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files\Perforce;C:\Program Files\Perforce\DVCS\;C:\Program Files\Go\bin;C:\Program Files\nodejs\;C:\Users\vasudevanv\Desktop\vic;C:\Users\vasudevanv\Desktop\vic_19917.tar\vic_19917\vic;C:\Users\vasudevanv\AppData\Local\Microsoft\WindowsApps;C:\Users\vasudevanv\go\bin;C:\Users\vasudevanv\AppData\Roaming\npm;C:\AWork\VIC\VIC-Deployment\vic;C:\Users\vasudevanv\Desktop\vic_19917.tar\vic_19917\vic;;c:\program files (x86)\oxygen xml author 19\jre\bin -Dexe4j.consoleCodepage=cp0 -Dcom.oxygenxml.app.descriptor=ro.sync.exml.AuthorFrameDescriptor -XX:-OmitStackTraceInFastThrow -XX:SoftRefLRUPolicyMSPerMB=10 -Dsun.java2d.noddraw=true -Dsun.awt.nopixfmt=true -Dsun.java2d.dpiaware=true -Djava.net.preferIPv4Stack=true -Dsun.awt.keepWorkingSetOnMinimize=true -Dinstall4j.launcherId=19 -Dinstall4j.swt=false -Xmx700m -Dcom.oxygenxml.language=English -XX:+UseParallelGC -XX:ErrorFile=C:\Users\VASUDE~1\AppData\Local\Temp\/oxy_jvm_crash.log -XX:OnError=C:\Program Files (x86)\Oxygen XML Author 19/rp.exe 
412
+java_command: C:\Program Files (x86)\Oxygen XML Author 19\oxygenAuthor19.1.exe
413
+java_class_path (initial): C:\Program Files (x86)\Oxygen XML Author 19\.install4j\i4jruntime.jar;C:\Program Files (x86)\Oxygen XML Author 19\.\lib\oxygenAuthor.jar
414
+Launcher Type: generic
415
+
416
+Environment Variables:
417
+PATH=C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\iCLS\;C:\Program Files\Intel\Intel(R) Management Engine Components\iCLS\;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\RSA SecurID Token Common;C:\Program Files\RSA SecurID Token Common;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files\Perforce;C:\Program Files\Perforce\DVCS\;C:\Program Files\Go\bin;C:\Program Files\nodejs\;C:\Users\vasudevanv\Desktop\vic;C:\Users\vasudevanv\Desktop\vic_19917.tar\vic_19917\vic;C:\Users\vasudevanv\AppData\Local\Microsoft\WindowsApps;C:\Users\vasudevanv\go\bin;C:\Users\vasudevanv\AppData\Roaming\npm;C:\AWork\VIC\VIC-Deployment\vic;C:\Users\vasudevanv\Desktop\vic_19917.tar\vic_19917\vic;;c:\program files (x86)\oxygen xml author 19\jre\bin
418
+USERNAME=vasudevanv
419
+OS=Windows_NT
420
+PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 142 Stepping 9, GenuineIntel
421
+
422
+
423
+
424
+---------------  S Y S T E M  ---------------
425
+
426
+OS: Windows 10.0 , 64 bit Build 16299 (10.0.16299.15)
427
+
428
+CPU:total 4 (2 cores per cpu, 2 threads per core) family 6 model 142 stepping 9, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, avx, avx2, aes, clmul, erms, rtm, 3dnowpref, lzcnt, ht, tsc, tscinvbit, bmi1, bmi2, adx
429
+
430
+Memory: 4k page, physical 16658884k(8676108k free), swap 19149252k(8924604k free)
431
+
432
+vm_info: Java HotSpot(TM) Client VM (25.121-b13) for windows-x86 JRE (1.8.0_121-b13), built on Dec 12 2016 18:17:00 by "java_re" with MS VC++ 10.0 (VS2010)
433
+
434
+time: Sun Nov 18 17:26:10 2018
435
+elapsed time: 197197 seconds (2d 6h 46m 37s)
436
+
... ...
@@ -5,22 +5,3 @@ Photon OS, is an open-source minimalist Linux operating system from VMware that
5 5
 Photon OS is a Linux container host optimized for vSphere and cloud-computing platforms such as Amazon Elastic Compute and Google Compute Engine. As a lightweight and extensible operating system, Photon OS works with the most common container formats, including Docker, Rocket, and Garden. Photon OS includes a yum-compatible, package-based lifecycle management system called tdnf.
6 6
 
7 7
 When used with development tools and environments such as VMware Fusion, VMware Workstation, and production runtime environments (vSphere, vCloud Air), Photon OS lets you seamlessly migrate container-based applications from development to production. With a small footprint and fast boot and run times, Photon OS is optimized for cloud computing and cloud  applications.  
8
-
9
-Photon OS consists of a minimal version and a full version. 
10
-
11
-The minimal version of Photon OS is lightweight container host runtime environment that is suited to managing and hosting containers. The minimal version contains just enough packaging and functionality to manage and modify containers while remaining a fast runtime environment. The minimal version is ready to work with appliances. 
12
-
13
-The full version of Photon OS includes additional packages to help you customize the system and create containerized applications. For running containers, the full version is excessive. The full version is helps you create, develop, test, and package an application that runs a container. 
14
-
15
-The two distinguishing features of Photon OS are as follows:
16
-
17
-- It manages services with systemd. 
18
-    
19
-    By using systemd, Photon OS adopts a contemporary Linux standard to manage system services. Photon OS bootstraps the user space and concurrently starts services with systemd. The systemctl utility controls services on Photon OS. For example, instead of running the /etc/init.d/ssh script to stop and start the OpenSSH server on a init.d-based Linux system, you run the following systemctl commands on Photon OS: 
20
-    
21
-    - systemctl stop sshd
22
-    - systemctl start sshd
23
-
24
-- It manages packages with an open source, yum-compatible package manager called tdnf for Tiny DNF.
25
-    
26
-    Tdnf keeps the operating system as small as possible while preserving yum's robust package-management capabilities. On Photon OS, tdnf is the default package manager for installing new packages. It is a C implementation of the DNF package manager. 
27 8
deleted file mode 100644
... ...
@@ -1,92 +0,0 @@
1
-# Kickstart Support in Photon OS
2
-
3
-Photon OS works with kickstart for unattended, automated installations. The kickstart configuration file can either reside in the CD-ROM attached to the host or be served through an HTTP server.
4
-
5
-## Kickstart Capabilities
6
-
7
-Photon OS supports the following configurations with kickstart:
8
-
9
-* Setting the hostname
10
-* Setting the password
11
-* Setting the disk to install
12
-* Selecting whether to install the full or the minimal version of Photon OS 
13
-* Applying a post-installation script
14
-* Adding public keys to allow the root account to log in through SSH
15
-
16
-Here is a sample kickstart configuration file:
17
-
18
-```
19
-{
20
-    "hostname": "<hostname>",
21
-    "password": 
22
-        {
23
-            "crypted": <true|false>,
24
-            "text": "<password, either plain text or encrypted>"
25
-        },
26
-    "disk": "/dev/sda",
27
-    "type": "minimal",
28
-    "postinstall": [
29
-                    "#!/bin/sh",
30
-                    "echo \"Hello World\" > /etc/postinstall"
31
-                   ],
32
-    "public_key": "<public_key>"
33
-}
34
-```
35
-
36
-## Unattended Installation Through Kickstart
37
-
38
-For an unattended installation, you pass the `ks=<config_file>` parameter to the kernel command. To pass the config file, there are two options: by providing it on the ISO or by serving it from an HTTP server. 
39
-
40
-The syntax to pass the config-file to the kernel through the ISO takes the following form: 
41
-
42
-    ks=cdrom:/<config_file_path>
43
-
44
-Here is an example: 
45
-
46
-    ks=cdrom:/isolinux/my_ks.cfg
47
-
48
-The syntax to serve the config-file to the kernel from an HTTP server (NOTE: DO NOT use https:// here) takes the following form: 
49
-
50
-    ks=http://<server>/<config_file_path>
51
-
52
-## Building an ISO with a Kickstart Config File
53
-
54
-Here's an example of how to add a kickstart config file to the Photon OS ISO by mounting the ISO on an Ubuntu machine and then rebuilding the ISO. The following example assumes you can adapt the sample kickstart configuration file that comes with the Photon OS ISO to your needs. You can obtain the Photon OS ISO for free from Bintray at the following URL: 
55
-
56
-[https://bintray.com/vmware/photon](https://bintray.com/vmware/photon)
57
-
58
-Once you have the ISO, mount it. 
59
-
60
-    mkdir /tmp/photon-iso
61
-    sudo mount photon.iso /tmp/photon-iso
62
-
63
-Then copy the content of the ISO to a writable directory and push it into the directory stack: 
64
-
65
-    mkdir /tmp/photon-ks-iso
66
-    cp -r /tmp/photon-iso/* /tmp/photon-ks-iso/
67
-    pushd /tmp/photon-ks-iso/
68
-
69
-Next, copy the sample kickstart configuration file that comes with the Photon OS ISO and modify it to suit your needs. In the ISO, the sample kickstart config file appears in the `isolinux` directory and is named `sample_ks.cfg.` The name of the directory and the name of the file might be in all uppercase letters. 
70
-
71
-    cp isolinux/sample_ks.cfg isolinux/my_ks.cfg
72
-    nano isolinux/my_ks.cfg
73
-
74
-With a copy of the sample kickstart config file open in nano, make the changes that you want. 
75
-
76
-Now add a new item to the installation menu by modifying `isolinux/menu.cfg`:
77
-
78
-    cat >> isolinux/menu.cfg << EOF
79
-    label my_unattended
80
-    	menu label ^My Unattended Install
81
-    	kernel vmlinuz
82
-    	append initrd=initrd.img root=/dev/ram0 ks=cdrom:/isolinux/my_ks.cfg loglevel=3
83
-    EOF
84
-
85
-Finally, rebuild the ISO so that it includes your kickstart config file: 
86
-
87
-    mkisofs -R -l -L -D -b isolinux/isolinux.bin -c isolinux/boot.cat \
88
-    		-no-emul-boot -boot-load-size 4 -boot-info-table -V "PHOTON_$(date +%Y%m%d)" \
89
-    		. > <new_iso_path>.iso
90
-
91
-    popd
92
-
93 1
deleted file mode 100644
... ...
@@ -1,198 +0,0 @@
1
-# Running Kubernetes on Photon OS
2
-
3
-- [Prerequisites](#prerequisites)
4
-- [Instructions](#instructions)
5
-
6
-## Prerequisites
7
-
8
-* You need two or more machines with the 1.0 general availability or later version of Photon OS installed.
9
-
10
-## Instructions
11
-
12
-This document gets you started using Kubernetes with Photon OS. The instructions present a manual configuration that gets one worker node running to help you understand  the underlying packages, services, ports, and so forth. 
13
-
14
-The Kubernetes package provides several services: kube-apiserver, kube-scheduler, kube-controller-manager, kubelet, kube-proxy.  These services are managed by systemd. Their configuration resides in a central location: /etc/kubernetes.  
15
-
16
-The following instructions break the services up between the hosts.  The first host, `photon-master`, will be the Kubernetes master.  This host will run the kube-apiserver, kube-controller-manager, and kube-scheduler.  In addition, the master will also run `etcd`. Although `etcd` is not needed on the master if `etcd` runs on a different host, this guide assumes that `etcd` and the Kubernetes master run on the same host.  The remaining host, `photon-node`, will be the node; it will run kubelet, proxy, and docker.
17
-
18
-### System Information
19
-
20
-Hosts:
21
-
22
-```
23
-photon-master = 192.168.121.9
24
-photon-node = 192.168.121.65
25
-```
26
-
27
-### Prepare the hosts
28
-
29
-The following packages should already be installed on the full version of Photon OS, but you might have to install them on the minimal version of Photon OS. If the `tdnf` command returns "Nothing to do," the package is already installed.
30
-    
31
-* Install Kubernetes on all hosts--both `photon-master` and `photon-node`.
32
-
33
-```
34
-tdnf install kubernetes
35
-``` 
36
-
37
-* Install iptables on photon-master and photon-node:
38
-
39
-```
40
-tdnf install iptables
41
-```
42
-
43
-* Open the tcp port 8080 (api service) on the photon-master in the firewall
44
-
45
-```
46
-iptables -A INPUT -p tcp --dport 8080 -j ACCEPT
47
-```
48
-
49
-* Open the tcp port 10250 (api service) on the photon-node in the firewall
50
-
51
-```
52
-iptables -A INPUT -p tcp --dport 10250 -j ACCEPT
53
-```
54
-
55
-
56
-* Install Docker on photon-node:
57
-
58
-```
59
-tdnf install docker
60
-```
61
-
62
-* Add master and node to /etc/hosts on all machines (not needed if the hostnames are already in DNS). Make sure that communication works between photon-master and photon-node by using a utility such as ping.
63
-
64
-```sh
65
-echo "192.168.121.9	photon-master
66
-192.168.121.65	photon-node" >> /etc/hosts
67
-```
68
-
69
-* Edit /etc/kubernetes/config, which will be the same on all the hosts (master and node), so that it contains the following lines:
70
-
71
-```
72
-# Comma separated list of nodes in the etcd cluster
73
-KUBE_MASTER="--master=http://photon-master:8080"
74
-
75
-# logging to stderr routes it to the systemd journal
76
-KUBE_LOGTOSTDERR="--logtostderr=true"
77
-
78
-# journal message level, 0 is debug
79
-KUBE_LOG_LEVEL="--v=0"
80
-
81
-# Should this cluster be allowed to run privileged docker containers
82
-KUBE_ALLOW_PRIV="--allow_privileged=false"
83
-```
84
-
85
-### Configure the Kubernetes services on the master
86
-
87
-* Edit /etc/kubernetes/apiserver to appear as such.  The service_cluster_ip_range IP addresses must be an unused block of addresses, not used anywhere else.  They do not need to be routed or assigned to anything.
88
-
89
-```
90
-# The address on the local server to listen to.
91
-KUBE_API_ADDRESS="--address=0.0.0.0"
92
-
93
-# Comma separated list of nodes in the etcd cluster
94
-KUBE_ETCD_SERVERS="--etcd_servers=http://127.0.0.1:4001"
95
-
96
-# Address range to use for services
97
-KUBE_SERVICE_ADDRESSES="--service-cluster-ip-range=10.254.0.0/16"
98
-
99
-# Add your own
100
-KUBE_API_ARGS=""
101
-```
102
-
103
-* Start the appropriate services on master:
104
-
105
-```
106
-for SERVICES in etcd kube-apiserver kube-controller-manager kube-scheduler; do
107
-	systemctl restart $SERVICES
108
-	systemctl enable $SERVICES
109
-	systemctl status $SERVICES
110
-done
111
-```
112
-
113
-* To add the other node, create the following node.json file on the Kubernetes master node:
114
-
115
-```json
116
-{
117
-    "apiVersion": "v1",
118
-    "kind": "Node",
119
-    "metadata": {
120
-        "name": "photon-node",
121
-        "labels":{ "name": "photon-node-label"}
122
-    },
123
-    "spec": {
124
-        "externalID": "photon-node"
125
-    }
126
-}
127
-```
128
-
129
-* Now create a node object internally in your Kubernetes cluster by running the following command:
130
-
131
-```console
132
-$ kubectl create -f ./node.json
133
-
134
-$ kubectl get nodes
135
-NAME                LABELS              STATUS
136
-photon-node         name=photon-node-label     Unknown
137
-```
138
-
139
-Please note that in the above example, it only creates a representation for the node
140
-_photon-node_ internally. It does not provision the actual _photon-node_. Also, it
141
-is assumed that _photon-node_ (as specified in `name`) can be resolved and is
142
-reachable from the Kubernetes master node. How to provision
143
-a Kubernetes node (photon-node) is shown in a later section.
144
-
145
-### Configure the Kubernetes services on the node
146
-
147
-You configure the kubelet on the node as follows. 
148
-
149
-* Edit /etc/kubernetes/kubelet to appear like this:
150
-
151
-```
152
-###
153
-# Kubernetes kubelet (node) config
154
-
155
-# The address for the info server to serve on (set to 0.0.0.0 or "" for all interfaces)
156
-KUBELET_ADDRESS="--address=0.0.0.0"
157
-
158
-# You may leave this blank to use the actual hostname
159
-KUBELET_HOSTNAME="--hostname_override=photon-node"
160
-
161
-# location of the api-server
162
-KUBELET_API_SERVER="--api_servers=http://photon-master:8080"
163
-
164
-# Add your own
165
-#KUBELET_ARGS=""
166
-```
167
-
168
-* Start the appropriate services on the node (photon-node):
169
-
170
-```sh
171
-for SERVICES in kube-proxy kubelet docker; do 
172
-    systemctl restart $SERVICES
173
-    systemctl enable $SERVICES
174
-    systemctl status $SERVICES 
175
-done
176
-```
177
-
178
-* Check to make sure that the cluster can now see the photon-node on photon-master and that its status changes to _Ready_.
179
-
180
-```console
181
-kubectl get nodes
182
-NAME                LABELS              STATUS
183
-photon-node          name=photon-node-label     Ready
184
-```
185
-
186
-If the node status is `NotReady`, verify that the firewall rules are permissive for Kubernetes.  
187
-
188
-* Deletion of nodes: To delete _photon-node_ from your Kubernetes cluster, one should run the following on photon-master (please do not do it, it is just for information):
189
-
190
-```sh
191
-kubectl delete -f ./node.json
192
-```
193
-
194
-That's it. You should have a functional cluster. You can now launch a test pod. Check out [Kubernetes 101](http://kubernetes.io/docs/user-guide/walkthrough/) for an introduction to working with Kubernetes. 
195
-
196
-
197
-
198 1
deleted file mode 100644
... ...
@@ -1,47 +0,0 @@
1
-# Photon NFS Utilities for Mounting Remote File Systems
2
-
3
-This document describes how to mount a remote file system on Photon OS by using nfs-utils, a commonly used package that contains tools to work with the Network File System protocol (NFS).
4
-
5
-## Check a Remote Server
6
-
7
-```
8
-showmount  -e nfs-servername or ip
9
-```
10
-
11
-Example:  
12
-
13
-```
14
-showmount -e eastern-filer.eng.vmware.com
15
-showmount -e 10.109.87.129
16
-```
17
-
18
-## Mount a Remote File System in Photon Full
19
-
20
-The nfs-utils package is installed by default in the full version of Photon OS. Here is how to mount a directory through NFS on Photon OS:  
21
-
22
-```
23
-mount -t nfs nfs-ServernameOrIp:/exportfolder /mnt/folder
24
-```
25
-
26
-Example:  
27
-
28
-```
29
-mount -t nfs eastern-filer.eng.vmware.com:/export/filer /mnt/filer
30
-mount -t nfs 10.109.87.129:/export /mnt/export
31
-```
32
-
33
-## Mount a Remote File System in Photon Minimal
34
-
35
-The nfs-utils package is not installed in the minimal version of Photon OS. You install it by running the following command: 
36
-
37
-	tdnf install nfs-utils
38
-
39
-For more information on installing packages with the tdnf command, see the [Photon OS Administration Guide](https://github.com/vmware/photon/blob/master/docs/photon-admin-guide.md).
40
-
41
-Once nfs-utils is installed, you can mount a file system by running the following commands, replacing the placeholders with the path of the directory that you want to mount: 
42
-
43
-```
44
-mount nfs
45
-```
46
-mount -t nfs nfs-ServernameOrIp:/exportfolder /mnt/folder
47
-```
48 1
deleted file mode 100644
... ...
@@ -1,1682 +0,0 @@
1
-# Photon OS Linux Troubleshooting Guide
2
-
3
--   [Introduction](#introduction)
4
-    -   [Systemd and TDNF](#systemd-and-tdnf)
5
-    -   [The Root Account and the `sudo` and `su`
6
-        Commands](#the-root-account-and-the-sudo-and-su-commands)
7
-    -   [Checking the Version and Build
8
-        Number](#checking-the-version-and-build-number)
9
-    -   [General Best Practices](#general-best-practices)
10
-    -   [Logs on Photon OS](#logs-on-photon-os)
11
-    -   [Troubleshooting Progression](#troubleshooting-progression)
12
--   [Solutions to Common Problems](#solutions-to-common-problems)
13
-    -   [Resetting a Lost Root
14
-        Password](#resetting-a-lost-root-password)
15
-    -   [Fixing Permissions on Network Config
16
-        Files](#fixing-permissions-on-network-config-files)
17
-    -   [Permitting Root Login with
18
-        SSH](#permitting-root-login-with-ssh)
19
-    -   [Fixing Sendmail If Installed Before an FQDN Was
20
-        Set](#fixing-sendmail-if-installed-before-an-fqdn-was-set)
21
--   [Common Troubleshooting Tools on Photon
22
-    OS](#common-troubleshooting-tools-on-photon-os)
23
-    -   [Top](#top)
24
-    -   [ps](#ps)
25
-    -   [netstat](#netstat)
26
-    -   [find](#find)
27
-    -   [Locate](#locate)
28
-    -   [df](#df)
29
-    -   [md5sum and sha256sum](#md5sum-and-sha256sum)
30
-    -   [strace](#strace)
31
-    -   [file](#file)
32
-    -   [stat](#stat)
33
-    -   [watch](#watch)
34
-    -   [vmstat and fdisk](#vmstat-and-fdisk)
35
-    -   [lsof](#lsof)
36
-    -   [fuser](#fuser)
37
-    -   [ldd](#ldd)
38
-    -   [gdb](#gdb)
39
-    -   [Other Troubleshooting Tools Installed by
40
-        Default](#other-troubleshooting-tools-installed-by-default)
41
-    -   [Installing More Tools from
42
-        Repositories](#installing-more-tools-from-repositories)
43
-    -   [Linux Troubleshooting Tools Not on Photon
44
-        OS](#linux-troubleshooting-tools-not-on-photon-os)
45
--   [Systemd](#systemd)
46
-    -   [Viewing Services](#viewing-services)
47
-    -   [Using Systemd Commands Instead of Init.d
48
-        Commands](#using-systemd-commands-instead-of-init.d-commands)
49
-    -   [Analyzing System Logs with
50
-        journalctl](#analyzing-system-logs-with-journalctl)
51
-    -   [Inspecting Services with
52
-        `systemd-analyze`](#inspecting-services-with-systemd-analyze)
53
--   [Networking](#networking)
54
-    -   [Managing the Network
55
-        Configuration](#managing-the-network-configuration)
56
-    -   [Use `ip` and `ss` Commands Instead of `ifconfig` and
57
-        `netstat`](#use-ip-and-ss-commands-instead-of-ifconfig-and-netstat)
58
-    -   [Inspecting the Status of Network Links with
59
-        `networkctl`](#inspecting-the-status-of-network-links-with-networkctl)
60
-    -   [Turning on Network
61
-        Debugging](#turning-on-network-debugging)
62
-    -   [Installing the Packages for tcpdump and netcat with
63
-        tdnf](#installing-the-packages-for-tcpdump-and-netcat-with-tdnf)
64
-    -   [Checking Firewall Rules](#checking-firewall-rules)
65
-    -   [Netmgr](#netmgr)
66
--   [File System](#file-system)
67
-    -   [Checking Disk Space](#checking-disk-space)
68
-    -   [Adding a Disk and Partitioning
69
-        It](#adding-a-disk-and-partitioning-it)
70
-    -   [Expanding Disk Partition](#expanding-disk-partition)
71
-    -   [fdisk](#fdisk)
72
-    -   [fsck](#fsck)
73
-    -   [Fixing File System Errors When fsck
74
-        Fails](#fixing-file-system-errors-when-fsck-fails)
75
--   [Packages](#packages)
76
--   [Kernel Problems and Boot and Login
77
-    Problems](#kernel-problems-and-boot-and-login-problems)
78
-    -   [Kernel Overview](#kernel-overview)
79
-    -   [Boot Process Overview](#boot-process-overview)
80
-    -   [Blank Screen on Reboot](#blank-screen-on-reboot)
81
-    -   [Investigating Strange
82
-        Behavior](#investigating-strange-behavior)
83
-    -   [Investigating the Guest Kernel When You Cannot Log
84
-        On](#investigating-the-guest-kernel-when-you-cannot-log-on)
85
-    -   [Kernel Log Replication with
86
-        VProbes](#kernel-log-replication-with-vprobes)
87
--   [Performance Issues](#performance-issues)
88
-
89
-
90
-
91
-## Introduction 
92
-
93
-This guide describes the fundamentals of troubleshooting problems on Photon OS. An open-source minimalist Linux operating system from VMware, Photon OS is optimized for cloud computing platforms, VMware vSphere deployments, virtual appliances, and applications native to the cloud.
94
-
95
-This guide covers the basics of troubleshooting systemd, packages, network interfaces, services such as SSH and Sendmail, the file system, and the Linux kernel. The guide includes a quick tour of the tools that you can use for troubleshooting and provides examples along the way. The guide also demonstrates how to access the system's log files. 
96
-
97
-For information on how to install and manage Photon OS, see the [Photon OS Administration Guide](https://github.com/vmware/photon/blob/master/docs/photon-admin-guide.md).
98
-
99
-### Systemd and TDNF
100
-
101
-Two characteristics of Photon OS stand out: It manages services with systemd, and it manages packages with its own open source, yum-compatible package manager called tdnf, for Tiny DNF. 
102
-
103
-By using systemd, Photon OS adopts a contemporary Linux standard to bootstrap the user space and concurrently start services--an architecture that differs from traditional Linux systems such as SUSE Linux Enterprise Server 11.
104
-
105
-<!-- [[Image:photon-logo.png|right]] --> 
106
-
107
-A traditional Linux system contains an initialization system called SysVinit. With SLES 11, for instance, SysVinit-style init programs control how the system starts up and shuts down. Init implements system runlevels. A SysVinit runlevel defines a state in which a process or service runs. In contrast to a SysVinit system, systemd defines no such runlevels. Instead, systemd uses a dependency tree of _targets_ to determine which services to start when.
108
-
109
-Because the systemd commands differ from those of an init.d-based Linux system, a section later in this guide illustrates how to troubleshoot by using systemctl commands instead of init.d-style commands. 
110
-
111
-Tdnf keeps the operating system as small as possible while preserving yum's robust package-management capabilities. On Photon OS, tdnf is the default package manager for installing new packages. Since troubleshooting with tdnf differs from using yum, a later section of this guide describes how to solve problems with packages and repositories by using tdnf commands.
112
-
113
-### The Root Account and the `sudo` and `su` Commands
114
-
115
-This guide assumes that you are logged in to Photon OS with the root account and running commands as root. The sudo program comes with the full version of Photon OS. On the minimal version, you must install sudo with tdnf if you want to use it. As an alternative to installing sudo on the minimal version, you can switch users as needed with the `su` command to run commands that require root privileges.
116
-
117
-### Checking the Version and Build Number
118
-
119
-To check the version and build number of Photon OS, concatenate `/etc/photon-release`. Example: 
120
-
121
-	cat /etc/photon-release
122
-	VMware Photon Linux 1.0
123
-	PHOTON_BUILD_NUMBER=a6f0f63
124
-
125
-The build number in the results maps to the commit number on the VMware Photon OS GitHub [commits page](https://github.com/vmware/photon/commits/master).
126
-
127
-### General Best Practices
128
-
129
-When troubleshooting, you should follow some general best practices:
130
-
131
-* **Take a snapshot.** Before you do anything to a virtual machine running Photon OS, take a snapshot of the VM so that you can restore it if need be. 
132
-
133
-* **Make a backup copy.** Before you change a configuration file, make a copy of the original in case you need to restore it later; example: `cp /etc/tdnf/tdnf.conf /etc/tdnf/tdnf.conf.orig`
134
-
135
-* **Collect logs.** Save the log files associated with a Photon OS problem; you or others might need them later. Include not only the log files on the guest but also the `vmware.log` file on the host; `vmware.log` is in the host's directory that contains the VM.
136
-
137
-* **Know what's in your toolbox.** Glance at the man page for a tool before you use it so that you know what your options are. The options can help focus the command's output on the problem you're trying to solve.
138
-
139
-* **Understand the system.** The more you know about the operating system and how it works, the better you can troubleshoot.
140
-
141
-### Logs on Photon OS
142
-
143
-On Photon OS, all the system logs except the installation log and the cloud-init log are written into the systemd journal. The `journalctl` command queries the contents of the systemd journal.
144
-
145
-The installation log files and the cloud-init log files reside in `/var/log`. If Photon OS is running on a virtual machine in a VMware hypervisor, the log file for the VMware tools (vmware-vmsvc.log) also resides in `/var/log`. 
146
-
147
-### Troubleshooting Progression
148
-
149
-If you encounter a problem running an application or appliance on Photon OS and you suspect it involves the operating system, you can troubleshoot by proceeding as follows. 
150
-
151
-First, check the services running on Photon OS:
152
-
153
-	systemctl status
154
-
155
-Second, check your application's log files for clues. (For VMware applications, see [Location of Log Files for VMware Products](https://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1021806).)
156
-
157
-Third, check the service controller or service monitor for your application or appliance. 
158
-
159
-Fourth, check the network interfaces and other aspects of the network service with `systemd-network` commands.
160
-
161
-Fifth, check the operating system's log files: 
162
-
163
-	journalctl
164
-
165
-Next, run the following commands to view all services according to the order in which they were started:
166
-
167
-	systemd-analyze critical-chain 
168
-
169
-Finally, if the previous steps have not revealed enough information to isolate the problem, turn to the troubleshooting tool that you think is most likely to help with the issue at hand. You could, for example, use `strace` to identify the location of the failure. See the list of troubleshooting tools on Photon OS in a later section. 
170
-
171
-## Solutions to Common Problems
172
-
173
-This section describes solutions to problems that you're likely to encounter.
174
-
175
-### Resetting a Lost Root Password
176
-
177
-Here's how to reset a lost root password. 
178
-
179
-First, restart the Photon OS machine or the virtual machine running Photon OS. When the Photon OS splash screen appears as it restarts, type the letter `e` to go to the GNU GRUB edit menu. Be quick about it: Because Photon OS reboots so quickly, you won't have much time to type `e`. Remember that in vSphere and Workstation, you might have to give the console focus by clicking in its window before it will register input from the keyboard. 
180
-
181
-Second, in the GNU GRUB edit menu, go to the end of the line that starts with `linux`, add a space, and then add the following code exactly as it appears below:
182
-
183
-	rw init=/bin/bash
184
-
185
-After you add this code, the GNU GRUB edit menu should look exactly like this:
186
-
187
-![The modified GNU GRUB edit menu](images/grub-edit-menu-changepw.png) 
188
-
189
-Now type `F10`.
190
-
191
-At the command prompt, type `passwd` and then type (and re-enter) a new root password that conforms to the password complexity rules of Photon OS. Remember the password. 
192
-
193
-Next, type the following command:
194
-
195
-	umount /
196
-
197
-Finally, type the following command. You must include the `-f` option to force a reboot; otherwise, the kernel enters a state of panic.
198
-
199
-	reboot -f
200
-
201
-This sequence of commands should look like this:
202
-
203
-![The series of commands to reset the root password](images/resetpw.png)
204
-
205
-After the Photon OS machine reboots, log in with the new root password. 
206
-
207
-### Fixing Permissions on Network Config Files
208
-
209
-If you, as the root user, create a new network configuration file on Photon OS, the network service might be unable to process it until you set the file's mode bits to `644`.
210
-
211
-If you query the journal with `journalctl -u systemd-networkd`, you might see the following error message along with an indication that the network service did not start: 
212
-
213
-	could not load configuration files. permission denied
214
-
215
-The permissions on the network files are the likely cause of this problem. Without the correct permissions, networkd-systemd cannot parse and apply the settings, and the network configuration that you created will not be loaded. 
216
-
217
-After you create a network configuration file with a `.network` extension, you must run the `chmod` command to set the new file's mode bits to `644`. Example: 
218
-
219
-    chmod 644 10-static-en.network
220
-
221
-For Photon OS to apply the new configuration, you must restart the `systemd-networkd` service by running the following command: 
222
-
223
-	systemctl restart systemd-networkd
224
-
225
-###	Permitting Root Login with SSH
226
-
227
-The full version of Photon OS prevents root login with SSH by default. To permit root login over SSH, open `/etc/ssh/sshd_config` with the vim text editor and set `PermitRootLogin` to `yes`. 
228
-
229
-Vim is the default text editor available in both the full and minimal versions of Photon OS. (Nano is also in the full version.) After you modify the SSH daemon's configuration file, you must restart the sshd daemon for the changes to take effect. Example: 
230
-
231
-	vim /etc/ssh/sshd_config
232
-
233
-	# override default of no subsystems
234
-	Subsystem       sftp    /usr/libexec/sftp-server
235
-
236
-	# Example of overriding settings on a per-user basis
237
-	#Match User anoncvs
238
-	#       X11Forwarding no
239
-	#       AllowTcpForwarding no
240
-	#       PermitTTY no
241
-	#       ForceCommand cvs server
242
-	PermitRootLogin yes
243
-	UsePAM yes
244
-
245
-Save your changes in vim and then restart the sshd daemon: 
246
-
247
-	systemctl restart sshd
248
-
249
-You can then connect to the Photon OS machine with the root account over SSH:
250
-
251
-	steve@ubuntu:~$ ssh root@198.51.100.131
252
-
253
-### Fixing Sendmail If Installed Before an FQDN Was Set
254
-
255
-If Sendmail is behaving improperly or if it hangs during installation, it is likely that an FQDN is not set. Take the following corrective action. 
256
-
257
-First, set an FQDN for your Photon OS machine. 
258
-
259
-Then, run the following commands in the order below: 
260
-
261
-    echo $(hostname -f) > /etc/mail/local-host-names
262
-    
263
-    cat > /etc/mail/aliases << "EOF"
264
-        postmaster: root
265
-        MAILER-DAEMON: root
266
-        EOF
267
-
268
-    /bin/newaliases
269
-
270
-    cd /etc/mail
271
-
272
-    m4 m4/cf.m4 sendmail.mc > sendmail.cf
273
-
274
-    chmod 700 /var/spool/clientmqueue
275
-
276
-    chown smmsp:smmsp /var/spool/clientmqueue
277
-
278
-## Common Troubleshooting Tools on Photon OS
279
-
280
-This section describes tools that can help troubleshoot problems. These tools are installed by default on the full version of Photon OS. On the minimal version of Photon OS, you may have to install a tool before you can use it. 
281
-
282
-There is a manual, or man page, on Photon OS for all the tools covered in this section. The man pages provide more information about each tool's commands, options, and output. To view a tool's man page, on the Photon OS command line, type `man` and then the name of the tool. Example: 
283
-
284
-	man strace
285
-
286
-Some of the examples in this section are marked as abridged with ellipsis (`...`).
287
-
288
-### Top
289
-
290
-Photon OS includes the Top tool to monitor system resources, workloads, and performance. It can unmask problems caused by processes or applications overconsuming CPUs, time, or RAM. 
291
-
292
-To view a textual display of resource consumption, run the `top` command: 
293
-
294
-	top
295
-
296
-In Top, you can kill a runaway or stalled process by typing `k` followed by its process ID (PID). 
297
-
298
-![Top on Photon OS](images/top-in-photon-os.png)
299
-
300
-If the percent of CPU utilization is consistently high with little idle time, there might be a runaway process overconsuming CPUs. Restarting the service might solve the problem. 
301
-
302
-A handy trick while troubleshooting an unknown issue is to run Top in the background by using batch mode to write its output to a file in order to collect data about performance:
303
-
304
-	top d 120 b >> top120second.output
305
-
306
-For a list of options that filter top output and other information, see the man page for Top.
307
-
308
-### ps
309
-
310
-The `ps` tool shows the processes running on the machine. The `ps` tool derives flexibility and power from its options, all of which are covered in the tool's Photon OS man page:
311
-
312
-	man ps
313
-
314
-Here are several popular invocations of `ps` for troubleshooting. 
315
-
316
-Show processes by user: 
317
-
318
-	ps aux
319
-
320
-Show processes and child processes by user: 
321
-
322
-	ps auxf
323
-
324
-Show processes containing the string `ssh`:
325
-
326
-	ps aux | grep ssh
327
-
328
-Show processes and the command and options with which they were started: 
329
-
330
-	ps auxww
331
-
332
-Example abridged output: 
333
-
334
-	ps auxww
335
-	USER        PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
336
-	root          1  0.0  0.9  32724  3300 ?        Ss   07:51   0:32 /lib/systemd/systemd --switched-root --system --deserialize 22
337
-
338
-### netstat
339
-
340
-The `netstat` command can identify bottlenecks causing  performance issues. It lists network connections, listening sockets, port information, and interface statistics for different protocols. Examples: 
341
-
342
-	netstat --statistics
343
-	netstat --listening
344
-
345
-### find
346
-
347
-The `find` command can be a useful starting point to troubleshoot a Photon OS machine that has stopped working. The following command, for example, lists the files in the root directory that have changed in the past day: 
348
-
349
-		find / -mtime -1 
350
-
351
-See the `find` [manual](See https://www.gnu.org/software/findutils/manual/find.html). Take note of the security considerations listed in the `find` manual if you are using `find` to troubleshoot an appliance running on Photon OS. 
352
-
353
-### Locate
354
-
355
-The `locate` command is a fast way to find files and directories when all you have is a keyword. Similar to `find` and part of the same `findutils` package preinstalled on the full version of Photon OS by default, the `locate` command finds file names in the file names database. Before you can use `locate` accurately, you should update its database: 
356
-
357
-	updatedb
358
-
359
-Then you can run `locate` to quickly find a file, such as any file name containing `.network`, which can be helpful to see all the system's `.network` configuration files; abridged example: 
360
-
361
-	locate .network
362
-	/etc/dbus-1/system.d/org.freedesktop.network1.conf
363
-	/etc/systemd/network/10-dhcp-en.network
364
-	/usr/lib/systemd/network/80-container-host0.network
365
-	/usr/lib/systemd/network/80-container-ve.network
366
-	/usr/lib/systemd/system/busnames.target.wants/org.freedesktop.network1.busname
367
-	/usr/lib/systemd/system/dbus-org.freedesktop.network1.service
368
-	/usr/lib/systemd/system/org.freedesktop.network1.busnname
369
-	/usr/share/dbus-1/system-services/org.freedesktop.network1.service
370
-
371
-The `locate` command is also a quick way to see whether a troubleshooting tool is installed on Photon OS. Examples: 
372
-
373
-	locate strace
374
-	/usr/bin/strace
375
-	/usr/bin/strace-graph
376
-	/usr/bin/strace-log-merge
377
-	/usr/share/man/man1/strace.1.gz
378
-	/usr/share/vim/vim74/syntax/strace.vim
379
-
380
-	locate traceroute
381
-
382
-The `strace` tool is there but `traceroute` is not. You can, however, quickly install `traceroute` from the Photon OS repository: 
383
-
384
-	tdnf install traceroute
385
-
386
-
387
-### df
388
-
389
-The `df` command reports the disk space available on the file system. Because running out of disk space can lead an application to fail, a quick check of the available space makes sense as an early troubleshooting step: 
390
-
391
-	df -h
392
-
393
-The `-h` option prints out the available and used space in human-readable sizes. After checking the space, you should also check the number of available inodes. Too few available inodes can lead to difficult-to-diagnose problems:
394
-
395
-	df -i
396
-
397
-### md5sum and sha256sum
398
-
399
-`md5sum` calculates 128-bit MD5 hashes--a message digest, or digital signature, of a file--to uniquely identify a file and verify its integrity after file transfers, downloads, or disk errors when the security of the file is not in question. Photon OS also includes `sha256sum`, which is the preferred method of calculating the authenticity of a file to prevent tampering when security is a concern. Photon OS also includes `shasum`, `sha1sum`, `sha384sum`, and `sha512sum`. See the man pages for  `md3sum`, `sha256sum`, and the other SHA utilities. 
400
-
401
-`md5sum` can help troubleshooting installation issues by verifying that the version of Photon OS being installed matches the version on the Bintray download page. If, for instance, bytes were dropped during the download, the checksums will not match. Try downloading it again. 
402
-
403
-### strace
404
-
405
-The `strace` utility follows system calls and signals as they are executed so that you can see what an application, command, or process is doing. `strace` can trace failed commands, identify where a process obtains its configuration, monitor file activity, and find the location of a crash. 
406
-
407
-By tracing system calls, `strace` can help troubleshoot a broad range of problems, including issues with input-output, memory, interprocess communication, network usage, and application performance. 
408
-
409
-For troubleshooting a problem that gives off few or no clues, the following command displays every system call: 
410
-
411
-	strace ls -al
412
-
413
-With strace commands, you can route the output to a file to make it easier to analyze: 
414
-
415
-	strace -o output.txt ls -al
416
-
417
-`strace` can reveal the files that an application is trying to open with the `-eopen` option. This combination can help troubleshoot an application that is failing because it is missing files or being denied access to a file it needs. If, for example, you see "No such file or directory" in the results of `strace -eopen`, something might be wrong: 
418
-
419
-	strace -eopen sshd
420
-	open("/usr/lib/x86_64/libpam.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
421
-	open("/usr/lib/libpam.so.0", O_RDONLY|O_CLOEXEC) = 3
422
-
423
-In the results above, it's OK that the first file is missing because it is found in the next line. In other cases, the application might be unable to open one of its configuration files or reading the wrong one. If the results say "permission denied" for one of the files, check the permissions of the file with `ls -l` or `stat`.   
424
-
425
-When troubleshooting with `strace`, you can include the process ID in its commands. Here's an example of how to find a process ID: 
426
-
427
-	ps -ef | grep apache
428
-
429
-And you can then use `strace` to examine the file a process is working with: 
430
-
431
-	strace -e trace=file -p 1719
432
-
433
-A similar command can trace network traffic: 
434
-
435
-	strace -p 812 -e trace=network
436
-
437
-If an application is crashing, use `strace` to trace the application and then analyze what happens right before the application crashes.
438
-
439
-You can also trace the child processes that an application spawns with the fork system call, and you can do so with systemctl commands that start a process to identify why an application crashes immediately or fails to start: 
440
-
441
-	strace -f -o output.txt systemctl start httpd
442
-
443
-Here's another example. If journalctl is showing that networkd is failing, you can run strace to help determine why: 
444
-
445
-	strace -o output.txt systemctl restart systemd-networkd
446
-
447
-And then grep inside the results for something, such as _exit_ or _error_: 
448
-
449
-	grep exit output.txt
450
-
451
-Maybe the results indicate systemd-resolved is going wrong, and you can then strace it, too: 
452
-
453
-	strace -f -o output.txt systemctl restart systemd-resolved
454
-
455
-### file
456
-
457
-The `file` command determines the file type, which can help troubleshoot problems when an application mistakes one type of file for another, leading it to misbehave. Example: 
458
-
459
-	file /usr/sbin/sshd
460
-	/usr/sbin/sshd: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, stripped
461
-
462
-### stat
463
-
464
-The `stat` command can help troubleshoot problems with files or the file system by showing the last date it was modified and other information. Example:  
465
-
466
-	stat /dev/sda1
467
-	File: '/dev/sda1'
468
-	Size: 0               Blocks: 0          IO Block: 4096   block special file
469
-	Device: 6h/6d   Inode: 6614        Links: 1     Device type: 8,1
470
-	Access: (0660/brw-rw----)  Uid: (    0/    root)   Gid: (    8/    disk)
471
-	Access: 2016-09-02 12:23:56.135999936 +0000
472
-	Modify: 2016-09-02 12:23:52.879999981 +0000
473
-	Change: 2016-09-02 12:23:52.879999981 +0000
474
-	Birth: -
475
-
476
-On Photon OS, `stat` is handy to show permissions for a file or directory in both their absolute octal notation and their read-write-execute abbreviation; truncated example: 
477
-
478
-	chmod 777 tester.md
479
-	stat tester.md
480
-	  File: 'tester.md'
481
-	  Size: 0               Blocks: 0          IO Block: 4096   regular empty file
482
-	Device: 801h/2049d      Inode: 316385      Links: 1
483
-	Access: (0777/-rwxrwxrwx)  Uid: (    0/    root)   Gid: (    0/    root)
484
-
485
-### watch
486
-
487
-The `watch` utility runs a command at regular intervals so you can observe how its output changes over time. `watch` can help dynamically monitor network links, routes, and other information when you are troubleshooting networking or performance issues. Examples: 
488
-
489
-	watch -n0 --differences ss
490
-	watch -n1 --differences ip route
491
-	
492
-Here's another example with a screenshot of the command's output. This command monitors the traffic on your network links. The highlighted numbers are updated every second so you can see the traffic fluctuating: 
493
-
494
-	watch -n1 --differences ip -s link show up
495
-
496
-![The dynamic output of the watch utility](images/watchcmd.png)  
497
-
498
-### vmstat and fdisk
499
-
500
-The `vmstat` tool displays statistics about virtual memory, processes, block input-output, disks, and CPU activity. This tool can help diagnose performance problems, especially system bottlenecks.  
501
-
502
-Its output on a Photon OS virtual machine running in VMware Workstation 12 Pro without a heavy load looks like this: 
503
-
504
-	vmstat
505
-	procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----
506
-	 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st
507
-	 0  0      0   5980  72084 172488    0    0    27    44  106  294  1  0 98  1  0
508
-
509
-What do all these codes mean? They are explained in the vmstat man page. 
510
-
511
-If `r`, the number of runnable processes, is higher than 10, the machine is under stress; consider intervening to reduce the number of processes or to distribute some of the processes to other machines. In other words, the machine has a bottleneck in executing processes.
512
-
513
-If `cs`, the number of context switches per second, is really high, there may be too many jobs running on the machine. 
514
-
515
-If `in`, the number of interrupts per second, is relatively high, there might be a bottleneck for network or disk IO. 
516
-
517
-You can investigate disk IO further by using vmstat's `-d` option to report disk statistics; abridged example on a machine with little load: 
518
-
519
-	vmstat -d
520
-	disk- ------------reads------------ ------------writes----------- -----IO------
521
-	       total merged sectors      ms  total merged sectors      ms    cur    sec
522
-	ram0       0      0       0       0      0      0       0       0      0      0
523
-	ram1       0      0       0       0      0      0       0       0      0      0
524
-	loop0      0      0       0       0      0      0       0       0      0      0
525
-	loop1      0      0       0       0      0      0       0       0      0      0
526
-	sr0        0      0       0       0      0      0       0       0      0      0
527
-	sda    22744    676  470604   12908  72888  24949  805224  127692      0    130
528
-
529
-The `-D` option summarizes disk statistics:
530
-
531
-	vmstat -D
532
-	           26 disks
533
-	            2 partitions
534
-	        22744 total reads
535
-	          676 merged reads
536
-	       470604 read sectors
537
-	        12908 milli reading
538
-	        73040 writes
539
-	        25001 merged writes
540
-	       806872 written sectors
541
-	       127808 milli writing
542
-	            0 inprogress IO
543
-	          130 milli spent IO
544
-
545
-You can also get statistics about a partition. First, run the `fdisk -l` command to list the machine's devices. Then run `vmstat -p` with the name of a device to view its stats: 
546
-
547
-
548
-	fdisk -l
549
-	Disk /dev/ram0: 4 MiB, 4194304 bytes, 8192 sectors
550
-	Units: sectors of 1 * 512 = 512 bytes
551
-	Sector size (logical/physical): 512 bytes / 4096 bytes
552
-	I/O size (minimum/optimal): 4096 bytes / 4096 bytes
553
-	...
554
-	Device        Start      End  Sectors Size Type
555
-	/dev/sda1      2048 16771071 16769024   8G Linux filesystem
556
-	/dev/sda2  16771072 16777182     6111   3M BIOS boot
557
-
558
-	vmstat -p /dev/sda1
559
-	sda1          reads   read sectors  writes    requested writes
560
-	               22579     473306      78510     866088
561
-
562
-See the vmstat man page for more options. 
563
-
564
-### lsof
565
-
566
-The `lsof` command lists open files. And this tool's definition of an open file is quite broad--directories, libraries, streams, domain sockets, and Internet sockets are all considered files, making `lsof` broadly applicable as a mid-level troubleshooting tool to identify the files a process is using. Because a Linux system like Photon OS uses files to do its work, you can run `lsof` as root to see how the system is using them and to see how an application works. 
567
-
568
-If, for example, you cannot unmount a disk because it is in use, you can run `lsof` to identify the files on the disk that are being used. Here's an example showing what's using the root directory: 
569
-
570
-	lsof /root
571
-	COMMAND    PID USER   FD   TYPE DEVICE SIZE/OFF   NODE NAME
572
-	bash       879 root  cwd    DIR    8,1     4096 262159 /root
573
-	bash      1265 root  cwd    DIR    8,1     4096 262159 /root
574
-	sftp-serv 1326 root  cwd    DIR    8,1     4096 262159 /root
575
-	gdb       1351 root  cwd    DIR    8,1     4096 262159 /root
576
-	bash      1395 root  cwd    DIR    8,1     4096 262159 /root
577
-	lsof      1730 root  cwd    DIR    8,1     4096 262159 /root
578
-
579
-You can do the same with an application or virtual appliance by running `lsof` with the user name or process ID of the app. Here's an example that lists the open files used by the Apache HTTP Server:  
580
-
581
-	lsof -u apache
582
-
583
-Running the command with the `-i` option lists all the open network and Internet files, which can help troubleshoot network problems: 
584
-
585
-	lsof -i
586
-
587
-See the Unix socket addresses of a user like _zookeeper_: 
588
-
589
-	lsof -u zookeeper -U
590
-
591
-And here's an example that shows the processes running on Ports 1 through 80:
592
-
593
-	lsof -i TCP:1-80
594
-	COMMAND  PID   USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
595
-	httpd    403   root    3u  IPv6  10733      0t0  TCP *:http (LISTEN)
596
-	httpd    407 apache    3u  IPv6  10733      0t0  TCP *:http (LISTEN)
597
-	httpd    408 apache    3u  IPv6  10733      0t0  TCP *:http (LISTEN)
598
-	httpd    409 apache    3u  IPv6  10733      0t0  TCP *:http (LISTEN)
599
-	sshd     820   root    3u  IPv4  11336      0t0  TCP *:ssh (LISTEN)
600
-	sshd     820   root    4u  IPv6  11343      0t0  TCP *:ssh (LISTEN)
601
-	sshd    1258   root    3u  IPv4  48040      0t0  TCP 198.51.100.143:ssh->198.51.100.1:49759 (ESTABLISHED)
602
-	sshd    1319   root    3u  IPv4  50866      0t0  TCP 198.51.100.143:ssh->198.51.100.1:51054 (ESTABLISHED)
603
-	sshd    1388   root    3u  IPv4  56438      0t0  TCP 198.51.100.143:ssh->198.51.100.1:60335 (ESTABLISHED)
604
-
605
-You can also inspect the files opened by a process ID. Here's a truncated example that queries the files open by the systemd network service: 
606
-
607
-	lsof -p 1917
608
-	COMMAND    PID            USER   FD      TYPE             DEVICE SIZE/OFF   NODE NAME
609
-	systemd-n 1917 systemd-network  cwd       DIR                8,1     4096      2 /
610
-	systemd-n 1917 systemd-network  txt       REG                8,1   887896 272389 /usr/lib/systemd/systemd-networkd
611
-	systemd-n 1917 systemd-network  mem       REG                8,1   270680 262267 /usr/lib/libnss_files-2.22.so
612
-	systemd-n 1917 systemd-network    0r      CHR                1,3      0t0   5959 /dev/null
613
-	systemd-n 1917 systemd-network    1u     unix 0x0000000000000000      0t0  45734 type=STREAM
614
-	systemd-n 1917 systemd-network    3u  netlink                         0t0   6867 ROUTE
615
-	systemd-n 1917 systemd-network    4u     unix 0x0000000000000000      0t0  45744 type=DGRAM
616
-	systemd-n 1917 systemd-network    9u  netlink                         0t0  45754 KOBJECT_UEVENT
617
-	systemd-n 1917 systemd-network   12u  a_inode               0,11        0   5955 [timerfd]
618
-	systemd-n 1917 systemd-network   13u     IPv4             104292      0t0    UDP 198.51.100.143:bootpc
619
-
620
-### fuser
621
-
622
-The `fuser` command identifies the process IDs of processes using files or sockets. The term _process_ is, in this case, synonymous with _user_. To identify the process ID of a process using a socket, run `fuser` with its namespace option and specify `tcp` or `udp` and the name of the process or port. Examples: 
623
-
624
-	fuser -n tcp ssh
625
-	ssh/tcp:               940  1308
626
-	fuser -n tcp http
627
-	http/tcp:              592   594   595   596
628
-	fuser -n tcp 80
629
-	80/tcp:                592   594   595   596
630
-
631
-
632
-### ldd
633
-
634
-By revealing the shared libraries that a program depends on, `ldd` can help troubleshoot an application that is missing a library or finding the wrong one.
635
-
636
-If, for example, you find output that says "file not found," check the path to the library.  
637
-
638
-	ldd /usr/sbin/sshd
639
-    linux-vdso.so.1 (0x00007ffc0e3e3000)
640
-    libpam.so.0 => (file not found)
641
-    libcrypto.so.1.0.0 => /usr/lib/libcrypto.so.1.0.0 (0x00007f624e570000)
642
-
643
-You can also use the `objdump` command to show dependencies for a program's object files; example:
644
-
645
-	objdump -p /usr/sbin/sshd | grep NEEDED
646
-
647
-### gdb
648
-
649
-The gdb tool is the GNU debugger. It lets you peer inside a program while it executes or when it crashes so that you can catch bugs on the fly. The gdb tool is typically used to debug programs written in C and C++. On Photon OS, gdb can help you determine why an application crashed. See the man page for gdb for instructions on how to run it. For an extensive example on how to use gdb to troubleshoot Photon OS running on a VM when you cannot login to Photon OS, see the section on troubleshooting boot and logon problems. 
650
-
651
-### Other Troubleshooting Tools Installed by Default
652
-
653
-The following troubleshooting tools are included in the full version of Photon OS: 
654
-
655
-* `grep` searches files for patterns. 
656
-* `ping` tests network connectivity. 
657
-* `strings` displays the characters in a file to identify its contents.
658
-* `lsmod` lists loaded modules.
659
-* `ipcs` shows data about the inter-process communication (IPC) resources to which a process has read access--typically, shared memory segments, message queues, and semaphore arrays.
660
-* `nm` lists symbols from object files. 
661
-* `diff` compares files side by side. Useful to compare two configuration files when one version works and the other doesn't. 
662
-
663
-### Installing More Tools from Repositories
664
-
665
-You can install several troubleshooting tools from the Photon OS repositories by using the default package management system, `tdnf`. 
666
-
667
-If a tool you need is not installed, the first thing you should do is search the repositories to see whether it's available. The traceroute tool, for example, is not installed by default. Here's how to search for it in the repositories:  
668
-
669
-	tdnf search traceroute
670
-	traceroute : Traces the route taken by packets over an IPv4/IPv6 network
671
-
672
-The results of the above command show that traceroute exists in the repository. You install it with `tdnf`: 
673
-
674
-	tdnf install traceroute
675
-
676
-Additional tools are not installed by default but are in the repository for instant installation with `tdnf`: 
677
-
678
-* `net-tools`: networking tools.
679
-* `ltrace`: tool for intercepting and recording dynamic library calls. It can identify the function an application was calling when it crashed, making it useful for debugging.
680
-* `nfs-utils`: client tools for the kernel Network File System, or NFS, including showmount; installed by default in the full version of Photon OS but not in the minimal version. 
681
-* `pcstat`: A tool that inspects which pages of a file or files are being cached by the Linux kernel.
682
-* `sysstat` and `sar`: Utilities to monitor system performance and usage activity. Installing sysstat also installs sar.
683
-* `systemtap` and `crash`: The systemtap utility is a programmable instrumentation system for diagnosing problems of performance or function. Installing systemtap also installs crash, which is a kernel crash analysis utility for live systems and dump files.
684
-* `dstat`: versatile tool for viewing and analyzing statistics about system resources.
685
-
686
-The `dstat` tool, for example, can help troubleshoot system performance. The tool shows a live, running list of statistics about system resources: 
687
-
688
-	dstat
689
-	You did not select any stats, using -cdngy by default.
690
-	----total-cpu-usage---- -dsk/total- -net/total- ---paging-- ---system--
691
-	usr sys idl wai hiq siq| read  writ| recv  send|  in   out | int   csw
692
-	  1   0  98   1   0   0|4036B   42k|   0     0 |   0     0 |  95   276
693
-	  1   0  98   1   0   0|   0    64k|  60B  940B|   0     0 | 142   320
694
-	  1   1  98   0   0   0|   0    52k|  60B  476B|   0     0 | 149   385
695
-
696
-
697
-### Linux Troubleshooting Tools Not on Photon OS
698
-
699
-The following Linux troubleshoot tools are neither installed on Photon OS by default nor available in the Photon OS repositories: 
700
-
701
-* iostat
702
-* telnet (use SSH instead)
703
-* Iprm
704
-* hdparm
705
-* syslog (use journalctl instead)
706
-* ddd
707
-* ksysmoops
708
-* xev
709
-* GUI tools (because Photon OS has no GUI)
710
-
711
-## Systemd
712
-
713
-Photon OS manages services with systemd and its command-line utility for inspecting and controlling the system, `systemctl`, not the deprecated commands of init.d. For example, instead of running the /etc/init.d/ssh script to stop and start the OpenSSH server on a init.d-based Linux system, you control the service by running the following systemctl commands on Photon OS: 
714
-
715
-	systemctl stop sshd
716
-	systemctl start sshd
717
-
718
-For an overview of systemd, see [systemd System and Service Manager](https://www.freedesktop.org/wiki/Software/systemd/) and the [man page for systemd](https://www.freedesktop.org/software/systemd/man/systemd.html). The systemd man pages are listed at [https://www.freedesktop.org/software/systemd/man/](https://www.freedesktop.org/software/systemd/man/).
719
-
720
-### Viewing Services 
721
-
722
-To view a description of all the active, loaded units, execute the systemctl command without any options or arguments: 
723
-
724
-	systemctl
725
-
726
-To see all the loaded, active, and inactive units and their description, run this command: 
727
-
728
-	systemctl --all
729
-
730
-To see all the unit files and their current status but no description, run this command: 
731
-
732
-	systemctl list-unit-files
733
-
734
-The `grep` command filters the services by a search term, a helpful tactic to recall the exact name of a unit file without looking through a long list of names. Example: 
735
-
736
-	systemctl list-unit-files | grep network
737
-	org.freedesktop.network1.busname           static
738
-	dbus-org.freedesktop.network1.service      enabled
739
-	systemd-networkd-wait-online.service       enabled
740
-	systemd-networkd.service                   enabled
741
-	systemd-networkd.socket                    enabled
742
-	network-online.target                      static
743
-	network-pre.target                         static
744
-	network.target  
745
-
746
-### Using Systemd Commands Instead of Init.d Commands
747
-
748
-Basic system administration commands on Photon OS differ from those on operating systems that use SysVinit. Since Photon OS uses systemd instead of SysVinit, you must use systemd commands to manage services. 
749
-
750
-For example, to list all the services that you can manage on Photon OS, you run the following command instead of `ls /etc/rc.d/init.d/`: 
751
-
752
-	systemctl list-unit-files --type=service
753
-
754
-Similarly, to check whether the `sshd` service is enabled, on Photon OS you run the following command instead of `chkconfig sshd`:
755
-
756
-	systemctl is-enabled sshd
757
-
758
-The `chkconfig --list` command that shows which services are enabled for which runlevel on a SysVinit computer becomes substantially different on Photon OS because there are no runlevels, only targets: 
759
-
760
-	ls /etc/systemd/system/*.wants
761
-
762
-You can also display similar information with the following command: 
763
-
764
-	systemctl list-unit-files --type=service
765
-
766
-Here is a list of some of the systemd commands that take the place of SysVinit commands on Photon OS: 
767
-
768
-	USE THIS SYSTEMD COMMAND 	INSTEAD OF THIS SYSVINIT COMMAND
769
-	systemctl start sshd 		service sshd start
770
-	systemctl stop sshd 		service sshd stop
771
-	systemctl restart sshd 		service sshd restart
772
-	systemctl reload sshd 		service sshd reload
773
-	systemctl condrestart sshd 	service sshd condrestart
774
-	systemctl status sshd 		service sshd status
775
-	systemctl enable sshd 		chkconfig sshd on
776
-	systemctl disable sshd 		chkconfig sshd off
777
-	systemctl daemon-reload		chkconfig sshd --add
778
-
779
-### Analyzing System Logs with journalctl
780
-
781
-The journalctl tool queries the contents of the systemd journal. On Photon OS, all the system logs except the installation log and the cloud-init log are written into the systemd journal. 
782
-
783
-If called without parameters, the `journalctl` command shows all the contents of the journal, beginning with the oldest entry. To display the output in reverse order with new entries first, include the `-r` option in the command:
784
-
785
-	journalctl -r
786
-
787
-The `journalctl` command includes many options to filter its output. For help troubleshooting systemd, two journalctl queries are particularly useful: showing the log entries for the last boot and showing the log entries for a systemd service unit. This command displays the messages that systemd generated during the last time the machine started: 
788
-
789
-	journalctl -b
790
-
791
-This command reveals the messages for only the systemd service unit specified by the `-u` option, which in the following example is the auditing service: 
792
-
793
-	journalctl -u auditd
794
-
795
-You can look at the messages for systemd itself or for the network service:
796
-
797
-	journalctl -u systemd
798
-	journalctl -u systemd-networkd
799
-
800
-Example:  
801
-
802
-	root@photon-1a0375a0392e [ ~ ]# journalctl -u systemd-networkd
803
-	-- Logs begin at Tue 2016-08-23 14:35:50 UTC, end at Tue 2016-08-23 23:45:44 UTC. --
804
-	Aug 23 14:35:52 photon-1a0375a0392e systemd[1]: Starting Network Service...
805
-	Aug 23 14:35:52 photon-1a0375a0392e systemd-networkd[458]: Enumeration completed
806
-	Aug 23 14:35:52 photon-1a0375a0392e systemd[1]: Started Network Service.
807
-	Aug 23 14:35:52 photon-1a0375a0392e systemd-networkd[458]: eth0: Gained carrier
808
-	Aug 23 14:35:53 photon-1a0375a0392e systemd-networkd[458]: eth0: DHCPv4 address 198.51.100.1
809
-	Aug 23 14:35:54 photon-1a0375a0392e systemd-networkd[458]: eth0: Gained IPv6LL
810
-	Aug 23 14:35:54 photon-1a0375a0392e systemd-networkd[458]: eth0: Configured
811
-
812
-
813
-For more information, see [journalctl](https://www.freedesktop.org/software/systemd/man/journalctl.html) or the journalctl man page by running this command: `man journalctl`
814
-
815
-### Inspecting Services with `systemd-analyze`
816
-
817
-The `systemd-analyze` command reveals performance statistics for boot times, traces system services, and verifies unit files. It can help troubleshoot slow system boots and incorrect unit files. See the man page for a list of options. Examples:
818
-
819
-	systemd-analyze blame
820
-
821
-	systemd-analyze dump
822
-
823
-## Networking
824
-
825
-### Managing the Network Configuration
826
-
827
-The network service, which is enabled by default, starts when the system boots. You manage the network service by using systemd commands, such as systemd-networkd, systemd-resolvd, and networkctl. You can check its status of the network service by running the following command: 
828
-
829
-	systemctl status systemd-networkd
830
-
831
-Here is a healthy result of the command: 
832
-
833
-	* systemd-networkd.service - Network Service
834
-	   Loaded: loaded (/usr/lib/systemd/system/systemd-networkd.service; enabled; vendor preset: enabled)
835
-	   Active: active (running) since Fri 2016-04-29 15:08:51 UTC; 6 days ago
836
-	     Docs: man:systemd-networkd.service(8)
837
-	 Main PID: 291 (systemd-network)
838
-	   Status: "Processing requests..."
839
-	   CGroup: /system.slice/systemd-networkd.service
840
-	           `-291 /lib/systemd/systemd-networkd
841
-
842
-Because Photon OS relies on systemd to manage services, you should employ the systemd suite of commands, not deprecated init.d commands or other deprecated commands, to manage networking. 
843
-
844
-### Use `ip` and `ss` Commands Instead of `ifconfig` and `netstat`
845
-
846
-Although the `ifconfig` command and the `netstat` command work on Photon OS, VMware recommends that you use the `ip` or `ss` commands. The `ifconfig` and `netstat` commands are deprecated. 
847
-
848
-For example, instead of running `netstat` to display a list of network interfaces, consider running the `ss` command. Similarly, to display information for IP addresses, instead of running `ifconfig -a`, run the `ip addr` command. Examples:
849
-
850
-	USE THIS IPROUTE COMMAND 	INSTEAD OF THIS NET-TOOL COMMAND
851
-	ip addr 					ifconfig -a
852
-	ss 							netstat
853
-	ip route 					route
854
-	ip maddr 					netstat -g
855
-	ip link set eth0 up 		ifconfig eth0 up
856
-	ip -s neigh					arp -v
857
-	ip link set eth0 mtu 9000	ifconfig eth0 mtu 9000
858
-
859
-Using the `ip route` version of a command instead of the net-tools version often provides more complete, accurate information on Photon OS, as the following example demonstrates: 
860
-
861
-	ip neigh
862
-	198.51.100.2 dev eth0 lladdr 00:50:56:e2:02:0f STALE
863
-	198.51.100.254 dev eth0 lladdr 00:50:56:e7:13:d9 STALE
864
-	198.51.100.1 dev eth0 lladdr 00:50:56:c0:00:08 DELAY
865
-
866
-	arp -a
867
-	? (198.51.100.2) at 00:50:56:e2:02:0f [ether] on eth0
868
-	? (198.51.100.254) at 00:50:56:e7:13:d9 [ether] on eth0
869
-	? (198.51.100.1) at 00:50:56:c0:00:08 [ether] on eth0
870
-
871
-**Important:** If you modify an IPv6 configuration or add an IPv6 interface, you must restart `systemd-networkd`. Traditional methods of using `ifconfig` commands will be inadequate to register the changes. Run the following command instead: 
872
-
873
-	systemctl restart systemd-networkd
874
-
875
-
876
-### Inspecting the Status of Network Links with `networkctl`
877
-
878
-The `networkctl` command shows information about network connections that helps you configure networking services and troubleshoot networking problems. You can, for example, progressively add options and arguments to the `networkctl` command to move from general information about network connections to specific information about a network connection. 
879
-
880
-Running `networkctl` without options defaults to the list command:  
881
-
882
-	networkctl
883
-	IDX LINK             TYPE               OPERATIONAL SETUP
884
-	  1 lo               loopback           carrier     unmanaged
885
-	  2 eth0             ether              routable    configured
886
-	  3 docker0          ether              routable    unmanaged
887
-	 11 vethb0aa7a6      ether              degraded    unmanaged
888
-	 4 links listed.
889
-
890
-Running `networkctl` with the status command displays information that looks like this; you can see there are active network links with IP addresses for not only the Ethernet connection but also a Docker container. 
891
-
892
-	root@photon-rc [ ~ ]# networkctl status
893
-	*      State: routable
894
-	     Address: 198.51.100.131 on eth0
895
-	              172.17.0.1 on docker0
896
-	              fe80::20c:29ff:fe55:3ca6 on eth0
897
-	              fe80::42:f0ff:fef7:bd81 on docker0
898
-	              fe80::4c84:caff:fe76:a23f on vethb0aa7a6
899
-	     Gateway: 198.51.100.2 on eth0
900
-	         DNS: 198.51.100.2
901
-
902
-You can then add a network link, such as the Ethernet connection, as the argument of the status command to show specific information about the link: 
903
-
904
-	root@photon-rc [ ~ ]# networkctl status eth0
905
-	* 2: eth0
906
-	       Link File: /usr/lib/systemd/network/99-default.link
907
-	    Network File: /etc/systemd/network/10-dhcp-en.network
908
-	            Type: ether
909
-	           State: routable (configured)
910
-	            Path: pci-0000:02:01.0
911
-	          Driver: e1000
912
-	      HW Address: 00:0c:29:55:3c:a6 (VMware, Inc.)
913
-	             MTU: 1500
914
-	         Address: 198.51.100.131
915
-	                  fe80::20c:29ff:fe55:3ca6
916
-	         Gateway: 198.51.100.2
917
-	             DNS: 198.51.100.2
918
-	        CLIENTID: ffb6220feb00020000ab116724f520a0a77337
919
-
920
-And you can do the same thing with the Docker container: 
921
-
922
-	networkctl status docker0
923
-	* 3: docker0
924
-	       Link File: /usr/lib/systemd/network/99-default.link
925
-	    Network File: n/a
926
-	            Type: ether
927
-	           State: routable (unmanaged)
928
-	          Driver: bridge
929
-	      HW Address: 02:42:f0:f7:bd:81
930
-	             MTU: 1500
931
-	         Address: 172.17.0.1
932
-	                  fe80::42:f0ff:fef7:bd81
933
-
934
-In the example above, it is OK that the state of the Docker container is unmanaged; Docker handles managing the networking for the containers without using systemd-resolved or systemd-networkd. Instead, Docker manages the container's connection by using its bridge drive.
935
-
936
-For more information about `networkctl` commands and options, see https://www.freedesktop.org/software/systemd/man/networkctl.html.
937
-
938
-### Turning on Network Debugging
939
-
940
-You can set `systemd-networkd` to work in debug mode so that you can analyze log files with debugging information to help troubleshoot networking problems. The following procedure turns on network debugging by adding a drop-in file in /etc/systemd to customize the default systemd configuration in /usr/lib/systemd. 
941
-
942
-First, run the following command as root to create a directory with this exact name, including the `.d` extension:
943
-
944
-	mkdir -p /etc/systemd/system/systemd-networkd.service.d/
945
-
946
-Second, run the following command as root to establish a systemd drop-in unit with a debugging configuration for the network service:
947
-
948
-	cat > /etc/systemd/system/systemd-networkd.service.d/10-loglevel-debug.conf << "EOF"
949
-	[Service]
950
-	Environment=SYSTEMD_LOG_LEVEL=debug
951
-	EOF
952
- 
953
-You must reload the systemctl daemon and restart the systemd-networkd service for the changes to take effect: 
954
-
955
-	systemctl daemon-reload
956
-	systemctl restart systemd-networkd
957
-
958
-Verify that your changes took effect:
959
-
960
-	systemd-delta --type=extended
961
-
962
-View the log files by running this command: 
963
-
964
-	journalctl -u systemd-networkd
965
-
966
-When you are finished debugging the network connections, turn debugging off by deleting the drop-in file: 
967
-
968
-	rm /etc/systemd/system/systemd-networkd.service.d/10-loglevel-debug.conf
969
-
970
-### Installing the Packages for tcpdump and netcat with tdnf
971
-
972
-The minimal version of Photon OS leaves out several useful networking tools to keep the operating system lean. Tcpdump, for example, is absent in the minimal version but available in the repository. The minimal version does, however, include the iproute2 tools by default. 
973
-
974
-Tcpdump captures and analyzes packets on a network interface. On Photon OS, you install tcpdump and its accompanying package libpcap, a C/C++ library for capturing network traffic, by using tdnf, Photon's command-line package manager: 
975
-
976
-	tdnf install tcpdump
977
-
978
-Netcat, a tool for sending data over network connections with TCP or UDP, appears in neither the minimal nor the full version of Photon OS. But since netcat furnishes powerful options for analyzing, troubleshooting, and debugging network connections, you might want to install it. To do so, run the following command: 
979
-
980
-	tdnf install netcat
981
-
982
-### Checking Firewall Rules
983
-
984
-The design of Photon OS emphasizes security. On the minimal and full versions of Photon OS, the default security policy turns on the firewall and drops packets from external interfaces and  applications. As a result, you might need to add rules to iptables to permit forwarding, allow protocols like HTTP, and open ports. In other words, you must configure the firewall for your applications and requirements. 
985
-
986
-The default iptables settings on the full version look like this:
987
-
988
-	iptables --list
989
-	Chain INPUT (policy DROP)
990
-	target     prot opt source               destination
991
-	ACCEPT     all  --  anywhere             anywhere
992
-	ACCEPT     all  --  anywhere             anywhere             ctstate RELATED,ESTABLISHED
993
-	ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:ssh
994
-
995
-	Chain FORWARD (policy DROP)
996
-	target     prot opt source               destination
997
-
998
-	Chain OUTPUT (policy DROP)
999
-	target     prot opt source               destination
1000
-	ACCEPT     all  --  anywhere             anywhere
1001
-
1002
-
1003
-To find out how to adjust the settings, see the man page for iptables. 
1004
-
1005
-Although the default iptables policy accepts SSH connections, the `sshd` configuration file on the full version of Photon OS  is set to reject SSH connections. See [Permitting Root Login with SSH](#permitting-root-login-with-ssh).
1006
-
1007
-If you are unable to ping a Photon OS machine, one of the first things you should do is check the firewall rules. Do they allow connectivity for the port and protocol in question? You can supplement the `iptables` commands by using `lsof` to, for instance, see the processes listening on ports: 
1008
-
1009
-	lsof -i -P -n
1010
-
1011
-### Netmgr
1012
-
1013
-If you are running a VMware appliance on Photon OS and the VAMI module has problems or if there are networking issues, you can use the Photon OS `netmgr` utility to inspect the networking settings. Make sure, in particular, that the IP addresses for the DNS server and other infrastructure are correct. Use `tcpdump` to analyze the issues. 
1014
-
1015
-If you get an error code from netmgr, it is a standard Unix error code--enter it into a search engine to obtain more information.
1016
-
1017
-## File System
1018
-
1019
-This section covers troubleshooting the file system.
1020
-
1021
-### Checking Disk Space
1022
-
1023
-One of the first simple steps to take when you're troubleshooting is to check how much disk space is available by running the `df` command: 
1024
-
1025
-	df -h
1026
-
1027
-### Adding a Disk and Partitioning It
1028
-
1029
-If the `df` command shows that the file system is indeed nearing capacity, you can add a new disk on the fly and partition it to increase capacity. 
1030
-
1031
-First, add a new disk. You can, for example, add a new disk to a virtual machine by using the VMware vSphere Client. After adding a new disk, check for the new disk by using `fdisk`; see the section on `fdisk` below. In the following example, the new disk is named `/dev/sdb`:
1032
-
1033
-	fdisk -l
1034
-	Device        Start      End  Sectors Size Type
1035
-	/dev/sda1      2048 16771071 16769024   8G Linux filesystem
1036
-	/dev/sda2  16771072 16777182     6111   3M BIOS boot
1037
-	
1038
-	Disk /dev/sdb: 1 GiB, 1073741824 bytes, 2097152 sectors
1039
-	Units: sectors of 1 * 512 = 512 bytes
1040
-	Sector size (logical/physical): 512 bytes / 512 bytes
1041
-	I/O size (minimum/optimal): 512 bytes / 512 bytes
1042
-
1043
-After you confirm that Photon OS registers the new disk, you can partition it with the `parted` wizard. The command to partition the disk on Photon OS is as follows: 
1044
-
1045
-	parted /dev/sdb
1046
-
1047
-And then you use the parted wizard to create it (see the man page for `parted` for more information):
1048
-
1049
-	mklabel gpt
1050
-	mkpart ext3 1 1024
1051
-
1052
-Then you must create a file system on the partition:
1053
-
1054
-	mkfs -t ext3 /dev/sdb1
1055
-
1056
-Make a directory where you will mount the new file system: 
1057
-
1058
-	mkdir /newdata
1059
-
1060
-Finally, open `/etc/fstab` and add the new file system with the options that you want: 
1061
-
1062
-	#system mnt-pt  type    options dump    fsck
1063
-	/dev/sda1       /       ext4    defaults,barrier,noatime,noacl,data=ord$
1064
-	/dev/cdrom      /mnt/cdrom      iso9660 ro,noauto       0       0
1065
-	/dev/sdb1       /newdata        ext3    defaults        0		0
1066
-
1067
-Mount it for now: 
1068
-
1069
-	mount /newdata
1070
-
1071
-Check your work: 
1072
-
1073
-	df -h
1074
-	Filesystem      Size  Used Avail Use% Mounted on
1075
-	/dev/root       7.8G  4.4G  3.1G  59% /
1076
-	devtmpfs        172M     0  172M   0% /dev
1077
-	tmpfs           173M     0  173M   0% /dev/shm
1078
-	tmpfs           173M  664K  172M   1% /run
1079
-	tmpfs           173M     0  173M   0% /sys/fs/cgroup
1080
-	tmpfs           173M   36K  173M   1% /tmp
1081
-	tmpfs            35M     0   35M   0% /run/user/0
1082
-	/dev/sdb1       945M  1.3M  895M   1% /newdata
1083
-
1084
-### Expanding Disk Partition
1085
-
1086
-If you need more space, you can expand the last partition of your disk after resizing the disk. In the examples we are assuming `sda` as disk device.
1087
-
1088
-After the disk is resized in the virtual machine, it's necessary to tell the system to recognize the new disk ending boundary without rebooting:
1089
-
1090
-	echo 1 > /sys/class/block/sda/device/rescan
1091
-
1092
-You will need to install the parted package to resize the disk partition, which is not available by default. Just run the following command to install it: `tdnf install parted`.
1093
-
1094
-	# parted /dev/sda
1095
-	GNU Parted 3.2
1096
-	Using /dev/sda
1097
-	Welcome to GNU Parted! Type 'help' to view a list of commands.
1098
-
1099
-List all partitions available to fix the GPT and check the last partition number:
1100
-
1101
-	(parted) print
1102
-
1103
-	Warning: Not all of the space available to /dev/sda appears to be used, you can
1104
-	fix the GPT to use all of the space (an extra 4194304 blocks) or continue with
1105
-	the current setting? 
1106
-	Fix/Ignore?
1107
-
1108
-Press `f` to fix the GPT layout.
1109
-
1110
-	Model: VMware Virtual disk (scsi)
1111
-	Disk /dev/sda: 34.4GB
1112
-	Sector size (logical/physical): 512B/512B
1113
-	Partition Table: gpt
1114
-	Disk Flags: 
1115
-
1116
-	Number  Start   End     Size    File system  Name  Flags
1117
-	1      1049kB  3146kB  2097kB                     bios_grub
1118
-	2      3146kB  8590MB  8587MB  ext4
1119
-
1120
-In this case we have the partition `2` as last, then we extend the partition to 100% of the remaining size:
1121
-
1122
-	(parted) resizepart 2 100%
1123
-
1124
-Finally, expand the filesystem to the new size:
1125
-
1126
-	resize2fs /dev/sda2
1127
-	resize2fs 1.42.13 (17-May-2015)
1128
-	Filesystem at /dev/sda2 is mounted on /; on-line resizing required
1129
-	old_desc_blocks = 1, new_desc_blocks = 2
1130
-	The filesystem on /dev/sda2 is now 8387835 (4k) blocks long.
1131
-
1132
-The new space is already available in the system:
1133
-
1134
-	df -h
1135
-	Filesystem      Size  Used Avail Use% Mounted on
1136
-	/dev/root        32G  412M   30G   2% /
1137
-	devtmpfs       1001M     0 1001M   0% /dev
1138
-	tmpfs          1003M     0 1003M   0% /dev/shm
1139
-	tmpfs          1003M  252K 1003M   1% /run
1140
-	tmpfs          1003M     0 1003M   0% /sys/fs/cgroup
1141
-	tmpfs          1003M     0 1003M   0% /tmp
1142
-	tmpfs           201M     0  201M   0% /run/user/0
1143
-
1144
-### fdisk
1145
-
1146
-The `fdisk` command manipulates the disk partition table. You can, for example, use `fdisk` to list the disk partitions so that you can identify the root Linux file system. Here is an truncated example showing `/dev/sda1` to be the root Linux partition: 
1147
-
1148
-	fdisk -l
1149
-	Disk /dev/ram0: 4 MiB, 4194304 bytes, 8192 sectors
1150
-	Units: sectors of 1 * 512 = 512 bytes
1151
-	Sector size (logical/physical): 512 bytes / 4096 bytes
1152
-	I/O size (minimum/optimal): 4096 bytes / 4096 bytes
1153
-	...
1154
-	Disk /dev/sda: 8 GiB, 8589934592 bytes, 16777216 sectors
1155
-	Units: sectors of 1 * 512 = 512 bytes
1156
-	Sector size (logical/physical): 512 bytes / 512 bytes
1157
-	I/O size (minimum/optimal): 512 bytes / 512 bytes
1158
-	Disklabel type: gpt
1159
-	Disk identifier: 3CFA568B-2C89-4290-8B52-548732A3972D
1160
-
1161
-	Device        Start      End  Sectors Size Type
1162
-	/dev/sda1      2048 16771071 16769024   8G Linux filesystem
1163
-	/dev/sda2  16771072 16777182     6111   3M BIOS boot
1164
-
1165
-Remember the `fdisk -l` command--it will be used later in a section that demonstrates how to reset a lost root password. 
1166
-
1167
-### fsck
1168
-
1169
-The Photon OS file system includes btrfs and ext4. The default root file system is ext4, which you can see by looking at the file system configuration file, `/etc/fstab`: 
1170
-
1171
-	cat /etc/fstab
1172
-	#system mnt-pt  type    options dump    fsck
1173
-	/dev/sda1       /       ext4    defaults,barrier,noatime,noacl,data=ordered     1       1
1174
-	/dev/cdrom      /mnt/cdrom      iso9660 ro,noauto       0       0
1175
-
1176
-The `1` in the fifth column, under `fsck`, indicates that fsck checks the file system when the system boots.
1177
-
1178
-You can manually check the file system by using the file system consistency check tool, `fsck`, after you unmount the file system. You can also perform a read-only check without unmounting it:
1179
-
1180
-	fsck -nf /dev/sda1
1181
-	fsck from util-linux 2.27.1
1182
-	e2fsck 1.42.13 (17-May-2015)
1183
-	Warning!  /dev/sda1 is mounted.
1184
-	Warning: skipping journal recovery because doing a read-only filesystem check.
1185
-	Pass 1: Checking inodes, blocks, and sizes
1186
-	Pass 2: Checking directory structure
1187
-	Pass 3: Checking directory connectivity
1188
-	Pass 4: Checking reference counts
1189
-	Pass 5: Checking group summary information
1190
-	Free blocks count wrong (1439651, counted=1423942).
1191
-	Fix? no
1192
-	Free inodes count wrong (428404, counted=428397).
1193
-	Fix? no
1194
-	/dev/sda1: 95884/524288 files (0.3% non-contiguous), 656477/2096128 blocks
1195
-
1196
-The inodes count is probably off because the file system is mounted and in use. To fix problems, you must first unmount the file system and then run fsck again: 
1197
-
1198
-	umount /dev/sda1
1199
-	umount: /: target is busy
1200
-	        (In some cases useful info about processes that
1201
-	         use the device is found by lsof(8) or fuser(1).)
1202
-
1203
-So check it with `lsof`:
1204
-
1205
-	lsof | grep ^jbd2/sd
1206
-	jbd2/sda1   99                root  cwd       DIR                8,1     4096          2 /
1207
-	jbd2/sda1   99                root  rtd       DIR                8,1     4096          2 /
1208
-	jbd2/sda1   99                root  txt   unknown                                        /proc/99/exe
1209
-
1210
-The file system is indeed in use. What troubleshooting tool would you use next to further explore the applications or processes that are using the file system?  
1211
-
1212
-### Fixing File System Errors When fsck Fails
1213
-
1214
-A potential issue is that when `fsck` runs during startup, it finds a problem that prevents the system from fully booting until you fix the issue by running fsck manually. This kind of a problem can occur when Photon OS is the operating system for a VM running an appliance. 
1215
-
1216
-If fsck fails when the computer boots and an error message says to run fsck manually, you can troubleshoot by restarting the VM, altering the GRUB edit menu to enter emergency mode before Photon OS fully boots, and running fsck.
1217
-
1218
-1. Take a snapshot of the virtual machine. 
1219
-
1220
-1. Restart the virtual machine running Photon OS. 
1221
-
1222
-1. When the Photon OS splash screen appears as it restarts, type the letter `e` to go to the GNU GRUB edit menu. Be quick about it: Because Photon OS reboots so quickly, you won't have much time to type `e`. Remember that in VMware vSphere or VMware Workstation Pro, you might have to give the console focus by clicking in its window before it will register input from the keyboard. 
1223
-
1224
-1. In the GNU GRUB edit menu, go to the end of the line that starts with `linux`, add a space, and then add the following code exactly as it appears below:
1225
-
1226
-	`systemd.unit=emergency.target`
1227
-
1228
-1. Type `F10`.
1229
-
1230
-1. In the bash shell, run one of the following commands to fix the file system errors, depending on whether `sda1` or `sda2` represents the root file system: 
1231
-
1232
-	`e2fsck -y /dev/sda1`
1233
-
1234
-	or
1235
-
1236
-	`e2fsck -y /dev/sda2`
1237
-
1238
-1. Restart the virtual machine.
1239
-
1240
-
1241
-## Packages
1242
-
1243
-On Photon OS, tdnf is the default package manager. The standard syntax for `tdnf` commands is the same as that for DNF and Yum: 
1244
-
1245
-	tdnf [options] <command> [<arguments>...]
1246
-
1247
-The main configuration files reside in `/etc/tdnf/tdnf.conf`. The repositories appear in `/etc/yum.repos.d/` with `.repo` file extensions. For more information, see the [Photon OS Administration Guide](https://github.com/vmware/photon/blob/master/docs/photon-admin-guide.md).
1248
-
1249
-The cache files for data and metadata reside in `/var/cache/tdnf`. The local cache is populated with data from the repository: 
1250
-
1251
-	ls -l /var/cache/tdnf/photon
1252
-	total 8
1253
-	drwxr-xr-x 2 root root 4096 May 18 22:52 repodata
1254
-	d-wxr----t 3 root root 4096 May  3 22:51 rpms
1255
-
1256
-You can clear the cache to help troubleshoot a problem, but keep in mind that doing so might slow the performance of tdnf until the cache becomes repopulated with data. Cleaning the cache can remove stale information. Here is how to clear the cache: 
1257
-
1258
-	tdnf clean all
1259
-	Cleaning repos: photon photon-extras photon-updates lightwave
1260
-	Cleaning up everything
1261
-
1262
-Some tdnf commands can help you troubleshoot problems with packages:
1263
-
1264
-`makecache`: This command updates the cached binary metadata for all known repositories. You can run it after you clean the cache to make sure you are working with the latest repository data as you troubleshoot. Example:
1265
-
1266
-	tdnf makecache
1267
-	Refreshing metadata for: 'VMware Lightwave 1.0(x86_64)'
1268
-	Refreshing metadata for: 'VMware Photon Linux 1.0(x86_64)Updates'
1269
-	Refreshing metadata for: 'VMware Photon Extras 1.0(x86_64)'
1270
-	Refreshing metadata for: 'VMware Photon Linux 1.0(x86_64)'
1271
-	Metadata cache created.
1272
-
1273
-`tdnf check-local`: This command resolves dependencies by using the local RPMs to help check RPMs for quality assurance before publishing them. To check RPMs with this command, you must create a local directory and place your RPMs in it. The command, which includes no options, takes the path to the local directory containing the RPMs as its argument. The command does not, however, recursively parse directories; it checks the RPMs only in the directory that you specify. For example, after creating a directory named `/tmp/myrpms` and placing your RPMs in it, you can run the following command to check them:  
1274
-
1275
-	tdnf check-local /tmp/myrpms
1276
-	Checking all packages from: /tmp/myrpms
1277
-	Found 10 packages
1278
-	Check completed without issues
1279
-
1280
-`tdnf provides`: This command finds the packages that provide the package that you supply as an argument. If you are used to a package name for another system, you can use `tdnf provides` to find the corresponding name of the package on Photon OS. Example: 
1281
-
1282
-	tdnf provides docker
1283
-	docker-1.11.0-1.ph1.x86_64 : Docker
1284
-	Repo     : photon
1285
-	docker-1.11.0-1.ph1.x86_64 : Docker
1286
-	Repo     : @System
1287
-
1288
-For a file, you must provide the full path. Here's an example: 
1289
-
1290
-	tdnf provides /usr/include/stdio.h
1291
-	glibc-devel-2.22-8.ph1.x86_64 : Header files for glibc
1292
-	Repo     : photon
1293
-	glibc-devel-2.22-8.ph1.x86_64 : Header files for glibc
1294
-	Repo     : @System
1295
-
1296
-Here's an example that shows you how to find the package that provides a pluggable authentication module, which you might need to find if the system is mishandling passwords. 
1297
-
1298
-	tdnf provides /etc/pam.d/system-account
1299
-	shadow-4.2.1-7.ph1.x86_64 : Programs for handling passwords in a secure way
1300
-	Repo     : photon
1301
-	shadow-4.2.1-8.ph1.x86_64 : Programs for handling passwords in a secure way
1302
-	Repo     : photon-updates
1303
-
1304
-Additional commands appear in the [Photon OS Administration Guide](https://github.com/vmware/photon/blob/master/docs/photon-admin-guide.md).
1305
-
1306
-If you find a package that is installed but is not working, try re-installing it; example: 
1307
-
1308
-	tdnf reinstall shadow
1309
-	Reinstalling:
1310
-	shadow 	x86_64 	4.2.1-7.ph1   3.85 M
1311
-
1312
-## Kernel Problems and Boot and Login Problems
1313
-
1314
-### Kernel Overview
1315
-
1316
-Photon OS 1.0 uses Linux kernel version 4.4. Troubleshooting kernel problems starts with `dmesg`. The `dmesg` command prints messages from the kernel ring buffer. The following command, for example, presents kernel messages in a human-readable format: 
1317
-
1318
-	dmesg --human --kernel
1319
-
1320
-To examine kernel messages as you perform actions, such as reproducing a problem, in another terminal, you can run the command with the `--follow` option, which waits for new messages and prints them as they occur: 
1321
-
1322
-	dmesg --human --kernel --follow
1323
-
1324
-The kernel buffer is limited in memory size. As a result, the kernel cyclically overwrites the end of the information in the buffer from which dmesg pulls information. The systemd journal, however, saves the information from the buffer to a log file so that you can access older information. To view it, run the following command: 
1325
-
1326
-	journalctl -k
1327
-
1328
-If need be, you can check the modules that are loaded on your Photon OS machine by running the `lsmod` command; truncated example:  
1329
-
1330
-	lsmod
1331
-	Module                  Size  Used by
1332
-	vmw_vsock_vmci_transport    28672  1
1333
-	vsock                  36864  2 vmw_vsock_vmci_transport
1334
-	coretemp               16384  0
1335
-	hwmon                  16384  1 coretemp
1336
-	crc32c_intel           24576  0
1337
-	hid_generic            16384  0
1338
-	usbhid                 28672  0
1339
-	hid                   106496  2 hid_generic,usbhid
1340
-	xt_conntrack           16384  1
1341
-	iptable_nat            16384  0
1342
-	nf_conntrack_ipv4      16384  2
1343
-	nf_defrag_ipv4         16384  1 nf_conntrack_ipv4
1344
-	nf_nat_ipv4            16384  1 iptable_nat
1345
-	nf_nat                 24576  1 nf_nat_ipv4
1346
-	iptable_filter         16384  1
1347
-	ip_tables              24576  2 iptable_filter,iptable_nat
1348
-
1349
-
1350
-### Boot Process Overview
1351
-
1352
-When a Photon OS machine boots, the BIOS initializes the hardware and uses a boot loader to start the kernel. After the kernel starts, systemd takes over and boots the rest of the operating system. 
1353
-
1354
-More specifically, the BIOS checks the memory and initializes the keyboard, the screen, and other peripherals. When the BIOS finds the first hard disk, the boot loader--GNU GRUB 2.02--takes over. From the hard disk, GNU GRUB loads the master boot record (MBR) and initializes the root partition of the random-access memory by using initrd. The device manager, udev, provides initrd with the drivers it needs to access the device containing the root file system. Here's what the GNU GRUB edit menu looks like in Photon OS with its default commands to load the boot record and initialize the RAM disk: 
1355
-
1356
-![The GNU GRUB edit menu in the full and minimal versions of Photon OS](images/grub-edit-menu-orig.png)  
1357
-
1358
-At this point, the Linux kernel in Photon OS, which is kernel version 4.4.8, takes control. Systemd kicks in, initializes services in parallel, mounts the rest of the file system, and checks the file system for errors. 
1359
-
1360
-### Blank Screen on Reboot
1361
-
1362
-If the Photon OS kernel enters a state of panic during a reboot and all you see is a blank screen, note the name of the virtual machine running Photon OS and then power off the VM. 
1363
-
1364
-In the host, open the `vmware.log` file for the VM. When a kernel panics, the guest VM prints the entire kernel log in  `vmware.log` in the host's directory containing the VM. This log file contains the output of the `dmesg` command from the guest, and you can analyze it to help identify the cause of the boot problem. 
1365
-
1366
-Here's an example. After searching for `Guest:` in the following abridged `vmware.log`, this line appears, identifying the root cause of the reboot problem: 
1367
-
1368
-	2016-08-30T16:02:43.220-07:00| vcpu-0| I125: Guest: 
1369
-	<0>[1.125804] Kernel panic - not syncing: 
1370
-	VFS: Unable to mount root fs on unknown-block(0,0)
1371
-
1372
-Further inspection finds the following lines: 
1373
-
1374
-	2016-08-30T16:02:43.217-07:00| vcpu-0| I125: Guest: 
1375
-	<4>[    1.125782] VFS: Cannot open root device "sdc1" or unknown-block(0,0): error -6
1376
-	2016-08-30T16:02:43.217-07:00| vcpu-0| I125: Guest: 
1377
-	<4>[    1.125783] Please append a correct "root=" boot option; 
1378
-	here are the available partitions: 
1379
-	2016-08-30T16:02:43.217-07:00| vcpu-0| I125: Guest: 
1380
-	<4>[    1.125785] 0100            4096 ram0  (driver?)
1381
-	...
1382
-	0800         8388608 sda  driver: sd
1383
-	2016-08-30T16:02:43.220-07:00| vcpu-0| I125: Guest: 
1384
-	<4>[    1.125802]   0801         8384512 sda1 611e2d9a-a3da-4ac7-9eb9-8d09cb151a93
1385
-	2016-08-30T16:02:43.220-07:00| vcpu-0| I125: Guest: 
1386
-	<4>[    1.125803]   0802            3055 sda2 8159e59c-b382-40b9-9070-3c5586f3c7d6
1387
-
1388
-In this unlikely case, the GRUB configuration points to a root device named `sdc1` instead of the correct root device, `sda1`. You can fix the problem by restoring the GRUB GNU edit screen and the GRUB configuration file (`/boot/grub/grub.cfg`) to their original configurations. 
1389
-
1390
-### Investigating Strange Behavior
1391
-
1392
-If you rebooted to address strange behavior before the reboot of if you encountered strange behavior during the reboot but have reached the shell, you should analyze what happened since the previous boot. Start broad by running the following command to check the logs: 
1393
-
1394
-	journalctl
1395
-
1396
-Next, run the following command to look at what happened since the penultimate reboot: 
1397
-
1398
-	journalctl --boot=-1
1399
-
1400
-Then look at the log from the reboot: 
1401
-
1402
-	journalctl -b
1403
-
1404
-If need be, examine the logs for the kernel: 
1405
-
1406
-	journalctl -k
1407
-
1408
-Check which kernel is in use:
1409
-
1410
-	uname -r
1411
-
1412
-The kernel version of Photon OS in the full version is 4.4.8. The kernel version of in the OVA version is 4.4.8-esx. With the ESX version of the kernel, some services might not start. Run this command to check the overall status of services: 
1413
-
1414
-	systemctl status 
1415
-
1416
-If a service is in red, check it: 
1417
-
1418
-	systemctl status service-name
1419
-
1420
-Start it if need be: 
1421
-
1422
-	systemctl start service-name
1423
-
1424
-If looking at the journal and checking the status of services gets you nowhere, run the following `systemd-analyze` commands to examine the boot time and the speed with which services start.
1425
-
1426
-	systemd-analyze time
1427
-	systemd-analyze blame
1428
-	systemd-analyze critical-chain
1429
- 
1430
-Keep in mind that the output of these commands might be misleading because one service might just be waiting for another service to finish initializing.
1431
-
1432
-### Investigating the Guest Kernel When You Cannot Log On
1433
-
1434
-If a VM running Photon OS and an application or virtual appliance is behaving so oddly that, for example, you cannot log on to the machine, you can still troubleshoot by extracting the kernel logs from the guest's memory and analyzing them with `gdb`. 
1435
-
1436
-This advanced troubleshooting method works when you are running Photon OS as the operating system for an application or appliance on VMware Workstation, Fusion, or ESXi. This approach assumes that the virtual machine running Photon OS is functioning normally. 
1437
-
1438
-This troubleshooting method has the following requirements: 
1439
-
1440
-* Root access to a Linux machine other than the one you are troubleshooting. It can be another Photon OS machine, Ubuntu, or another Linux variant. 
1441
-* The `vmss2core` utility from VMware. It is installed by default in VMware Workstation and some other VMware products. If your system doesn't already contain it, you can download it for free from https://labs.vmware.com/flings/vmss2core.
1442
-* A local copy of the Photon OS ISO of the exact same version and release number as the Photon OS machine that you are troubleshooting. 
1443
-
1444
-The process to use this troubleshooting method varies by environment. The examples in this section assume that the troublesome Photon OS virtual machine is running in VMware Workstation 12 Pro on a Microsoft Windows 8 Enterprise host. The examples also use an additional, fully functional Photon OS virtual machine running in Workstation.
1445
-
1446
-You can, however, use other hosts, hypervisors, and operating systems--but you will have to adapt the example process below to them. Directory paths, file names, and other aspects might be different on other systems. 
1447
-
1448
-**Overview**   
1449
-
1450
-The process to apply this troubleshooting method goes like this: On a local computer, you open a file on the Photon OS ISO that contains Linux debugging information. Then you suspend the troublesome Photon OS VM and extract the kernel memory logs from the VMware hypervisor running Photon OS. 
1451
-
1452
-Next, you use the vmss2core tool to convert the memory logs into core dump files. The vmss2core utility converts VMware checkpoint state files into formats that third-party debugging tools understand. It can handle both suspend (.vmss) and snapshot (.vmsn) checkpoint state files (hereafter referred to as a _vmss file_) as well as monolithic and non-monolithic (separate .vmem file) encapsulation of checkpoint state data. See [Debugging Virtual Machines with the Checkpoint to Core Tool](http://www.vmware.com/pdf/snapshot2core_technote.pdf).
1453
-
1454
-Finally, you prepare to run the gdb tool by using the debug info file from the ISO to create a `.gdbinit` file, which you can then analyze with the gdb shell on your local Linux machine.
1455
-
1456
-All three components must be in the same directory on a Linux machine.  
1457
-
1458
-**Process**
1459
-
1460
-First, obtain a local copy of the Photon OS ISO of the exact same version and release number as the Photon OS machine that you are troubleshooting and mount the ISO on a Linux machine (or open it on a Windows machine):
1461
-
1462
-	mount /mnt/cdrom
1463
-
1464
-Second, locate the following file. (If you opened the Photon OS ISO on a Windows computer, copy the following file to the root folder of a Linux machine.)
1465
-
1466
-	/RPMS/x86_64/linux-debuginfo-4.4.8-6.ph1.x86_64.rpm
1467
-
1468
-Third, on a Linux machine, run the following `rpm2cpio` command to convert the RPM file to a cpio file and to extract the contents of the RPM to the current directory:
1469
-
1470
-	rpm2cpio /mnt/cdrom/RPMS/x86_64/linux-debuginfo-4.4.8-6.ph1.x86_64.rpm | cpio -idmv
1471
-
1472
-From the extracted files, copy the following file to your current directory: 
1473
-
1474
-	cp usr/lib/debug/lib/modules/4.4.8/vmlinux-4.4.8.debug .
1475
-
1476
-Run the following command to download the dmesg functions that will help extract the kernel log from the coredump: <!--	wget https://www.kernel.org/doc/Documentation/kdump/gdbmacros.txt
1477
-
1478
-	wget https://github.com/vmware/photon/blob/master/tools/scripts/gdbmacros-for-linux.txt
1479
-
1480
-Move the file as follows: 
1481
-
1482
-	mv gdbmacros-for-linux.txt .gdbinit
1483
-
1484
-Next, switch to your host machine so you can get the kernel memory files from the VM. Suspend the troublesome VM and locate the `.vmss` and `.vmem` files in the virtual machine's directory on the host. Example: 
1485
-
1486
-	C:\Users\tester\Documents\Virtual Machines\VMware Photon 64-bit (7)>dir
1487
-	 Volume in drive C is Windows
1488
-	 Directory of C:\Users\tester\Documents\Virtual Machines\VMware Photon 64-bit
1489
-	 (7)
1490
-	09/20/2016  12:22 PM    <DIR>          .
1491
-	09/20/2016  12:22 PM    <DIR>          ..
1492
-	09/19/2016  03:39 PM       402,653,184 VMware Photon 64-bit (7)-f6b070cd.vmem
1493
-	09/20/2016  12:11 PM         5,586,907 VMware Photon 64-bit (7)-f6b070cd.vmss
1494
-	09/20/2016  12:11 PM     1,561,001,984 VMware Photon 64-bit (7)-s001.vmdk
1495
-	...
1496
-	09/20/2016  12:11 PM           300,430 vmware.log
1497
-	...
1498
-
1499
-Now that you have located the `.vmss` and `.vmem` files, convert them to one or more core dump files by using the vmss2core tool that comes with Workstation. Here is an example of how to run the command. Be careful with your pathing, escaping, file names, and so forth--all of which might be different from this example on your Windows machine. 
1500
-
1501
-	C:\Users\shoenisch\Documents\Virtual Machines\VMware Photon 64-bit (7)>C:\"Program Files (x86)\VMware\VMware Workstation"\vmss2core.exe "VMware Photon 64-bit (7)-f6b070cd.vmss" "VMware Photon 64-bit (7)-f6b070cd.vmem"
1502
-
1503
-The result of this command is one or more files with a `.core` extension plus a digit. Truncated example: 
1504
-
1505
-	C:\Users\tester\Documents\Virtual Machines\VMware Photon 64-bit (7)>dir
1506
-	 Directory of C:\Users\tester\Documents\Virtual Machines\VMware Photon 64-bit(7)
1507
-	09/20/2016  12:22 PM       729,706,496 vmss.core0
1508
-
1509
-Copy the `.core` file or files to the your current directory on the Linux machine where you so that you can analyze it with gdb. 
1510
-
1511
-Run the following `gdb` command to enter the gdb shell attached to the memory core dump file. You might have to change the name of the `vmss.core` file in the example to match your `.core` file:
1512
-
1513
-	gdb vmlinux-4.4.8.debug vmss.core0
1514
-
1515
-	GNU gdb (GDB) 7.8.2
1516
-	Copyright (C) 2014 Free Software Foundation, Inc.
1517
-	License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
1518
-	This is free software: you are free to change and redistribute it. 
1519
-	There is NO WARRANTY, to the extent permitted by law. ...
1520
-	Type "show configuration" for configuration details.
1521
-	For bug reporting instructions, please see:
1522
-	<http://www.gnu.org/software/gdb/bugs/>.
1523
-	Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>.
1524
-	For help, type "help".
1525
-	Type "apropos word" to search for commands related to "word"...
1526
-	Reading symbols from vmlinux-4.4.8.debug...done.
1527
-	warning: core file may not match specified executable file.
1528
-	[New LWP 12345]
1529
-	Core was generated by `GuestVM'.
1530
-	Program terminated with signal SIGSEGV, Segmentation fault.
1531
-	#0  0xffffffff813df39a in insb (count=0, addr=0xffffc90000144000, port=<optimized out>)
1532
-	    at arch/x86/include/asm/io.h:316
1533
-	316     arch/x86/include/asm/io.h: No such file or directory.
1534
-	(gdb)
1535
-
1536
-In the results above, the _(gdb)_ of the last line is the prompt of the gdb shell. You can now analyze the core dump by using commands like `bt` (to perform a backtrace) and `dmesg` (to view the Photon OS kernel log and see Photon OS kernel error messages). 
1537
-
1538
-### Kernel Log Replication with VProbes
1539
-
1540
-Replicating the Photon OS kernel logs on the VMware ESXi host is an advanced but powerful method of troubleshooting a kernel problem. This method is applicable when the virtual machine running Photon OS is hanging or inaccessible because, for instance, the hard disk has failed.
1541
-
1542
-There is a prerequisite, however: You must have preemptively enabled the VMware VProbes facility on the VM before a problem rendered it inaccessible. You must also create a VProbes script on the ESXi host, but you can do that after the fact. 
1543
-
1544
-Although the foresight to implement these prerequisites might limit the application of this troubleshooting method for production systems, the method can be particularly useful in analyzing kernel issues when testing an application or appliance that is running on Photon OS.   
1545
-
1546
-There are two similar ways in which you can replicate the Photon OS kernel logs on ESXi by using VProbes. The first modifies the VProbes script so that it works only for the VM that you set; it uses a hard-coded address. The second uses an abstraction instead of a hard-coded address so that the same VProbes script can be used for any VM on an ESXi host that you have enabled for VProbe and copied its kernel symbol table (kallsyms) to ESXi.
1547
-
1548
-For more information on VMware VProbes, see [VProbes: Deep Observability Into the ESXi Hypervisor](https://labs.vmware.com/vmtj/vprobes-deep-observability-into-the-esxi-hypervisor) and the [VProbes Programming Reference](http://www.vmware.com/pdf/ws7_f3_vprobes_reference.pdf).
1549
-
1550
-**Using VProbes Script with a Hard-Coded Address**
1551
-
1552
-Here's how to set a VProbe for an individual VM: 
1553
-
1554
-First, power off the VM so that you can turn on the VProbe facility. Edit the `.vmx` configuration file for the VM. The file resides in the directory that contains the VM in the ESXi data store. Add the following line of code to the `.vmx` file and then power the VM on: 
1555
-
1556
-	vprobe.enable = "TRUE"
1557
-
1558
-When you edit the `.vmx` file to add the above line of code, you must first turn off the VM--otherwise, your changes will not persist. 
1559
-
1560
-Second, obtain the kernel log_store function address by connecting to the VM with SSH and running the following commands as root. (Photon OS uses the `kptr_restrict` setting to place restrictions on the kernel addresses exposed through `/proc` and other interfaces. This setting hides exposed kernel pointers to prevent attackers from exploiting kernel write vulnerabilities. When you are done using VProbes, you should return `kptr_restrict` to the original setting of `2` by rebooting.)
1561
-
1562
-	echo 0 > /proc/sys/kernel/kptr_restrict
1563
-	grep log_store /proc/kallsyms
1564
-
1565
-The output of the `grep` command will look similar to the following string. The first set of characters (without the `t`) is the log_store function address:
1566
-
1567
-	ffffffff810bb680 t log_store
1568
-
1569
-Third, connect to the ESXi host with SSH so that you can create a VProbes script. Here's the template for the script; `log_store` in the first line is a placeholder for the VM's log_store function address: 
1570
-
1571
-	GUEST:ENTER:log_store {
1572
-	   string dst;
1573
-	   getgueststr(dst, getguest(RSP+16) & 0xff, getguest(RSP+8));
1574
-	   printf("%s\n", dst);
1575
-	}
1576
-
1577
-On the ESXi host, create a new file, add the template to it, and then change `log_store` to the function address that was the output from the grep command on the VM. 
1578
-
1579
-You must add a `0x` prefix to the function address. In this example, the modified template looks like this: 
1580
-
1581
-	GUEST:ENTER:0xffffffff810bb680 {
1582
-	   string dst;
1583
-	   getgueststr(dst, getguest(RSP+16) & 0xff, getguest(RSP+8));
1584
-	   printf("%s\n", dst);
1585
-	}
1586
-
1587
-Save your VProbes script as `console.emt` in the `/tmp` directory. (The file extension for VProbe scripts is `.emt`.) 
1588
-
1589
-While still connected to the ESXi host with SSH, run the following command to obtain the ID of the virtual machine that you want to troubleshoot: 
1590
-
1591
-	vim-cmd vmsvc/getallvms
1592
-
1593
-This command lists all the VMs running on the ESXi host. Find the VM you want to troubleshoot in the list and make a note of its ID. 
1594
-
1595
-Finally, run the following command to print all the kernel messages from Photon OS in your SSH console; replace `<VM ID>` with the ID of your VM:  
1596
-
1597
-	vprobe -m <VM ID> /tmp/console.emt
1598
-
1599
-When you're done, type `Ctrl-C` to stop the loop. 
1600
-
1601
-**A Reusable VProbe Script Using the kallsyms File**
1602
-
1603
-Here's how to create one VProbe script and use for all the VMs on your ESXi host. 
1604
-
1605
-First, power off the VM and turn on the VProbe facility on each VM that you want to be able to analyze. Add `vprobe.enable = "TRUE"` to the VM's `.vmx` configuration file. See the instructions above. 
1606
-
1607
-Second, power on the VM, connect to it with SSH, and run the following command as root: 
1608
-
1609
-	echo 0 > /proc/sys/kernel/kptr_restrict
1610
-
1611
-Third, connect to the ESXi host with SSH to create the following VProbes script and save it as `/tmp/console.emt`:
1612
-
1613
-	GUEST:ENTER:log_store {
1614
-	   string dst;
1615
-	   getgueststr(dst, getguest(RSP+16) & 0xff, getguest(RSP+8));
1616
-	   printf("%s\n", dst);
1617
-	}
1618
-
1619
-Fourth, from the ESXi host, run the following command to copy the VM's `kallysms` file to the `tmp` directory on the ESXi host: 
1620
-
1621
-	scp root@<vm ip address>:/proc/kallsyms /tmp
1622
-
1623
-While still connected to the ESXi host with SSH, run the following command to obtain the ID of the virtual machine that you want to troubleshoot: 
1624
-
1625
-	vim-cmd vmsvc/getallvms
1626
-
1627
-This command lists all the VMs running on the ESXi host. Find the VM you want to troubleshoot in the list and make a note of its ID. 
1628
-
1629
-Finally, run the following command to print all the kernel messages from Photon OS in your SSH console; replace `<VM ID>` with the ID of your VM. When you're done, type `Ctrl-C` to stop the loop.  
1630
-
1631
-	vprobe -m <VM ID> -k /tmp/kallysyms /tmp/console.emt
1632
-
1633
-You can use a directory other than `tmp` if you want.
1634
-
1635
-<!--
1636
-### Deep Kernel Analysis with the Crash Utility
1637
-
1638
-
1639
-<!-- 
1640
-
1641
-### Go to the Debug Shell
1642
-
1643
-‘ panic=1 init=/bin/bash’
1644
-mount –o rw,remount /
1645
-cd /lib/systemd/system/multi-user.target.wants
1646
-ln –s ../debug-shell.service
1647
-umount /
1648
-sync
1649
-exit
1650
-
1651
-After reboot debug-shell will be available on tty9. No password required.
1652
-
1653
-
1654
-
1655
-## Performance Issues
1656
-
1657
-Performance issues can be difficult to troubleshoot because so many variables play a role in overall system performance. Interpreting performance data often depends on the context and the situation. To better identify and isolate variables and to gain insight into performance data, you can use the troubleshooting tools on Photon OS to diagnose the system.  
1658
-
1659
-If you have no indication what the cause of a performance degradation might be, start by getting a broad picture of the system's state. Then look for clues in the data that might point to a cause. The systemd journal is a useful place to start. 
1660
-
1661
-The `top` tool can unmask problems caused by processes or applications overconsuming CPUs, time, or RAM. If the percent of CPU utilization is consistently high with little idle time, for example, there might be a runaway process. Restart it. 
1662
-
1663
-The `netstat --statistics` command can identify bottlenecks causing performance issues. It lists interface statistics for different protocols. 
1664
-
1665
-If `top` and `netstat` reveal no clues, run the `strace ls -al` to view every system call.
1666
-
1667
-The following `watch` command can help dynamically monitor a command to help troubleshoot performance issues:
1668
-
1669
-	watch -n0 --differences <command>
1670
-
1671
-You can, for example, combine `watch` with the `vmstat` command to dig deeper into statistics about virtual memory, processes, block input-output, disks, and CPU activity. Are there any bottlenecks? 
1672
-
1673
-Another option is to use the `dstat` utility. It shows a live, running list of statistics about system resources. 
1674
-
1675
-In addition, `systemd-analyze`, which reveals performance statistics for boot times, can help troubleshoot slow system boots and incorrect unit files.
1676
-
1677
-The additional tools that you select depend on the clues that your initial investigation reveals. The following tools can also help troubleshoot performance: `sysstat`, `sar`, `systemtap`, and `crash`. 
1678
-
1679
-
... ...
@@ -1,8 +1,8 @@
1
-# Photon OS Administration Guide
1
+# Administration Guide
2 2
 
3
-The *Photon OS Administration Guide* describes the fundamentals of administering Photon OS. 
3
+The Photon OS *Administration Guide* describes the fundamentals of administering Photon OS. 
4 4
 
5
-The *Photon OS Administration Guide* covers the basics of managing packages, controlling services with systemd, setting up networking, initializing Photon OS with cloud-init, running Docker containers, and working with other technologies, such as Kubernetes. 
5
+The *Administration Guide* covers the basics of managing packages, controlling services with systemd, setting up networking, initializing Photon OS with cloud-init, running Docker containers, and working with other technologies, such as Kubernetes. 
6 6
 
7 7
 **Product version: 3.0**
8 8
 
... ...
@@ -1,25 +1,29 @@
1
-# Photon OS Administration Guide
1
+# Administration Guide
2 2
 
3 3
 
4 4
 
5
-- [Photon OS Administration Guide](README.md)
5
+- [Administration Guide](README.md)
6 6
 -   [Introduction](introduction.md)
7
+- [Photon OS Packages](photon_os_packages.md)
7 8
     -   [Examining the Packages in the SPECS Directory on Github](examining_packages_spec_dir.md)
8 9
     -   [Looking at the Differences Between the Minimal and the Full
9 10
         Version](differences_between_minimal_and_full_version.md)
10
-    -   [The Root Account and the `sudo` and `su`
11
-        Commands](root_account_and_sudo_commands.md)
12
--   [Tiny DNF for Package
13
-    Management](tiny-dnf-for-package-management.md)
14
-    -   [Configuration Files and
15
-        Repositories](configuration-files-and-repositories.md)
16
-    -   [Options for Commands](options-for-commands.md)
17
-    -   [Commands](commands.md)
18
-    -   [Adding a New Repository](adding-a-new-repository.md)
19
-    -   [Adding the Dev Repository to Get New Packages from the
20
-        GitHub Dev
21
-        Branch](adding-the-dev-repository.md)
22
--   [Managing Services with
11
+    -   [The Root Account and the `sudo` and `su` Commands](root_account_and_sudo_commands.md)
12
+    -   [Photon OS Package Repositories](photon-os-package-repositories.md)
13
+    -   [Examining Signed Packages](signed-packages.md)
14
+    -   [Building a Package from a Source RPM](building-a-package-from-a-source-rpm.md)
15
+    -   [Compiling C++ Code on the Minimal Version of Photon
16
+        OS](compiling-c-code-on-the-minimal-version-of-photon-os.md)        
17
+- [Package Management in Photon OS with `tdnf`](package_management.md)  
18
+    - [Introduction to `tdnf`](tdnf.md)
19
+    - [Configuration Files and Repositories](configuration-files-and-repositories.md)
20
+    - [Adding a New Repository](adding-a-new-repository.md)
21
+    - [Configure a Repository](configure-a-repository.md)
22
+    - [Adding the Dev Repository to Get New Packages from the GitHub Dev Branch](adding-the-dev-repository.md)
23
+    - [Standard Syntax for `tdnf` Commands](standard_tdnf_syntax.md)
24
+        -   [Options for Commands](options-for-commands.md)
25
+        -   [Commands](commands.md)
26
+- [Managing Services with
23 27
     systemd](managing-services-with-systemd.md)
24 28
     -   [Viewing Services](viewing-services.md)
25 29
     -   [Controlling Services](controlling-services.md)
... ...
@@ -32,8 +36,10 @@
32 32
         journalctl](analyzing-systemd-logs-with-journalctl.md)
33 33
     -   [Migrating Scripts to
34 34
         systemd](migrating-scripts-to-systemd.md)
35
+    -   [Installing Sendmail](installing-sendmail.md)        
35 36
 -   [Managing the Network
36 37
     Configuration](managing-the-network-configuration.md)
38
+    -   [Commands to Manage Network Service](network_management_commands.md)
37 39
     -   [Using the Network Configuration Manager](using-the-network-configuration-manager.md)
38 40
     -   [Use `ip` and `ss` Commands Instead of `ifconfig` and
39 41
         `netstat`](use-ip-and-ss-commands.md)
... ...
@@ -42,51 +48,30 @@
42 42
     -   [Setting a Static IP Address](setting-a-static-ip-address.md)
43 43
     -   [Turning Off DHCP](turning-off-dhcp.md)
44 44
     -   [Adding a DNS Server](adding-a-dns-server.md)
45
-    -   [Setting Up Networking for Multiple
46
-        NICs](setting-up-networking-for-multiple-nics.md)
47
-    -   [Combining DHCP and Static IP Addresses with IPv4 and
48
-        IPv6](combining-dhcp-and-static-ip-addresses-with-ipv4-and-ipv6.md)
49
-    -   [Clearing the Machine ID of a Cloned Instance for
50
-        DHCP](clearing-the-machine-id-of-a-cloned-instance-for-dhcp.md)
51
-    -   [Using Predictable Network Interface
52
-        Names](using-predictable-network-interface-names.md)
53
-    -   [Inspecting the Status of Network Links with
54
-        `networkctl`](inspecting-the-status-of-network-links-with-networkctl.md)
55
-    -   [Turning on Network
56
-        Debugging](turning-on-network-debugging.md)
57
-    -   [Mounting a Network File
58
-        System](mounting-a-network-file-system.md)
59
-    -   [Installing the Packages for tcpdump and netcat with
60
-        tdnf](installing-the-packages-for-tcpdump-and-netcat-with-tdnf.md)
45
+    -   [Setting Up Networking for Multiple NICs](setting-up-networking-for-multiple-nics.md)
46
+        -   [Combining DHCP and Static IP Addresses with IPv4 and IPv6](combining-dhcp-and-static-ip-addresses-with-ipv4-and-ipv6.md)
47
+    -   [Clearing the Machine ID of a Cloned Instance for DHCP](clearing-the-machine-id-of-a-cloned-instance-for-dhcp.md)
48
+    -   [Using Predictable Network Interface Names](using-predictable-network-interface-names.md)
49
+    -   [Inspecting the Status of Network Links with `networkctl`](inspecting-the-status-of-network-links-with-networkctl.md)
50
+    -   [Network Debugging](turning-on-network-debugging.md)
51
+    -   [Mounting a Network File System](mounting-a-network-file-system.md)
52
+    -   [Installing the Packages for tcpdump and netcat with `tdnf`](installing-the-packages-for-tcpdump-and-netcat-with-tdnf.md)
53
+    - [Network Configuration Manager - C API](netmgr.c.md)
54
+    - [Network Configuration Manager - Python API](netmgr.python.md)        
61 55
 -   [Cloud-Init on Photon OS](cloud-init-on-photon-os.md)
62
-    -   [Creating a Stand-Alone Photon Machine with
56
+    - [Deploy Photon OS With `cloud-init`](deploy_photon_with_cloud-init.md
57
+    - [Creating a Stand-Alone Photon Machine with
63 58
         cloud-init](creating-a-stand-alone-photon-machine-with-cloud-init.md)
64 59
     -   [Customizing a Photon OS Machine on
65 60
         EC2](customizing-a-photon-os-machine-on-ec2.md)
66 61
     -   [Running a Photon OS Machine on
67 62
         GCE](running-a-photon-os-machine-on-gce.md)
68
--   [Docker Containers](docker-containers.md)
69
--   [Kubernetes](kubernetes.md)
70
--   [Installing Sendmail](installing-sendmail.md
63
+-   [Containers](photon_os_containers.md)
64
+    -   [Docker Containers](docker-containers.md)
65
+    -   [Kubernetes](kubernetes.md)
71 66
 -   [Changing the Locale](changing-the-locale.md)
72
--   [The Default Security Policy of Photon
73
-    OS](default-security-policy-of-photon-os.md)
67
+-   [Security Policy](default-security-policy-of-photon-os.md)
74 68
     -   [Default Firewall Settings](default-firewall-settings.md)
75
-    -   [Default Permissions and
76
-        umask](default-permissions-and-umask.md)
77
--   [Disabling TLS 1.0 to Improve Transport Layer
78
-    Security](disabling-tls.md)
79
--   [Working with Repositories and
80
-    Packages](working-with-repositories-and-packages.md)
81
-    -   [Photon OS Package
82
-        Repositories](photon-os-package-repositories.md)
83
-    -   [Examining Signed Packages](signed-packages.md)
84
-    -   [Building a Package from a Source
85
-        RPM](building-a-package-from-a-source-rpm.md)
86
-    -   [Compiling C++ Code on the Minimal Version of Photon
87
-        OS](compiling-c-code-on-the-minimal-version-of-photon-os.md)
88
-- [Photon Management Daemon Command-line Interface (pmd-cli)](pmd-cli.md)
89
-- [Network Configuration Manager - C API](netmgr.c.md)
90
-- [Photon Network Manager Command-line Interface (netmgr)](netmgr-cli.md)
91
-- [Network Configuration Manager - Python API](netmgr.python.md)
92
-- [Managing Packages in Photon OS with tdnf](tdnf.md)        
69
+    -   [Default Permissions and umask](default-permissions-and-umask.md)
70
+    -   [Disabling TLS 1.0 to Improve Transport Layer Security](disabling-tls-1.0.md)
71
+     
... ...
@@ -1,10 +1,10 @@
1 1
 # Adding a DNS Server 
2 2
 
3
-Photon OS resolves domain names, IP addresses, and network names for local applications by using systemd-resolved. The systemd-resolved daemon automatically creates and maintains the /etc/resolv.conf file, into which systemd-resolved places the IP address of the DNS server. You should therefore never modify the /etc/resolv.conf file.
3
+Photon OS uses `systemd-resolved` to resolve domain names, IP addresses, and network names for local applications. The `systemd-resolved` daemon automatically creates and maintains the `/etc/resolv.conf` file, into which systemd-resolved places the IP address of the DNS server. You must not modify the `/etc/resolv.conf` file.
4 4
 
5
-(If you want to implement a local resolver like bind instead of systemd-resolved, stop the systemd-resolved service and disable it.)
5
+**Note**: If you want to implement a local resolver like `bind` instead of `systemd-resolved`, stop the `systemd-resolved` service and disable it.
6 6
 
7
-If you open the default /etc/resolv.conf file after you deploy Photon OS, it looks like this: 
7
+If you open the default `/etc/resolv.conf` file after you deploy Photon OS, it looks like this: 
8 8
 
9 9
 	root@photon-rc [ ~ ]# cat /etc/resolv.conf
10 10
 	# This file is managed by systemd-resolved(8). Do not edit.
... ...
@@ -16,7 +16,7 @@ If you open the default /etc/resolv.conf file after you deploy Photon OS, it loo
16 16
 
17 17
 	nameserver 198.51.100.2
18 18
 
19
-To add a DNS server to your static network configuration file, insert a DNS key into the Network section of, in this example, /etc/systemd/network/10-eth0-static.network and set it to the IP address of your DNS server: 
19
+To add a DNS server, insert a DNS key into the Network section of the static network configuration file, for example,  `/etc/systemd/network/10-eth0-static.network` and set it to the IP address of your DNS server: 
20 20
 
21 21
 	[Match]
22 22
 	Name=e*
... ...
@@ -26,10 +26,12 @@ To add a DNS server to your static network configuration file, insert a DNS key
26 26
 	Gateway=198.51.0.1
27 27
 	DNS=198.51.0.1
28 28
 
29
-Another way of adding a DNS server is to modify /etc/systemd/resolved.conf--a method that can be particularly useful when your machine is working with DHCP. For more information, see https://www.freedesktop.org/software/systemd/man/resolved.conf.html.
29
+If your machine is working with DHCP, you can add a DNS server by modifying the `/etc/systemd/resolved.conf--a` method.
30 30
 
31
-You can optionally activate the local DNS stub resolver of systemd-resolved by adding `dns` and `resolve` to /etc/nsswitch.conf. To do so, make a backup copy of /etc/nsswitch.conf and then execute the following command as root:
31
+For more information, see https://www.freedesktop.org/software/systemd/man/resolved.conf.html.
32
+
33
+You can optionally activate the local DNS stub resolver of systemd-resolved by adding `dns` and `resolve` to the  `/etc/nsswitch.conf` file. To do so, make a backup copy of the `/etc/nsswitch.conf` file and then execute the following command as root:
32 34
 
33 35
 	sed -i 's/^hosts.*$/hosts: files resolve dns/' /etc/nsswitch.conf
34 36
 
35
-For more information on the systemd-resolved service, see https://www.freedesktop.org/software/systemd/man/systemd-resolved.service.html.
36 37
\ No newline at end of file
38
+For more information about the `systemd-resolved` service, see https://www.freedesktop.org/software/systemd/man/systemd-resolved.service.html.
37 39
\ No newline at end of file
... ...
@@ -1,64 +1,84 @@
1 1
 # Building a Package from a Source RPM
2 2
 
3
-This section describes how to install and build a package on the full version of Photon OS from the package's source RPM. You obtain the source RPMs that Photon OS uses from Bintray: 
3
+This section describes how to install and build a package on the full version of Photon OS from the package's source RPM. Obtain the source RPMs that Photon OS uses from the  Bintray location, [https://bintray.com/vmware/photon](https://bintray.com/vmware/photon)
4 4
 
5
-[https://bintray.com/vmware/photon](https://bintray.com/vmware/photon)
6 5
 
7
-To build a package from its source RPM, or SRPM, Photon OS requires the following packages:  
6
+## Prerequisites
8 7
 
9
-* rpmbuild. This package is installed by default on the full version of Photon OS, so you should not have to install it. 
10
-* gcc. This package is also installed by default on the full version of Photon OS, so you should not have to install it. 
11
-* make, Cmake, automake, or another make package, depending on the package you are trying to install and build from its source RPM. Cmake is installed by default on Photon OS. You can install other make packages if need be by using tdnf or yum.  
8
+- To build a package from its source RPM, or SRPM, Photon OS requires the following packages:  
12 9
 
13
-Another requirement is a local unprivileged user account other than the root account. You should build RPMs as an unprivileged user. Do not build a package as root--building an RPM with the root account might damage your system. 
10
+    * `rpmbuild`. This package is installed by default on the full version of Photon OS, so you should not have to install it. 
11
+    * `gcc`. This package is also installed by default on the full version of Photon OS, so you should not have to install it. 
12
+    * `make`, `Cmake`, `automake`, or another `make` package, depending on the package you are trying to install and build from its source RPM. Cmake is installed by default on Photon OS. 
13
+        
14
+        You can install other make packages by using tdnf or yum.  
15
+- A local unprivileged user account other than the root account. You should build RPMs as an unprivileged user. Do not build a package as `root` becau--building an RPM with the root account might damage your system. 
16
+- Take a snapshot of your virtual machine before building the package if you are building a package on a virtual machine running Photon OS in VMware vSphere, VMware Workstation, or VMware Fusion.
14 17
 
15
-If you are building a package on a virtual machine running Photon OS in VMware vSphere, VMware Workstation, or VMware Fusion, take a snapshot of your virtual machine before building the package. 
16 18
 
17
-VMware recommends that you install and build packages from their source RPMs on the full version of Photon OS. Do not use the minimal version to work with source RPMs.  
18
-
19
-Here's how to install and build an example package--sed, in this case--from its source RPM on Photon OS with an unprivileged account. 
20
-
21
-First, check whether rpmbuild is installed by running the following command: 
22
-
23
-	rpmbuild --version
24
-
25
-If it is not installed, install it by running the following command as root: 
26
-
27
-	tdnf install rpm-build
28
-
29
-Second, create the directories for building RPMs under your local user account's home directory (not under root):
30
-
31
-	mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
32
-
33
-Next, create a .rpmmacros file under your home directory and override the default location of the RPM building tree with the new one. This command overwrites an existing .rpmmacros file. Before running the following command, make sure you do not already have a .rpmmacros file; if a .rpmmacros file exists, back it up under a new name in case you want to restore it later. 
19
+## Procedure
34 20
 
35
-	echo '%_topdir %(echo $HOME)/rpmbuild' > ~/.rpmmacros
36
-
37
-Now place the source RPM file that you want to install and build in the /tmp directory. 
38
-
39
-To install the source file, run the following command with your unprivileged user account, replacing the sed example source RPM with the name of the one that you want to install: 
40
-
41
-	rpm -i /tmp/sed-4.2.2-2.ph1.src.rpm
42
-
43
-The above command unpacks the source RPM and places its .spec file in your ~/rpmbuild/SPECS directory. In the next step, the rpmbuild tool uses the .spec file to build the RPM. 
44
-
45
-To build the RPM, run the following commands with your unprivileged user account. Again, replace the sed.spec example file with the name of the .spec file that you want to build. 
21
+VMware recommends that you install and build packages from their source RPMs on the full version of Photon OS. Do not use the minimal version to work with source RPMs.  
46 22
 
47
-	cd ~/rpmbuild/SPECS
23
+Perfrom the following steps to install and build an example package- `sed` from its source RPM on Photon OS with an unprivileged account. 
24
+
25
+1. check whether rpmbuild is installed by running the following command: 
26
+	
27
+    ```
28
+    rpmbuild --version
29
+```
30
+    If it is not installed, install it by running the following command as root: 
31
+	
32
+    ```
33
+    tdnf install rpm-build
34
+```
35
+
36
+1. Create the directories for building RPMs under your local user account home directory and not under root:
37
+	
38
+    ```
39
+    mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
40
+```
41
+
42
+1. Create a `.rpmmacros` file under your home directory and override the default location of the RPM building tree with the new one. This command overwrites an existing `.rpmmacros` file. Before running the following command, make sure you do not already have a `.rpmmacros file`. If a `.rpmmacros` file exists, back it up under a new name in case you want to restore it later.    
43
+
44
+    ```
45
+echo '%_topdir %(echo $HOME)/rpmbuild' > ~/.rpmmacros
46
+```
47
+
48
+1. Place the source RPM file that you want to install and build in the `/tmp` directory. 
49
+1. Install the source file, run the following command with your unprivileged user account, replacing the sed example source RPM with the name of the one that you want to install: 
50
+
51
+	
52
+    ```
53
+    rpm -i /tmp/sed-4.2.2-2.ph1.src.rpm
54
+    ```
55
+
56
+    The above command unpacks the source RPM and places its `.spec` file in your `~/rpmbuild/SPECS` directory. In the next step, the `rpmbuild` tool uses the `.spec` file to build the RPM. 
57
+1. Build the RPM, run the following commands with your unprivileged user account. Replace the `sed.spec` example file with the name of the `.spec` file that you want to build. 
58
+	
59
+    ```
60
+    cd ~/rpmbuild/SPECS
48 61
 	rpmbuild -ba sed.spec
62
+```
49 63
 
50
-If successful, the rpmbuild -ba command builds the RPM and generates an RPM package file in your ~/rpmbuild/RPMS/x86_64 directory. Example:
51
-
52
-	ls RPMS/x86_64/
64
+    If successful, the rpmbuild -ba command builds the RPM and generates an RPM package file in your ~/rpmbuild/RPMS/x86_64 directory. For example:
65
+	
66
+    ```
67
+    ls RPMS/x86_64/
53 68
 	sed-4.2.2-2.x86_64.rpm  sed-debuginfo-4.2.2-2.x86_64.rpm  sed-lang-4.2.2-2.x86_64.rpm
69
+```
54 70
 
55
-The rpmbuild command also generates a new SRPM file and saves it in your ~/rpmbuild/SRPMS directory. Example:  
71
+    The rpmbuild command also generates a new SRPM file and saves it in your ~/rpmbuild/SRPMS directory. For example:  
56 72
 
57
-	ls SRPMS/
73
+    ```
74
+    ls SRPMS/
58 75
 	sed-4.2.2-2.src.rpm
76
+```
59 77
 
60
-If the rpmbuild command is unsuccessful with an error that it cannot find a library, you must install the RPMs for the library that your source RPM depends on before you can successfully build your source RPM. Iterate through installing the libraries that your source RPM relies on until you can successfully build it. 
61
-
62
-To install the RPM, run the following command with your unprivileged user account:  
78
+    If the rpmbuild command is unsuccessful with an error that it cannot find a library, you must install the RPMs for the library that your source RPM depends on before you can successfully build your source RPM. Iterate through installing the libraries that your source RPM relies on until you can successfully build it. 
63 79
 
64
-	rpm -i RPMS/x86_64/sed-4.2.2-2.x86_64.rpm
65 80
\ No newline at end of file
81
+1. To install the RPM, run the following command with your unprivileged user account:  
82
+	
83
+    ```
84
+rpm -i RPMS/x86_64/sed-4.2.2-2.x86_64.rpm
85
+```
... ...
@@ -1,6 +1,8 @@
1 1
 # Changing the Locale 
2 2
 
3
-You can change the locale if the default locale, shown below by running the `localectl` command, fails to fulfill your requirements: 
3
+You can change the locale if the default locale does not meet your requirements. 
4
+
5
+To find the locale, run the the `localectl` command:  
4 6
 
5 7
     localectl
6 8
     System Locale: LANG=en_US.UTF-8
... ...
@@ -11,6 +13,6 @@ To change the locale, choose the languages that you want from `/usr/share/locale
11 11
 
12 12
     locale-gen.sh
13 13
 
14
-Finally, run the following command to set the new locale, replacing the example (`en_US.UTF-8`) with the locale that you want: 
14
+Finally, run the following command to set the new locale, replacing the example (`en_US.UTF-8`) with the locale that you require: 
15 15
 
16 16
     localectl set-locale LANG="en_US.UTF-8" LC_CTYPE="en_US.UTF-8"
17 17
\ No newline at end of file
... ...
@@ -1,7 +1,7 @@
1 1
 # Clearing the Machine ID of a Cloned Instance for DHCP
2 2
 
3
-Photon OS uses the contents of `/etc/machine-id` to determine the DHCP unique identifier (duid) that is used for DHCP requests. If you use a Photon OS instance as the base system for cloning to create additional Photon OS instances, you should clear the machine-id with this command: 
3
+Photon OS uses the contents of `/etc/machine-id` to determine the DHCP unique identifier (duid) that is used for DHCP requests. If you use a Photon OS instance as the base system for cloning, to create additional Photon OS instances, you must clear the `machine-id` with this command: 
4 4
 
5 5
     echo -n > /etc/machine-id
6 6
 
7
-With the value cleared, systemd regenerates the machine-id and, as a result, all DHCP requests will contain a unique duid. 
8 7
\ No newline at end of file
8
+When the value is cleared, `systemd` regenerates the machine-id and all DHCP requests will contain a unique duid. 
9 9
\ No newline at end of file
... ...
@@ -2,32 +2,7 @@
2 2
 
3 3
 The minimal and full versions of Photon OS include the cloud-init service as a built-in component. Cloud-init is a set of Python scripts that initialize cloud instances of Linux machines. The cloud-init scripts configure SSH keys and run commands to customize the machine without user interaction. The commands can set the root password, create a hostname, configure networking, write files to disk, upgrade packages, run custom scripts, and restart the system. 
4 4
 
5
-There are several ways in which you can deploy Photon OS with cloud-init, including the following: 
6
-
7
-* As a stand-alone Photon machine
8
-* In Amazon Elastic Compute Cloud, called EC2
9
-* In the Google cloud through the Google Compute Engine, or GCE
10
-* In a VMware Vsphere private cloud 
11
-
12
-When a cloud instance of Photon OS starts, cloud-init requires a data source. The data source can be an EC2 file for Amazon's cloud platform, a seed.iso for a stand-alone instance of Photon OS, or the internal capabilities of a system for managing virtual machines, such as VMware vSphere or vCenter. Cloud-init also includes data sources for OpenStack, Apache CloudStack, and OVF. The data source comprises two parts: 
13
-
14
-1. Metadata
15
-2. User data
16
-
17
-The metadata gives the cloud service provider instructions on how to implement the Photon OS machine in the cloud infrastructure. Metadata typically includes the instance ID and the local host name. 
18
-
19
-The user data contains the commands and scripts that Photon OS executes when it starts in the cloud. The user data commonly takes the form of a shell script or a YAML file containing a cloud configuration. The [cloud-init documentation](https://launchpad.net/cloud-init and https://cloudinit.readthedocs.org/en/latest/) contains information about the types of data sources and the formats for metadata and user data. 
20
-
21
-On Photon OS, cloud-init is enabled and running by default. You can check its status like this: 
22
-
23
-	systemctl status cloud-init 
24
-
25
-The Photon OS directory that contains the local data and other resources for cloud-init is here: 
26
-
27
-	/var/lib/cloud
28
-
29
-Photon OS stores the logs for cloud-init in the following file:
30
-
31
-	/var/log/cloud-init.log
32
-
33
-The following sections demonstrate how to use cloud-init to customize a stand-alone Photon OS machine, instantiate a Photon OS machine in the Amazon EC2 cloud, and deploy a virtual machine running Photon OS in vSphere. Each section uses a different combination of the available options for the metadata and the user data that make up the data source. Specifications, additional options, and examples appear in the cloud-init documentation. 
34 5
\ No newline at end of file
6
+- [Deploy Photon OS With `cloud-init`](deploy_photon_with_cloud-init.md)
7
+- [Creating a Stand-Alone Photon Machine with cloud-init](creating-a-stand-alone-photon-machine-with-cloud-init.md)
8
+- [Customizing a Photon OS Machine on EC2](customizing-a-photon-os-machine-on-ec2.md)
9
+- [Running a Photon OS Machine on GCE](running-a-photon-os-machine-on-gce.md)
35 10
\ No newline at end of file
... ...
@@ -1,37 +1,39 @@
1 1
 # Combining DHCP and Static IP Addresses with IPv4 and IPv6 
2 2
 
3
-This section presents examples that demonstrate how to combine DHCP and static IP addresses with both IPv4 and IPv6. 
3
+You can combine DHCP and static IP addresses with both IPv4 and IPv6. 
4 4
 
5
-Here's how to use DHCP to allocate both IPv4 and IPv6 addresses:
5
+## Examples 
6
+
7
+The following example shows how to use DHCP to allocate both IPv4 and IPv6 addresses:
6 8
 
7 9
 	[Network]
8 10
 	DHCP=yes
9 11
 
10
-Here's how to use DHCP to allocate only IPv4 addresses:
12
+The following example shows how to use DHCP to allocate only IPv4 addresses:
11 13
 
12 14
 	[Network]
13 15
 	DHCP=ipv4
14 16
 
15
-Here's how to use DHCP to allocate only IPv6 addresses:
17
+The following example shows how to use DHCP to allocate only IPv6 addresses:
16 18
 
17 19
 	[Network]
18 20
 	DHCP=ipv6
19 21
 
20
-Here's how to use DHCP for IPv4 addresses and static IP addresses for IPv6 addresses: 
22
+The following example shows how to use DHCP for IPv4 addresses and static IP addresses for IPv6 addresses: 
21 23
 
22 24
 	[Network]
23 25
 	DHCP=ipv4
24 26
 	Address=fd00::1/48
25 27
 	Gateway=fd00::252
26 28
 
27
-Here's how to use DHCP for IPv6 addresses and static IP addresses for IPv4: 
29
+The following example shows how to use DHCP for IPv6 addresses and static IP addresses for IPv4: 
28 30
 
29 31
 	[Network]
30 32
 	DHCP=ipv6
31 33
 	Address=10.10.10.1/24
32 34
 	Gateway=10.10.10.253
33 35
 
34
-Here's how to use static IP addresses for both IPv4 and IPv6: 
36
+The following example shows how to use static IP addresses for both IPv4 and IPv6: 
35 37
 
36 38
 	[Network]
37 39
 	DHCP=ipv6
... ...
@@ -61,7 +61,13 @@ To downgrade to a version lower than the next one, you must specify it by name,
61 61
 
62 62
 	tdnf downgrade boost-1.56.0-2.ph1 
63 63
 
64
-**erase**: This command removes the package that you specify as an argument. The following is an example:
64
+**erase**: This command removes the package that you specify as an argument. 
65
+
66
+To remove a package, run the following command: 
67
+
68
+	tdnf erase pkgname
69
+	
70
+The following is an example:
65 71
 
66 72
 	tdnf erase vim
67 73
 	Removing:
... ...
@@ -79,7 +85,12 @@ You can also erase multiple packages:
79 79
 	tdnf info obsoletes
80 80
 	tdnf info upgrades
81 81
 
82
-**install**: This command takes the name of a package as its argument. It then installs the package and its dependencies. The following are examples:
82
+**install**: This command takes the name of a package as its argument. It then installs the package and its dependencies. 
83
+
84
+To install a package, run the following command:
85
+
86
+	tdnf install pkgname
87
+The following are examples:
83 88
 
84 89
 	tdnf install kubernetes
85 90
 
... ...
@@ -98,6 +109,10 @@ The list of packages might be long. To more easily view it, you can concatenate
98 98
 	tdnf list all > pkgs.txt
99 99
 	vi pkgs.txt
100 100
 
101
+To list enabled repositories, run the following command:
102
+
103
+	tdnf repolist
104
+
101 105
 **makecache**: This command updates the cached binary metadata for all known repositories. The following is an example:
102 106
 
103 107
 	tdnf makecache
... ...
@@ -8,7 +8,7 @@ As a minimalist Linux run-time environment, the minimal version of Photon OS lac
8 8
     return 0;
9 9
     }
10 10
 
11
-The errors look something like this: 
11
+The errors appear as follows: 
12 12
 
13 13
     gcc test.c
14 14
     -bash: gcc: command not found
... ...
@@ -19,10 +19,10 @@ The errors look something like this:
19 19
 
20 20
 To enable the minimal version of Photon OS to preprocess, compile, assemble, and link C++ code, you must install the following packages as root with tdnf:
21 21
 
22
-* gcc
23
-* glibc-devel
24
-* binutils
22
+* `gcc`
23
+* `glibc-devel`
24
+* `binutils`
25 25
 
26
-Here's the `tdnf` command to install these packages: 
26
+To install the packages, use the following the `tdnf` command: 
27 27
 
28 28
     tdnf install gcc glibc-devel binutils
29 29
\ No newline at end of file
30 30
new file mode 100644
... ...
@@ -0,0 +1,12 @@
0
+# Configure a Repository
1
+
2
+Photon OS comes with a preconfigured repository called `photon-iso` that resides in `\etc\yum.repos.d.` If you receive an access error message when working with the `photon-iso` repository, it is probably because you do not have the Photon OS ISO mounted. Mount the ISO and the run the following command to update the metadata for all known repositories, including `photon-iso`: 
3
+
4
+	mount /dev/cdrom /media/cdrom
5
+	tdnf makecache
6
+	
7
+	Refreshing metadata for: 'VMware Lightwave 1.0(x86_64)'
8
+	Refreshing metadata for: 'VMware Photon Linux 1.0(x86_64)Updates'
9
+	Refreshing metadata for: 'VMware Photon Extras 1.0(x86_64)'
10
+	Refreshing metadata for: 'VMware Photon Linux 1.0(x86_64)'
11
+	Metadata cache created.
... ...
@@ -1,6 +1,6 @@
1 1
 # Configuring Network Interfaces
2 2
 
3
-Network configuration files for systemd-networkd reside in /etc/systemd/network and /usr/lib/systemd/network. Example:
3
+Network configuration files for systemd-networkd reside in `/etc/systemd/network` and `/usr/lib/systemd/network`. Example:
4 4
 
5 5
 	root@photon-rc [ ~ ]# ls /etc/systemd/network/
6 6
 	99-dhcp-en.network
... ...
@@ -14,7 +14,7 @@ By default, when Photon OS starts, it creates a DHCP network configuration file,
14 14
 	[Network]
15 15
 	DHCP=yes
16 16
 
17
-Network configuration files can also appear in the system network directory, /usr/lib/systemd/network, as the results of the following search illustrate:
17
+Network configuration files can also appear in the system network directory, `/usr/lib/systemd/network`, as the results of the following search illustrate:
18 18
 
19 19
 	root@photon-rc [ ~ ]# updatedb
20 20
 	root@photon-rc [ ~ ]# locate systemd/network
... ...
@@ -26,11 +26,11 @@ Network configuration files can also appear in the system network directory, /us
26 26
 	/usr/lib/systemd/network/99-default.link
27 27
 	root@photon-rc [ ~ ]#
28 28
 
29
-As you can see, the /usr/lib/systemd/network directory contains several network configuration files. Photon OS applies the configuration files in the [lexicographical order](https://en.wikipedia.org/wiki/Lexicographical_order) specified by the file names without regard for the network configuration directory in which the file resides unless the file name is the same. Photon OS processes files with identical names by giving precedence to files in the /etc directory over the other directory. Thus, the settings in /etc/systemd/network override those in /usr/lib/systemd/network. Once Photon OS matches an interface in a file, Photon OS ignores the interface if it appears in files processed later in the lexicographical order. 
29
+In the above search, the `/usr/lib/systemd/network` directory contains several network configuration files. Photon OS applies the configuration files in [lexicographical order](https://en.wikipedia.org/wiki/Lexicographical_order) specified by the file names without regard for the network configuration directory in which the file resides unless the file name is the same. Photon OS processes files with identical names by giving precedence to files in the `/etc` directory over the other directory. Thus, the settings in `/etc/systemd/network` override those in `/usr/lib/systemd/network`. Once Photon OS matches an interface in a file, Photon OS ignores the interface if it appears in files processed later in the lexicographical order. 
30 30
 
31
-Each .network file contains a matching rule and a configuration that Photon OS applies when a device matches the rule. You set the matching rule and the configuration as sections containing vertical sets of key-value pairs according to the information at https://www.freedesktop.org/software/systemd/man/systemd.network.html. 
31
+Each .network file contains a matching rule and a configuration that Photon OS applies when a device matches the rule. Set the matching rule and the configuration as sections containing vertical sets of key-value pairs according to the information in [systemd network configuration](https://www.freedesktop.org/software/systemd/man/systemd.network.html). 
32 32
 
33
-To configure Photon OS to handle a networking use case, such as setting a static IP address or adding a name server, you create a configuration file with a `.network` extension and place it in the /etc/systemd/network directory.
33
+To configure Photon OS to handle a networking use case, such as setting a static IP address or adding a name server,  create a configuration file with a `.network` extension and place it in the `/etc/systemd/network directory`.
34 34
 
35 35
 After you create a network configuration file with a `.network` extension, you must run the `chmod` command to set the new file's mode bits to `644`. Example: 
36 36
 
... ...
@@ -1,36 +1,49 @@
1
-# Creating a Stand-Alone Photon Machine with cloud-init
1
+# Creating a Stand-Alone Photon Machine With cloud-init
2 2
 
3
-Cloud-init can customize a Photon OS virtual machine by using the `nocloud` data source. The nocloud data source bundles the cloud-init metadata and user data into a ISO that acts as a seed when you boot the machine. This seed.iso delivers the metadata and the user data without requiring a network connection. 
3
+Cloud-init can customize a Photon OS virtual machine by using the `nocloud` data source. The `nocloud` data source bundles the `cloud-init` metadata and user data into an ISO that acts as a seed when you boot the machine. The `seed.iso` delivers the metadata and the user data without requiring a network connection. 
4 4
 
5
-Here's how customize a Photon OS VM with a nocloud data source:
5
+**Procedure**
6 6
 
7
-First, create the metadata file with the following lines in the [YAML](http://www.yaml.org/start.html) format and name it `meta-data`:
8 7
 
9
-	instance-id: iid-local01
10
-	local-hostname: cloudimg
8
+1. Create the metadata file with the following lines in the [YAML](http://www.yaml.org/start.html) format and name it `meta-data`:
9
+          
10
+    ```
11
+     instance-id: iid-local01
12
+        	local-hostname: cloudimg
13
+    ```
11 14
 
12
-Second, create the user data file with the following lines in YAML and name it user-data:
15
+1. Create the user data file with the following lines in YAML and name it user-data: 
13 16
 
14
-	#cloud-config
15
-	hostname: testhost
16
-	packages:
17
-	 - vim
17
+      ```
18
+        #cloud-config
19
+    	hostname: testhost
20
+    	packages:
21
+    	 - vim
22
+      ```	 
18 23
 
19
-Third, generate the ISO that will serve as the seed; the ISO must have the volume ID set to `cidata`. In this example, the ISO is generated on an Ubuntu 14.04 computer containing the files named `meta-data` and `user-data` in the local directory: 
24
+3. Generate the ISO that will serve as the seed. The ISO must have the volume ID set to `cidata`. In the following example, the ISO is generated on an Ubuntu 14.04 computer containing the files named `meta-data` and `user-data` in the local directory: 
25
+	
26
+    ```
27
+    genisoimage -output seed.iso -volid cidata -joliet -rock user-data meta-data
28
+    ```
20 29
 
21
-	genisoimage -output seed.iso -volid cidata -joliet -rock user-data meta-data
30
+    The ISO now appears in the current directory: 
22 31
 
23
-The ISO now appears in the current directory: 
24
-
25
-	steve@ubuntu:~$ ls
32
+        ```
33
+    steve@ubuntu:~$ ls
26 34
 	meta-data seed.iso user-data
35
+    ```
27 36
 
28
-Optionally, you can check the ISO that you generated on Ubuntu by transferring the ISO to the root directory of your Photon OS machine and then running the following command: 
29
-
30
-	cloud-init --file seed.iso --debug init
37
+1. Optionally, check the ISO that you generated on Ubuntu by transferring the ISO to the root directory of your Photon OS machine and then running the following command: 
38
+	
39
+    ```
40
+    cloud-init --file seed.iso --debug init
41
+    ```
31 42
 
32
-After running the cloud-init command above, check the cloud-init log file: 
43
+    After running the `cloud-init` command above, check the `cloud-init` log file: 
33 44
 
34
-	more /var/log/cloud-init.log
45
+    ```
46
+    more /var/log/cloud-init.log
47
+    ```
35 48
 
36
-Finally, attach the ISO to the Photon OS virtual machine as a CD-ROM and reboot it so that the changes specified by seed.iso take effect. In this case, cloud-init sets the hostname and adds the vim package.
37 49
\ No newline at end of file
50
+1. Attach the ISO to the Photon OS virtual machine as a CD-ROM and reboot it so that the changes specified by seed.iso take effect. In this case, `cloud-init` sets the `hostname` and adds the `vim` package.
38 51
\ No newline at end of file
... ...
@@ -1,47 +1,64 @@
1 1
 # Customizing a Photon OS Machine on EC2
2 2
 
3
-This section illustrates how to upload an `ami` image of Photon OS to Amazon Elastic Compute Cloud (EC2) and customize the Photon OS machine by using cloud-init with an EC2 data source. The Amazon machine image version of Photon OS is available as a free download on Bintray:
3
+You can upload an `ami` image of Photon OS to Amazon Elastic Compute Cloud (EC2) and customize the Photon OS machine by using `cloud-init` with an EC2 data source. The Amazon machine image version of Photon OS is available as a free download on Bintray at the location `https://bintray.com/vmware/photon/`.
4 4
 
5
-	https://bintray.com/vmware/photon/
5
+The `cloud-init` service is commonly used on EC2 to configure the cloud instance of a Linux image. On EC2, `cloud-init` sets the `.ssh/authorized_keys` file to let you log in with a private key from another computer, that is, a computer besides the workstation that you are already using to connect with the Amazon cloud. 
6 6
 
7
-The cloud-init service is commonly used on EC2 to configure the cloud instance of a Linux image. On EC2, for example, cloud-init typically sets the `.ssh/authorized_keys` file to let you log in with a private key from another computer--that is, a computer besides the workstation that you are already using to connect with the Amazon cloud. The cloud-config user-data file that appears in the following example contains abridged SSH authorized keys to show you how to set them. 
7
+## Example
8 8
 
9
-Working with EC2 requires Amazon accounts for both AWS and EC2 with valid payment information. If you execute the following examples, you will be charged by Amazon. You will need to replace the `<placeholders>` for access keys and other account information in the examples with your account information. 
9
+The cloud-config user-data file that appears in the following example contains abridged SSH authorized keys to show you how to set them. 
10 10
 
11
-The following code assumes you have installed and set up the Amazon AWS CLI and the EC2 CLI tools, including `ec2-ami-tools`. See [Installing the AWS Command Line Interface](http://docs.aws.amazon.com/cli/latest/userguide/installing.html) and [Setting Up the Amazon EC2 Command Line Interface Tools on Linux](http://docs.aws.amazon.com/AWSEC2/latest/CommandLineReference/set-up-ec2-cli-linux.html). Also see [Setting Up the AMI Tools](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/set-up-ami-tools.html). 
11
+### Prerequisites 
12 12
 
13
-EC2 requires an SSH key and an RSA certificate. The code in the examples  assumes that you have created SSH keys as well as an RSA user signing certificate and its corresponding private RSA key file.  
13
+- To work with EC2, obtain Amazon accounts for both AWS and EC2 with valid payment information. If you execute the below examples, you will be charged by Amazon. You must replace the `<placeholders>` for access keys and other account information in the examples with your account information. 
14
+- Install and set up the Amazon AWS CLI and the EC2 CLI tools, including `ec2-ami-tools`. 
15
+    For more information, see [Installing the AWS Command Line Interface](http://docs.aws.amazon.com/cli/latest/userguide/installing.html), [Setting Up the Amazon EC2 Command Line Interface Tools on Linux](http://docs.aws.amazon.com/AWSEC2/latest/CommandLineReference/set-up-ec2-cli-linux.html) and [Setting Up the AMI Tools](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/set-up-ami-tools.html). 
16
+- Create  SSH keys and an RSA user signing certificate and its corresponding private RSA key file.  
14 17
 
15
-Here's a code example that shows how to upload the Photon OS `.ami` image to the Amazon cloud and configure it with cloud-init. The correct virtualization type for Photon OS is `hvm`.   
18
+### Procedure 
16 19
 
17
-	$ mkdir bundled
20
+1. Upload the Photon OS `.ami` image to the Amazon cloud and configure it with cloud-init. The correct virtualization type for Photon OS is `hvm`.   
21
+	
22
+    ```
23
+$ mkdir bundled
18 24
 	$ tar -zxvf ./photon-ami.tar.gz 
19 25
 	$ ec2-bundle-image -c ec2-certificate.pem -k ec2-privatekey.pem -u <EC2 account id>  --arch x86_64 --image photon-ami.raw --destination ./bundled/
20 26
 	$ aws s3 mb s3://<bucket-name>
21 27
 	$ ec2-upload-bundle --manifest ./bundled/photon-ami.manifest.xml --bucket <bucket-name> --access-key <Account Access Key> --secret-key <Account Secret key>
22 28
 	$ ec2-register <bucket-name>/photon-ami.manifest.xml --name photon-ami --architecture x86_64 --virtualization-type hvm
23
-
24
-In the following command, the `--user-data-file` option instructs cloud-init to import the cloud-config data in `user-data.txt`. The next command assumes you have created the keypair called `mykeypair` and the security group photon-sg as well as uploaded the user-data.txt file; see the EC2 documentation.
25
-
26
-    $ ec2-run-instances <ami-ID> --instance-type m3.medium -g photon-sg --key mykeypair --user-data-file user-data.txt
27
-
28
-You can now describe the instance to see its ID: 
29
-
30
-	$ ec2-describe-instances
31
-
32
-And you can run the following command to obtain its public IP address, which you can use to connect to the instance with SSH:
33
-
34
-	$ aws ec2 describe-instances --instance-ids <instance-id> --query 'Reservations[*].Instances[*].PublicIpAddress' --output=text
29
+```
30
+
31
+1. Import the cloud-config data. In the following command, the `--user-data-file` option instructs cloud-init to import the cloud-config data in `user-data.txt`. The command assumes you have uploaded the `user-data.txt file` and created the keypair `mykeypair` and the security group `photon-sg`.
32
+   
33
+    ```
34
+ $ ec2-run-instances <ami-ID> --instance-type m3.medium -g photon-sg --key mykeypair --user-data-file user-data.txt
35
+```
36
+    Describe the instance to see its ID: 
37
+	
38
+    ```
39
+$ ec2-describe-instances
40
+```
41
+    
42
+1. Run the following command to obtain its public IP address, which you can use to connect to the instance with SSH:
43
+	
44
+    ```
45
+$ aws ec2 describe-instances --instance-ids <instance-id> --query 'Reservations[*].Instances[*].PublicIpAddress' --output=text
35 46
 	$ ec2-describe-images
47
+```
36 48
 
37
-**Important**: When you are done, run the following commands to terminate the machine. Because Amazon charges you while the host is running, make sure to shut it down:  
49
+1. Run the following commands to terminate the machine. It is important to shut down the machine because Amazon charges you while the host is running down.   
38 50
 
39
-	$ ec2-deregister <ami-image-identifier>
51
+    ```
52
+$ ec2-deregister <ami-image-identifier>
40 53
 	$ ec2-terminate-instances <instance-id>
54
+```
41 55
 
42
-Here are the contents of the user-data.txt file that cloud-init applies to the machine the first time that it boots up in the cloud: 
56
+### Result
43 57
 
44
-    #cloud-config
58
+The following are the contents of the `user-data.txt` file that `cloud-init` applies to the machine the first time that it boots up in the cloud: 
59
+    
60
+```
61
+#cloud-config
45 62
     hostname: photon-on-01
46 63
     groups:
47 64
     - cloud-admins
... ...
@@ -67,11 +84,12 @@ Here are the contents of the user-data.txt file that cloud-init applies to the m
67 67
 	KYTZS/sdvM/ruubHfq1ldRpgtYSqbkykoe6PCQIDAQABAoIBAEgveQtjVzHDhLTr
68 68
 	rmwJmO316ERfkQ/chLaElhi9qwYJG/jqlNIISWFyztqD1b3fxU6m5MOBIujh7Xpg
69 69
 	... ec3test@example.com
70
+```
70 71
 
71
-Now check the cloud-init output log file on EC2 at `/var/log/cloud-init-output.log`. 
72
+You can view the cloud-init output log file on EC2 at `/var/log/cloud-init-output.log`. 
72 73
 
73 74
 For more information on using cloud-init user data on EC2, see [Running Commands on Your Linux Instance at Launch](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html).
74 75
 
75
-An article on the Photon OS GitHub wiki demonstrates how to get Photon OS up and running on EC2 and run a containerized application in the Docker engine. See [Running Photon OS on Amazon Elastic Cloud Compute](Running-Photon-OS-on-Amazon-Elastic-Cloud-Compute.md).
76
+For more information on how to get Photon OS up and running on EC2 and run a containerized application in the Docker engine, see [Running Photon OS on Amazon Elastic Cloud Compute](Running-Photon-OS-on-Amazon-Elastic-Cloud-Compute.md).
76 77
 
77
-With Photon OS, you can also build cloud images on Google Compute Engine and other cloud providers; see [Compatible Cloud Images](cloud-images.md).
78 78
\ No newline at end of file
79
+With Photon OS, you can also build cloud images on Google Compute Engine and other cloud providers. For more information, see [Compatible Cloud Images](cloud-images.md).
79 80
\ No newline at end of file
... ...
@@ -1,8 +1,8 @@
1 1
 # Default Firewall Settings
2 2
 
3
-The design of Photon OS emphasizes security. On the minimal and full versions of Photon OS, the default security policy turns on the firewall and drops packets from external interfaces and  applications. As a result, you might need to add rules to iptables to permit forwarding, allow protocols like HTTP, and open ports. In other words, you must configure the firewall for your applications and requirements. 
3
+The design of Photon OS emphasizes security. On the minimal and full versions of Photon OS, the default security policy turns on the firewall and drops packets from external interfaces and  applications. As a result, you might need to add rules to iptables to permit forwarding, allow protocols like HTTP, and open ports. You must configure the firewall for your applications and requirements. 
4 4
 
5
-The default iptables settings on the full version look like this:
5
+The default iptables on the full version have the following settings:
6 6
 
7 7
     iptables --list
8 8
     Chain INPUT (policy DROP)
... ...
@@ -18,10 +18,10 @@ The default iptables settings on the full version look like this:
18 18
     target     prot opt source               destination
19 19
     ACCEPT     all  --  anywhere             anywhere
20 20
 
21
-To find out how to adjust the settings, see the man page for iptables. 
21
+For more information on how to change the settings, see the man page for iptables. 
22 22
 
23 23
 Although the default iptables policy accepts SSH connections, the `sshd` configuration file on the full version of Photon OS is set to reject SSH connections. See [Permitting Root Login with SSH](#permitting-root-login-with-ssh).
24 24
 
25
-If you are unable to ping a Photon OS machine, one of the first things you should do is check the firewall rules. Do they allow connectivity for the port and protocol in question? You can supplement the `iptables` commands by using `lsof` commands to, for instance, see the processes listening on ports: 
25
+If you are unable to ping a Photon OS machine, check the firewall rules. To verify if the rules allow connectivity for the port and protocol, change the `iptables` commands by using `lsof` commands to see the processes listening on ports: 
26 26
 
27 27
     lsof -i -P -n
28 28
\ No newline at end of file
... ...
@@ -1,8 +1,8 @@
1 1
 # Default Permissions and umask
2 2
 
3
-The umask on Photon OS is set to `0027`.
3
+The `umask` on Photon OS is set to `0027`.
4 4
 
5
-When you create a new file with the `touch` command as root, the default on Photon OS is to set the permissions to `0640`--which translates to read-write for user, read for group, and no access for others. Here's an example: 
5
+When you create a new file with the `touch` command as root, the default on Photon OS is to set the permissions to `0640`--which translates to `read-write` for user, `read` for group, and no access for others. Here's an example: 
6 6
 
7 7
     touch newfile.md
8 8
     stat newfile.md
... ...
@@ -20,11 +20,11 @@ When you create a directory as root, Photon OS sets the permissions to `0750`:
20 20
     Device: 801h/2049d      Inode: 316455      Links: 2
21 21
     Access: (0750/drwxr-x---)  Uid: (    0/    root)   Gid: (    0/    root)
22 22
 
23
-Because the `mkdir` command uses the umask to modify the permissions placed on newly created files or directories, you can see `umask` at work in the permissions of the new directory: Its default permissions are set at 0750 after the umask subtracts 0027 from the full set of open permissions, 0777.
23
+Because the `mkdir` command uses the umask to modify the permissions placed on newly created files or directories, you can see `umask` at work in the permissions of the new directory. Its default permissions are set at `0750` after the umask subtracts `0027` from the full set of open permissions, `0777`.
24 24
 
25
-Similarly, a new file begins as 0666, which you could see if you were to set umask to 0000. But because umask is set by default to 0027, a new file's permissions are set to 0640. 
25
+Similarly, a new file begins as `0666` if you were to set umask to `0000`. But because umask is set by default to `0027`, a new file's permissions are set to `0640`. 
26 26
 
27
-So be aware of the default permissions on the directories and files that you create. Some system services and applications might require permissions other than the default. The systemd network service, for example, requires user-defined configuration files to be set to 644, not the default of 640. Thus, after you create a network configuration file with a `.network` extension, you must run the `chmod` command to set the new file's mode bits to `644`. Example: 
27
+So be aware of the default permissions on the directories and files that you create. Some system services and applications might require permissions other than the default. The `systemd` network service, for example, requires user-defined configuration files to be set to `644`, not the default of `640`. Thus, after you create a network configuration file with a `.network` extension, you must run the `chmod` command to set the new file's mode bits to `644`. For example: 
28 28
 
29 29
     chmod 644 10-static-en.network 
30 30
 
... ...
@@ -1,4 +1,7 @@
1
-# Default Security Policy of Photon OS
1
+# Security Policy
2
+
3
+This section describes the security policy of Photon OS.
2 4
 
3 5
 -   [Default Firewall Settings](default-firewall-settings.md)
4
--   [Default Permissions and umask](default-permissions-and-umask.md)
5 6
\ No newline at end of file
7
+-   [Default Permissions and umask](default-permissions-and-umask.md)
8
+-   [Disabling TLS 1.0 to Improve Transport Layer Security](disabling-tls.md)
6 9
\ No newline at end of file
7 10
new file mode 100644
... ...
@@ -0,0 +1,29 @@
0
+# Deploy Photon OS With `cloud-init`
1
+
2
+You can deploy Photon OS with `cloud-init` in the following ways: 
3
+
4
+* As a stand-alone Photon machine
5
+* In Amazon Elastic Compute Cloud, called EC2
6
+* In the Google cloud through the Google Compute Engine, or GCE
7
+* In a VMware Vsphere private cloud 
8
+
9
+When a cloud instance of Photon OS starts, `cloud-init` requires a data source. The data source can be an EC2 file for Amazon's cloud platform, a `seed.iso` file for a stand-alone instance of Photon OS, or the internal capabilities of a system for managing virtual machines, such as VMware vSphere or vCenter. Cloud-init also includes data sources for OpenStack, Apache CloudStack, and OVF. The data source comprises two parts: 
10
+
11
+1. Metadata
12
+2. User data
13
+
14
+The metadata gives the cloud service provider instructions on how to implement the Photon OS machine in the cloud infrastructure. Metadata typically includes the instance ID and the local host name. 
15
+
16
+The user data contains the commands and scripts that Photon OS executes when it starts in the cloud. The user data commonly takes the form of a shell script or a YAML file containing a cloud configuration. The [cloud-init documentation](https://launchpad.net/cloud-init and https://cloudinit.readthedocs.org/en/latest/) contains information about the types of data sources and the formats for metadata and user data. 
17
+
18
+On Photon OS, `cloud-init` is enabled and running by default. You can use the following command to check the status: 
19
+	
20
+```
21
+systemctl status cloud-init 
22
+```
23
+
24
+The Photon OS directory that contains the local data and other resources for cloud-init is `/var/lib/cloud`.
25
+
26
+Photon OS stores the logs for cloud-init in the `/var/log/cloud-init.log` file.
27
+
28
+The following sections demonstrate how to use cloud-init to customize a stand-alone Photon OS machine, instantiate a Photon OS machine in the Amazon EC2 cloud, and deploy a virtual machine running Photon OS in vSphere. Each section uses a different combination of the available options for the metadata and the user data that make up the data source. Specifications, additional options, and examples appear in the cloud-init documentation. 
0 29
\ No newline at end of file
... ...
@@ -6,27 +6,34 @@ On Photon OS, SSL 3.0, which contains a known vulnerability, is disabled by defa
6 6
 
7 7
 However, TLS 1.0, which also contains known vulnerabilities, is enabled by default.
8 8
 
9
-To turn off TLS 1.0, make a directory named `/etc/gnutls` and then in `/etc/gnutls` create a file named `default-priorities`. In the `default-priorities` file, specify GnuTLS priority strings that remove TLS 1.0 and SSL 3.0 but retain TLS 1.1 and TLS 1.2.
9
+To turn off TLS 1.0, perform the follwoing steps:
10 10
 
11
-After adding a new `default-priorities` file or after modifying it, you must restart all applications, including SSH, with an open TLS session for the changes to take effect.  
12 11
 
13
-Here is an example of a `default-priorities` file that contains GnuTLS priorities to disable TLS 1.0 and SSL 3.0:  
12
+1. Create a directory named `/etc/gnutls`.
13
+1. In `/etc/gnutls` create a file named `default-priorities`.
14
+1. In the `default-priorities` file, specify GnuTLS priority strings that remove TLS 1.0 and SSL 3.0 but retain TLS 1.1 and TLS 1.2.
15
+1. After adding a new `default-priorities` file or after modifying it, you must restart all applications, including SSH, with an open TLS session for the changes to take effect.  
16
+
17
+The following is an example of a `default-priorities` file that contains GnuTLS priorities to disable TLS 1.0 and SSL 3.0:  
14 18
 
15 19
 	cat /etc/gnutls/default-priorities
16 20
 	SYSTEM=NONE:!VERS-SSL3.0:!VERS-TLS1.0:+VERS-TLS1.1:+VERS-TLS1.2:+AES-128-CBC:+RSA:+SHA1:+COMP-NULL
17 21
 
18
-This example priority string imposes system-specific policies. The NONE keyword means that no algorithms, protocols, or compression methods are enabled, so that you can enable specific versions individually later in the string. The example priority string then specifies that SSL version 3.0 and TLS version 1.0 be removed, as marked by the exclamation point. The priority string then enables, as marked by the plus sign, versions 1.1 and 1.2 of TLS. The cypher is AES-128-CBC. The key exchange is RSA. The MAC is SHA1. And the compression algorithm is COMP-NULL.
19
-
20
-On Photon OS, you can verify the system-specific policies in the `default-priorities` file as follows. 
22
+In this example, the priority string imposes system-specific policies. The `NONE` keyword means that no algorithms, protocols, or compression methods are enabled, so that you can enable specific versions individually later in the string. The priority string then specifies that SSL version 3.0 and TLS version 1.0 be removed, as marked by the exclamation point. The priority string then enables, as marked by the plus sign, versions 1.1 and 1.2 of TLS. The cypher is AES-128-CBC. The key exchange is RSA. The MAC is SHA1. And the compression algorithm is COMP-NULL.
21 23
 
22
-Concatenate the `default-priorities` file to check its contents: 
24
+On Photon OS, you can verify the system-specific policies in the `default-priorities` file as follows:
23 25
 
24
-	root@photon-rc [ ~ ]# cat /etc/gnutls/default-priorities
26
+1. Concatenate the `default-priorities` file to check its contents: 
27
+	
28
+    ```
29
+root@photon-rc [ ~ ]# cat /etc/gnutls/default-priorities
25 30
 	SYSTEM=NONE:!VERS-SSL3.0:!VERS-TLS1.0:+VERS-TLS1.1:+VERS-TLS1.2:+AES-128-CBC:+RSA:+SHA1:+COMP-NULL
31
+```
26 32
 
27
-Run the following command to check the protocols that are enabled for the system: 
33
+1. Run the following command to check the protocols that are enabled for the system: 	
28 34
 
29
-	root@photon-rc [ /etc/gnutls ]# gnutls-cli --priority @SYSTEM -l
35
+    ```
36
+    root@photon-rc [ /etc/gnutls ]# gnutls-cli --priority @SYSTEM -l
30 37
 	Cipher suites for @SYSTEM
31 38
 	TLS_RSA_AES_128_CBC_SHA1                                0x00, 0x2f      SSL3.0
32 39
 
... ...
@@ -35,6 +42,8 @@ Run the following command to check the protocols that are enabled for the system
35 35
 	Compression: COMP-NULL
36 36
 	Elliptic curves: none
37 37
 	PK-signatures: none
38
+```
39
+
38 40
 
39 41
 For information about the GnuTLS priority strings, see [https://gnutls.org/manual/html_node/Priority-Strings.html](https://gnutls.org/manual/html_node/Priority-Strings.html).
40 42
 
... ...
@@ -1,23 +1,21 @@
1 1
 # Docker Containers
2 2
 
3
-Photon OS includes the open source version of Docker. With Docker, Photon OS becomes a Linux run-time host for containers--that is, a Linux cloud container. A container is a process that runs on the Photon OS host with its own isolated application, file system, and networking.
4
-
5
-On Photon OS, the Docker daemon is enabled by default. To view the status of the daemon, run this command: 
3
+On Photon OS, the Docker daemon is enabled by default. To view the status of the daemon, run the following command: 
6 4
 
7 5
 	systemctl status docker
8 6
 
9
-Docker is loaded and running by default on the full version of Photon OS. On the minimal version, it is loaded but not running by default, so you have to start it: 
7
+Docker is loaded and running by default on the full version of Photon OS. On the minimal version, it is loaded but not running by default. To tart it, run the following command: 
10 8
 
11 9
 	systemctl start docker
12 10
 
13
-To obtain information about Docker, run this command as root: 
11
+To obtain information about Docker, run the following command as root: 
14 12
 
15 13
 	docker info
16 14
 
17
-After you make sure that docker is enabled and started, you can, for example, run the following docker command as root to create a container running Ubuntu 14.04 with an interactive terminal shell: 
15
+After Docker is enabled and started, you can create a container. For eaxmple, run the following docker command as root to create a container running Ubuntu 14.04 with an interactive terminal shell: 
18 16
 
19 17
 	docker run -i -t ubuntu:14.04 /bin/bash
20 18
 
21
-Photon OS also enables you to run a docker container that, in turn, runs Photon OS: 
19
+Photon OS also enables you to run a docker container that runs Photon OS: 
22 20
 
23 21
 	docker run -i -t photon /bin/bash
... ...
@@ -1,8 +1,12 @@
1
-# Inspecting the Status of Network Links with `networkctl`
1
+# Checking the Status of Network Links with `networkctl`
2 2
 
3
-The `networkctl` command shows information about network connections that helps you configure networking services and troubleshoot networking problems. You can, for example, progressively add options and arguments to the `networkctl` command to move from general information about network connections to specific information about a network connection. 
3
+You can inspect information about network connections by using the `networkctl` command. This can help you configure networking services and troubleshoot networking problems. 
4 4
 
5
-Running `networkctl` without options defaults to the list command:  
5
+You can progressively add options and arguments to the `networkctl` command to move from general information about network connections to specific information about a network connection. 
6
+
7
+# `networkctl` Command Without Options
8
+
9
+Run the `networkctl` command without options to default to the list command:  
6 10
 
7 11
 	networkctl
8 12
 	IDX LINK             TYPE               OPERATIONAL SETUP
... ...
@@ -12,9 +16,12 @@ Running `networkctl` without options defaults to the list command:
12 12
 	 11 vethb0aa7a6      ether              degraded    unmanaged
13 13
 	 4 links listed.
14 14
 
15
-Running `networkctl` with the status command displays information that looks like this; you can see that there are active network links with IP addresses for not only the Ethernet connection but also a Docker container. 
15
+## `networkctl status` Command
16
+
17
+Run `networkctl` with the status command to display the following information:  
16 18
 
17
-	root@photon-rc [ ~ ]# networkctl status
19
+```
20
+root@photon-rc [ ~ ]# networkctl status
18 21
 	*      State: routable
19 22
 	     Address: 198.51.100.131 on eth0
20 23
 	              172.17.0.1 on docker0
... ...
@@ -23,9 +30,16 @@ Running `networkctl` with the status command displays information that looks lik
23 23
 	              fe80::4c84:caff:fe76:a23f on vethb0aa7a6
24 24
 	     Gateway: 198.51.100.2 on eth0
25 25
 	         DNS: 198.51.100.2
26
+```
27
+
28
+
29
+You can see that there are active network links with IP addresses for not only the Ethernet connection but also a Docker container.
30
+
31
+### `networkctl status` Command With Network Link Option
26 32
 
27
-You can then add a network link, such as the Ethernet connection, as the argument of the status command to show specific information about the link: 
33
+You can add a network link, such as the Ethernet connection, as the argument of the `status` command to show specific information about the link: 
28 34
 
35
+```
29 36
 	root@photon-rc [ ~ ]# networkctl status eth0
30 37
 	* 2: eth0
31 38
 	       Link File: /usr/lib/systemd/network/99-default.link
... ...
@@ -41,10 +55,14 @@ You can then add a network link, such as the Ethernet connection, as the argumen
41 41
 	         Gateway: 198.51.100.2
42 42
 	             DNS: 198.51.100.2
43 43
 	        CLIENTID: ffb6220feb00020000ab116724f520a0a77337
44
+```
44 45
 
45
-And you can do the same thing with the Docker container: 
46
+### `networkctl status` Command With Docker Option
46 47
 
47
-	networkctl status docker0
48
+You can add a Docker container as the argument of the `status` command to show specific information about the container: 
49
+	
50
+```
51
+networkctl status docker0
48 52
 	* 3: docker0
49 53
 	       Link File: /usr/lib/systemd/network/99-default.link
50 54
 	    Network File: n/a
... ...
@@ -55,7 +73,8 @@ And you can do the same thing with the Docker container:
55 55
 	             MTU: 1500
56 56
 	         Address: 172.17.0.1
57 57
 	                  fe80::42:f0ff:fef7:bd81
58
+```
58 59
 
59
-In the example above, it is OK that the state of the Docker container is unmanaged; Docker handles managing the networking for the containers without using systemd-resolved or systemd-networkd. Instead, Docker manages the container's connection by using its bridge drive.
60
+In the example above, the state of the Docker container is unmanaged because Docker handles managing the networking for the containers without using systemd-resolved or systemd-networkd. Docker manages the container connection by using its bridge drive.
60 61
 
61 62
 For more information about `networkctl` commands and options, see https://www.freedesktop.org/software/systemd/man/networkctl.html.
62 63
\ No newline at end of file
... ...
@@ -2,13 +2,16 @@
2 2
 
3 3
 Before you install Sendmail, you should set the fully qualified domain name (FQDN) of your Photon OS machine.
4 4
 
5
-Neither the full nor the minimal version of Photon OS installs Sendmail by default. When you install Sendmail, it provides Photon OS with a systemd service file that typically enables Sendmail. If, however, the service is not enabled after installation, you must enable it. 
5
+By default, Sendmail is not installed with either the minimal or full version of Photon OS. When you install Sendmail, it provides Photon OS with a `systemd` service file that typically enables Sendmail. If the service is not enabled after installation, you must enable it. 
6 6
 
7
-Sendmail resides in the Photon extras repository. You can install it with `tdnf` after setting the machine's FQDN. Here's how: 
7
+Sendmail resides in the Photon extras repository. You can install it with `tdnf` after setting the machine's FQDN. 
8 8
 
9
-First, check whether the machine's FQDN is set by running the `hostnamectl status` command:  
9
+## Procedure
10 10
 
11
-         hostnamectl status
11
+1. Check whether the FQDN of the machine is set by running the `hostnamectl status` command:  
12
+         
13
+    ```
14
+hostnamectl status
12 15
        Static hostname: photon-d9ee400e194e
13 16
              Icon name: computer-vm
14 17
                Chassis: vm
... ...
@@ -18,16 +21,20 @@ First, check whether the machine's FQDN is set by running the `hostnamectl statu
18 18
       Operating System: VMware Photon/Linux
19 19
                 Kernel: Linux 4.4.8
20 20
           Architecture: x86-64
21
-
22
-In the results above, the FQDN is not set; the Photon OS machine has only a short name. If the FQDN were set, the hostname would be in its full form, typically with a domain name. 
23
-
24
-If the machine does not have an FQDN, set one by running `hostnamectl set-hostname new-name`, replacing `new-name` with the FQDN that you want. Example:  
25
-
26
-     hostnamectl set-hostname photon-d9ee400e194e.corp.example.com
27
-
28
-The `hostnamectl status` command now shows that the machine has an FQDN: 
29
-
30
-    root@photon-d9ee400e194e [ ~ ]# hostnamectl status
21
+```
22
+
23
+    In the results above, the FQDN is not set. The Photon OS machine only has a short name. If the FQDN were set, the hostname would be in its full form, typically with a domain name. 
24
+    
25
+1. If the machine does not have an FQDN, set one by running `hostnamectl set-hostname new-name`, replacing `new-name` with the FQDN that you want. For example:  
26
+     
27
+    ```
28
+hostnamectl set-hostname photon-d9ee400e194e.corp.example.com
29
+```
30
+
31
+    The `hostnamectl status` command now shows that the machine has an FQDN: 
32
+    
33
+    ```
34
+root@photon-d9ee400e194e [ ~ ]# hostnamectl status
31 35
        Static hostname: photon-d9ee400e194e.corp.example.com
32 36
              Icon name: computer-vm
33 37
                Chassis: vm
... ...
@@ -37,16 +44,23 @@ The `hostnamectl status` command now shows that the machine has an FQDN:
37 37
       Operating System: VMware Photon/Linux
38 38
                 Kernel: Linux 4.4.8
39 39
           Architecture: x86-64
40
-
41
-Next, install Sendmail: 
42
-
43
-    tdnf install sendmail
44
-
45
-Make sure it is enabled: 
46
-
47
-    systemctl status sendmail
48
-
49
-Enable Sendmail if it's disabled and then start it: 
50
-
51
-    systemctl enable sendmail
52
-    systemctl start sendmail
53 40
\ No newline at end of file
41
+```
42
+
43
+1. Install Sendmail: 
44
+    
45
+    ```
46
+tdnf install sendmail
47
+```
48
+
49
+1. Verify if Sendmail is enabled: 
50
+    
51
+    ```
52
+systemctl status sendmail
53
+```
54
+
55
+1. Enable Sendmail if it is disabled and then start it: 
56
+    
57
+    ```
58
+systemctl enable sendmail
59
+ systemctl start sendmail
60
+```
... ...
@@ -1,11 +1,17 @@
1
-# Installing the Packages for tcpdump and netcat with tdnf
1
+# Installing the Packages for `tcpdump` and `netcat` with `tdnf`
2 2
 
3
-The minimal version of Photon OS leaves out several useful networking tools to keep the operating system lean. Tcpdump, for example, is absent in the minimal version but available in the repository. The minimal version does, however, include the iproute2 tools by default. 
3
+Photon OS includes the following networking tools:
4 4
 
5
-Tcpdump captures and analyzes packets on a network interface. On Photon OS, you install tcpdump and its accompanying package libpcap, a C/C++ library for capturing network traffic, by using tdnf, Photon's command-line package manager: 
5
+- **tcpdump**. A networking tool that captures and analyzes packets on a network interface. `tcpdump` is not available with the minimal version of Photon OS but available in the repository. The minimal version includes the `iproute2` tools by default.  
6
+     
7
+    You can install `tcpdump` and its accompanying package `libpcap`, a C/C++ library for capturing network traffic, by using `tdnf`: 
6 8
 
7
-	tdnf install tcpdump
9
+    ```
10
+tdnf install tcpdump
11
+```
8 12
 
9
-Netcat, a tool for sending data over network connections with TCP or UDP, appears in neither the minimal nor the full version of Photon OS. But since netcat furnishes powerful options for analyzing, troubleshooting, and debugging network connections, you might want to install it. To do so, run the following command: 
13
+- **netcat**. A tool to send data over network connections with TCP or UDP. This tool is not included in either the minimal or the full version of Photon OS. But since `netcat` furnishes powerful options for analyzing, troubleshooting, and debugging network connections, you might want to install it. To install `netcat', run the following command: 
10 14
 
11
-	tdnf install netcat
12 15
\ No newline at end of file
16
+    ```
17
+tdnf install netcat
18
+```
... ...
@@ -1,3 +1,6 @@
1 1
 # Kubernetes
2 2
 
3
-The full version of Photon OS includes Kubernetes so you can manage clusters of containers. For more information, see [Running Kubernetes on Photon OS](kubernetes.md).
3
+
4
+The Kubernetes package provides several services: kube-apiserver, kube-scheduler, kube-controller-manager, kubelet, kube-proxy. These services are managed by `systemd`. Their configuration resides in a central location: `/etc/kubernetes`.
5
+
6
+For more information, see [Running Kubernetes on Photon OS](photon_user/running_kubernetes.md).
... ...
@@ -1,4 +1,4 @@
1
-# Managing Services with systemd
1
+# Managing Services with `systemd`
2 2
 
3 3
 Photon OS manages services with `systemd`. By using `systemd`, Photon OS adopts a contemporary Linux standard to bootstrap the user space and concurrently start services. This is an architecture that differs from traditional Linux systems such as SUSE Linux Enterprise Server. 
4 4
 
... ...
@@ -8,6 +8,13 @@ In contrast to a SysVinit system, `systemd` defines no such runlevels. Instead,
8 8
 
9 9
 On Photon OS, you must manage services with systemd and `systemctl`, its command-line utility for inspecting and controlling the system, and not the deprecated commands of `init.d`. 
10 10
 
11
-For more information, see the index of all the systemd man pages, including systemctl, at the following URL: 
11
+For more information, see the index of all the systemd man pages, including systemctl, at 
12
+[https://www.freedesktop.org/software/systemd/man/](https://www.freedesktop.org/software/systemd/man/)
12 13
 
13
-[https://www.freedesktop.org/software/systemd/man/](https://www.freedesktop.org/software/systemd/man/)
14 14
\ No newline at end of file
15
+-   [Viewing Services](viewing-services.md)
16
+-   [Controlling Services](controlling-services.md)
17
+-   [Creating a Startup Service](creating-a-startup-service.md)
18
+-   [Disabling the Photon OS httpd.service](disabling-the-photon-os-httpd.service.md)
19
+-   [Auditing System Events with auditd](auditing-system-events-with-auditd.md)
20
+-   [Analyzing systemd Logs with journalctl](analyzing-systemd-logs-with-journalctl.md)
21
+-   [Migrating Scripts to systemd](migrating-scripts-to-systemd.md)
15 22
\ No newline at end of file
... ...
@@ -1,18 +1,21 @@
1 1
 # Managing the Network Configuration
2 2
 
3
-The network service, which is enabled by default, starts when the system boots. You manage the network service by using systemd commands, such as systemd-networkd, systemd-resolvd, and networkctl. You can check its status of the network service by running the following command: 
3
+The network service, which is enabled by default, starts when the system boots. 
4 4
 
5
-	systemctl status systemd-networkd
6
-
7
-Here is a healthy result of the command: 
8
-
9
-	* systemd-networkd.service - Network Service
10
-	   Loaded: loaded (/usr/lib/systemd/system/systemd-networkd.service; enabled; vendor preset: enabled)
11
-	   Active: active (running) since Fri 2016-04-29 15:08:51 UTC; 6 days ago
12
-	     Docs: man:systemd-networkd.service(8)
13
-	 Main PID: 291 (systemd-network)
14
-	   Status: "Processing requests..."
15
-	   CGroup: /system.slice/systemd-networkd.service
16
-	           `-291 /lib/systemd/systemd-networkd
17
-
18
-Because Photon OS relies on systemd to manage services, you should employ the systemd suite of commands, not deprecated init.d commands or other deprecated commands, to manage networking. 
19 5
\ No newline at end of file
6
+-   [Commands to Manage Network Service](network_management_commands.md)
7
+-   [Using the Network Configuration Manager](using-the-network-configuration-manager.md)
8
+-   [Use `ip` and `ss` Commands Instead of `ifconfig` and `netstat`](use-ip-and-ss-commands.md)
9
+-   [Configuring Network Interfaces](configuring-network-interfaces.md)
10
+-   [Setting a Static IP Address](setting-a-static-ip-address.md)
11
+-   [Turning Off DHCP](turning-off-dhcp.md)
12
+-   [Adding a DNS Server](adding-a-dns-server.md)
13
+-   [Setting Up Networking for Multiple NICs](setting-up-networking-for-multiple-nics.md)
14
+    -   [Combining DHCP and Static IP Addresses with IPv4 and IPv6](combining-dhcp-and-static-ip-addresses-with-ipv4-and-ipv6.md)
15
+-   [Clearing the Machine ID of a Cloned Instance for DHCP](clearing-the-machine-id-of-a-cloned-instance-for-dhcp.md)
16
+-   [Using Predictable Network Interface Names](using-predictable-network-interface-names.md)
17
+-   [Inspecting the Status of Network Links with `networkctl`](inspecting-the-status-of-network-links-with-networkctl.md)
18
+-   [Network Debugging](turning-on-network-debugging.md)
19
+-   [Mounting a Network File System](mounting-a-network-file-system.md)
20
+-   [Installing the Packages for tcpdump and netcat with `tdnf`](installing-the-packages-for-tcpdump-and-netcat-with-tdnf.md)
21
+- [Network Configuration Manager - C API](netmgr.c.md)
22
+- [Network Configuration Manager - Python API](netmgr.python.md)        
20 23
\ No newline at end of file
... ...
@@ -1,9 +1,11 @@
1 1
 # Mounting a Network File System
2 2
 
3
-To mount a network file system, Photon OS requires nfs-utils. The nfs-utils package contains the daemon, userspace server, and client tools for the kernel Network File System, or NFS. The tools include mount.nfs, umount.nfs, and showmount. 
3
+To mount a network file system, Photon OS requires `nfs-utils`. The `nfs-utils` package contains the daemon, userspace server, and client tools for the kernel Network File System (NFS). The tools include `mount.nfs`, `umount.nfs`, and `showmount`. 
4 4
 
5
-The nfs-utils package is installed by default in the full version of Photon OS but not in the minimal version. To install nfs-utils in the minimal version, run the following command as root: 
5
+The `nfs-utils` package is installed by default in the full version of Photon OS but not in the minimal version. To install `nfs-utils` in the minimal version, run the following command as root: 
6
+	
7
+```
8
+tdnf install nfs-utils
9
+```
6 10
 
7
-	tdnf install nfs-utils
8
-
9
-For instructions on how to use nfs-utils to share files over a network, see [Photon OS nfs-utils](nfs-utils.md).
10 11
\ No newline at end of file
12
+For instructions on how to use `nfs-utils` to share files over a network, see [Photon OS nfs-utils](nfs-utils.md).
11 13
\ No newline at end of file
12 14
deleted file mode 100644
... ...
@@ -1,239 +0,0 @@
1
-# Photon Network Manager Command-line Interface (netmgr)
2
-
3
-For locally logged-on users, Photon OS provides a command line interface to manage network configuration of the system.
4
-
5
-- [Setup Steps](#setup-steps)
6
-- [Syntax](#syntax)
7
-- [Network Manager CLI](#network-manager-cli)
8
-
9
-# Setup Steps
10
-
11
-The netmgr tool is included with your Photon OS distribution. To make sure that you have the latest version, you can run:
12
-~~~~
13
-tdnf install netmgmt
14
-~~~~
15
-# Syntax
16
-The CLI is built on set, get, add, delete command model and uses the option-name - option-value model of specifying command parameters.
17
-~~~~
18
-netmgr <network object> <--get | --set | --add | --del> <command options>
19
-~~~~
20
-Passed-in parameter values can be enclosed in single (&#39;) or double-quotes (&quot;) as long as you use matching characters to denote the beginning and end of the value. Unless a parameter value contains special characters or spaces, you can also omit quotes altogether.
21
-
22
-## network object
23
-
24
-``<network object>`` is one of the following values:
25
-
26
-- ``link_info``
27
-- ``ip4_address``
28
-- ``ip6_address``
29
-- ``ip_route``
30
-- ``dns_servers``
31
-- ``dns_domains``
32
-- ``dhcp_duid``
33
-- ``if_iaid``
34
-- ``ntp_servers``
35
-- ``hostname``
36
-- ``wait_for_link``
37
-- ``wait_for_ip``
38
-- ``error_info``
39
-- ``net_info``
40
-
41
-# Network Manager CLI
42
-
43
-## link_info
44
-
45
-Get the mac address, MTU, link state, and link mode for the (optionally) specified interface.
46
-~~~~
47
-netmgr link_info --get --interface <ifname>
48
-~~~~
49
-Set the MAC address, link state (up or down), link mode (manual or auto), or MTU for the specified interface.
50
-~~~~
51
-netmgr link_info --set --interface <ifname> --macaddr <mac_address>
52
-netmgr link_info --set --interface <ifname> --mode <manual|auto>
53
-netmgr link_info --set --interface <ifname> --state <up|down>
54
-netmgr link_info --set --interface <ifname> --mtu <mtu>
55
-~~~~
56
-## ip4_address
57
-
58
-Get the IPv4 address for the specified interface.
59
-~~~~
60
-netmgr ip4_address --get --interface <ifname>
61
-~~~~
62
-Set the IPv4 address (dot-decimal/prefix notation), mode (dhcp, static, or none), and (optionally) the default gateway for the specified interface.
63
-~~~~
64
-netmgr ip4_address --set --interface <ifname> --mode <dhcp|static|none> --addr <ipv4_address/prefix> --gateway <gateway_address>
65
-~~~~
66
-## ip6_address
67
-
68
-Get IPv6 addresses for the specified interface.
69
-~~~~
70
-netmgr ip6_address --get --interface <ifname>
71
-~~~~
72
-Add one or more IPv6 addresses (comma-separated list in colon-separated/prefix notation) to the specified interface.
73
-~~~~
74
-netmgr ip6_address --add --interface <ifname> --addrlist <ipv6_addr1/prefix,ipv6_addr2/prefix,...>
75
-~~~~
76
-Delete one or more IPv6 addresses (comma-separated list in colon-separated/prefix notation) from the specified interface.
77
-~~~~
78
-netmgr ip6_address --del --interface <ifname> --addrlist <ipv6_addr1/prefix,ipv6_addr2/prefix,...>
79
-~~~~
80
-Set the IPv6 DHCP mode (1=enable, 0=disable) and IPv6 auto-configuration settings (1=enable, 0=disable) for the specified interface.
81
-~~~~
82
-netmgr ip6_address --set --interface <ifname> --dhcp <1|0> --autoconf <1|0>
83
-~~~~
84
-## ip_route
85
-
86
-Get the static IP route for the specified interface.
87
-~~~~
88
-netmgr ip_route --get --interface <ifname>
89
-~~~~
90
-Add the static IP route (gateway IP, destination network, and metric) to the specified interface.
91
-~~~~
92
-netmgr ip_route --add --interface <ifname> --gateway <gateway_address> --destination <destination_network/prefix> --metric <N>
93
-~~~~
94
-Delete the specified static IP route from the specified interface.
95
-~~~~
96
-netmgr ip_route --del --interface <ifname> --destination <destination_network/prefix>
97
-~~~~
98
-## dns_servers
99
-
100
-Get the list of DNS servers.
101
-~~~~
102
-netmgr dns_servers --get
103
-~~~~
104
-Set the DNS mode (DHCP or static) for one or more DNS servers (comma-separated list).
105
-~~~~
106
-netmgr dns_servers --set --mode <dhcp|static> --servers <server1,server2,...>
107
-~~~~
108
-Add a DNS server to the list of DNS servers.
109
-~~~~
110
-netmgr dns_servers --add --servers <server>
111
-~~~~
112
-Remove the specified DNS server from the list of DNS servers.
113
-~~~~
114
-netmgr dns_servers --del --servers <server>
115
-~~~~
116
-## dns_domains
117
-
118
-Get the list of DNS domains.
119
-~~~~
120
-netmgr dns_domains --get
121
-~~~~
122
-Set the list of DNS domains (one or more DNS domains in a comma-separated list).
123
-~~~~
124
-netmgr dns_domains --set --domains <domain1,domain2,...>
125
-~~~~
126
-Add a DNS domain to the list of DNS domains.
127
-~~~~
128
-netmgr dns_domains --add --domains <domain>
129
-~~~~
130
-Delete a DNS domain from the list of DNS domains.
131
-~~~~
132
-netmgr dns_domains --del --domains <domain>
133
-~~~~
134
-## dhcp_duid
135
-
136
-Get the DHCP DUID (optionally interface-specific DUID) for the system.
137
-~~~~
138
-netmgr dhcp_duid --get
139
-~~~~
140
-Set the DHCP DUID for the system, optionally per-interface if the interface is specified.
141
-~~~~
142
-netmgr dhcp_duid --set --duid <duid>
143
-~~~~
144
-## if_iaid
145
-
146
-Get the IAID for the specified interface.
147
-~~~~
148
-netmgr if_iaid --get --interface <ifname>
149
-~~~~
150
-Set the IAID for the specified interface.
151
-~~~~
152
-netmgr if_iaid --set --interface <ifname> --iaid <iaid>
153
-~~~~
154
-## ntp_servers
155
-
156
-Get the NTP servers list.
157
-~~~~
158
-netmgr ntp_servers --get
159
-~~~~
160
-Set the NTP servers list.
161
-~~~~
162
-netmgr ntp_servers --set --servers <server1,server2,...>
163
-~~~~
164
-Add the specified server to the NTP servers list.
165
-~~~~
166
-netmgr ntp_servers --add --servers <server>
167
-~~~~
168
-Delete the specified server from the NTP servers list.
169
-~~~~
170
-netmgr ntp_servers --del --servers <server>
171
-~~~~
172
-## hostname
173
-
174
-Get the system hostname.
175
-~~~~
176
-netmgr hostname --get
177
-~~~~
178
-Set the system hostname.
179
-~~~~
180
-netmgr hostname --set --name <hostname>
181
-~~~~
182
-## wait_for_link
183
-
184
-Wait for the specified network interface to be up and usable (it can send and receive packets).
185
-~~~~
186
-netmgr wait_for_link --interface <ifname> --timeout <timeout>
187
-~~~~
188
-The timeout (in seconds) specifies the maximum time to wait. Specify 0 for no timeout (wait indefinitely).
189
-
190
-**Note:** You might need to use wait_for_ip to wait until you can send and receive IP packets.
191
-
192
-## wait_for_ip
193
-
194
-Wait for the specified interface to acquire a valid IP address for the specified address type.
195
-~~~~
196
-netmgr wait_for_ip --interface <ifname> --timeout <timeout> --addrtype <ipv4,ipv6,static_ipv4,static_ipv6,dhcp_ipv4,dhcp_ipv6,auto_ipv6,link_local_ipv6>
197
-~~~~
198
-The timeout (in seconds) specifies the maximum time to wait. Specify 0 for no timeout (wait indefinitely).
199
-
200
-## error_info
201
-
202
-Get error information about the specified error code.
203
-~~~~
204
-netmgr error_info --errcode <error_code>
205
-~~~~
206
-Here is a list of error codes:
207
-
208
-- 4097 - invalid parameter
209
-- 4098 - not supported
210
-- 4099 - out of memory
211
-- 4100 - value not found
212
-- 4101 - value exists
213
-- 4102 - invalid interface
214
-- 4103 - invalid mode
215
-- 4104 - bad configuration file
216
-- 4105 - write failed
217
-- 4106 - timeout
218
-- 4107 - DCHP timeout
219
-
220
-## net_info
221
-
222
-Get the specified network configuration parameter for the specified object.
223
-~~~~
224
-netmgr net_info --get --object <ifname or filename> --paramname <param_name>
225
-~~~~
226
-**Note:** The object can be an interface name (for example, &quot;eth0&quot;) or a file name (for example, /etc/systemd/resolved.conf).
227
-
228
-Set the value of the specified network configuration parameter for the specified object (interface or file).
229
-~~~~
230
-netmgr net_info --set --object <ifname or filename> --paramname <param_name> --paramvalue <param_value>
231
-~~~~
232
-**Note** : You can add (+) or remove (-) a parameter by prepending the parameter name with + or -.
233
-
234
-For example, in order to add static IPv4 address "10.10.10.1/24" to eth0 interface, the following command adds this **Address** to the **Network** section of the **eth0** network configuration file.
235
-~~~~
236
-netmgr net_info --set --object eth0 --paramname +Network_Address --paramvalue "10.10.10.1/24"
237
-~~~~
238
-
239
-
240 1
new file mode 100644
... ...
@@ -0,0 +1,20 @@
0
+# Commands to Manage Network Service
1
+
2
+You manage the network service by using systemd commands, such as `systemd-networkd`, `systemd-resolvd`, and `networkctl`. 
3
+
4
+To check the status of the network service, run the following command: 
5
+
6
+	systemctl status systemd-networkd
7
+
8
+**Output**
9
+
10
+	* systemd-networkd.service - Network Service
11
+	   Loaded: loaded (/usr/lib/systemd/system/systemd-networkd.service; enabled; vendor preset: enabled)
12
+	   Active: active (running) since Fri 2016-04-29 15:08:51 UTC; 6 days ago
13
+	     Docs: man:systemd-networkd.service(8)
14
+	 Main PID: 291 (systemd-network)
15
+	   Status: "Processing requests..."
16
+	   CGroup: /system.slice/systemd-networkd.service
17
+	           `-291 /lib/systemd/systemd-networkd
18
+
19
+Because Photon OS relies on systemd to manage services, you must use the `systemd` suite of commands and not the deprecated `init.d` commands or other deprecated commands to manage networking. 
0 20
\ No newline at end of file
1 21
new file mode 100644
... ...
@@ -0,0 +1,13 @@
0
+# Package Management in Photon OS with `tdnf`
1
+
2
+Photon OS manages packages with an open source, yum-compatible package manager called `tdnf`, for [Tiny Dandified Yum](https://github.com/vmware/tdnf). Tdnf keeps the operating system as small as possible while preserving yum's robust package-management capabilities. 
3
+
4
+
5
+- [Introduction to `tdnf`](tdnf.md)
6
+- [Configuration Files and Repositories](configuration-files-and-repositories.md)
7
+- [Adding a New Repository](adding-a-new-repository.md)
8
+- [Configure a Repository](configure-a-repository.md)
9
+- [Adding the Dev Repository to Get New Packages from the GitHub Dev Branch](adding-the-dev-repository.md)
10
+- [Standard Syntax for `tdnf` Commands](standard_tdnf_syntax.md)
11
+    -   [Options for Commands](photon_admin/options-for-commands.md)
12
+    -   [Commands](photon_admin/commands.md)
0 13
\ No newline at end of file
... ...
@@ -1,6 +1,6 @@
1 1
 # Photon OS Package Repositories
2 2
 
3
-The default installation of Photon OS includes four yum-compatible repositories plus the repository on the Photon OS ISO when it's available in a CD-ROM drive:  
3
+The default installation of Photon OS includes four yum-compatible repositories plus the repository on the Photon OS ISO when it is available in a CD-ROM drive:  
4 4
 
5 5
     ls /etc/yum.repos.d/
6 6
     lightwave.repo
... ...
@@ -13,7 +13,8 @@ The Photon ISO repository (`photon-iso.repo`) contains the installation packages
13 13
 
14 14
 The main Photon OS repository (`photon.repo`) contains all the packages that are built from the ISO or from another source. This repository points to a static batch of packages and spec files at the point of a release. 
15 15
 
16
-The updates repository (`photon-updates.repo`) is irrelevant to a major release until after the release is installed. Thereafter, the updates repository holds the updated packages for that release. The repository, that is, points to updates for the installed version, such as a version of Kubernetes that supersedes the version installed during the major release. 
16
+The updates repository (`photon-updates.repo`) is irrelevant to a major release until after the release is installed. Thereafter, the updates repository holds the updated packages for that release. The repository points to updates for the installed version, such as a version of Kubernetes that supersedes the version installed during the major release. 
17
+
18
+The Photon extras repository (`photon-extras.repo`) holds Likewise Open, an open source authentication engine, and other VMware software that you can add to Photon OS for free. Photon OS supports but does not build the packages in the extras repository. 
17 19
 
18
-The Photon extras repository (`photon-extras.repo`) holds Likewise Open, an open source authentication engine, and other VMware software that you can add to Photon OS for free. Photon OS supports but does not build the packages in the extras repository.  
19 20
 Similarly, the Lightwave repository (`lightwave.repo`) contains the packages that make up the VMware Lightwave security suite for cloud applications, including tools for identity management, access control, and certificate management.
20 21
new file mode 100644
... ...
@@ -0,0 +1,10 @@
0
+# Containers
1
+
2
+A container is a process that runs on the Photon OS host with its own isolated application, file system, and networking.
3
+ 
4
+Photon OS includes the open source version of Docker. With Docker, Photon OS becomes a Linux run-time host for containers, that is, a Linux cloud container. 
5
+ 
6
+The full version of Photon OS includes Kubernetes so you can manage clusters of containers. 
7
+ 
8
+- [Docker Containers](docker-containers.md)
9
+- [Kubernetes](kubernetes.md)
0 10
new file mode 100644
... ...
@@ -0,0 +1,14 @@
0
+# Photon OS Packages
1
+
2
+The design of Photon OS simplifies life-cycle management and improves the security of packages. Photon reduces the burden and complexity of managing clusters of Linux machines by providing curated package repositories and by securing packages with GPG signatures. 
3
+ 
4
+Photon OS is available in a variety of pre-built packages in binary formats. 
5
+
6
+-   [Examining the Packages in the SPECS Directory on Github](examining_packages_spec_dir.md)
7
+-   [Looking at the Differences Between the Minimal and the Full Version](differences_between_minimal_and_full_version.md)
8
+-   [The Root Account and the `sudo` and `su` Commands](root_account_and_sudo_commands.md)
9
+-   [Photon OS Package Repositories](photon-os-package-repositories.md)
10
+-   [Examining Signed Packages](signed-packages.md)
11
+-   [Building a Package from a Source RPM](building-a-package-from-a-source-rpm.md)
12
+-   [Compiling C++ Code on the Minimal Version of Photon OS](compiling-c-code-on-the-minimal-version-of-photon-os.md)   
13
+
0 14
deleted file mode 100644
... ...
@@ -1,486 +0,0 @@
1
-# Photon Management Daemon Command-line Interface (pmd-cli)
2
-
3
-Photon OS 2.0 provides the Photon Management Daemon command line interface (pmd-cli).
4
-
5
-- [Setup Steps](#setup-steps)
6
-- [Syntax](#syntax)
7
-- [Firewall Management](#firewall-management)
8
-- [Network Management](#network-management)
9
-- [Package Management](#package-management)
10
-- [User Management](#user-management)
11
-
12
-# Setup Steps
13
-
14
-The pmd-cli utility is included with your Photon OS 2.0 distribution. To make sure that you have the latest version, you can run:
15
-~~~~
16
-tdnf install pmd-cli
17
-~~~~
18
-# Syntax
19
-~~~~
20
-pmd-cli [connection_auth_options] <component> <command> [command_options]
21
-~~~~
22
-Passed-in parameter values can be enclosed in single (&#39;) or double-quotes (&quot;) as long as you use matching characters to denote the beginning and end of the value. Unless a parameter value contains special characters or spaces, you can also omit quotes altogether.
23
-
24
-## Connection / Authorization Options
25
-
26
-### Local Connections
27
-
28
-For local connections, you omit the connection and authorization options:
29
-~~~~
30
-pmd-cli <component> <cmd> <options>
31
-~~~~
32
-Permissions for the currently logged-in user apply when executing commands. This is the same as specifying --servername localhost.
33
-
34
-### Remote Connections
35
-
36
-For connecting to a remote server (a server other than the local server), you specify two connection / authorization options:
37
-
38
-- ``--servername``: name of the server
39
-- ``--user``: username of a user account on the server
40
-
41
-**Note:**  For authentication, you can specify the username (–user &lt;username&gt;) on the command line, but never the password. For security reasons, the system must prompt you for the password.
42
-
43
-What follows are three options for remote connections.
44
-
45
-**System User**
46
-~~~~
47
-pmd-cli --servername <server> --user <username>
48
-~~~~
49
-**Lightwave User**
50
-
51
-Before using this method, the pmd server must be joined or should be part of embedded Lightwave.
52
-~~~~
53
-pmd-cli --servername <server> --user <username> --domain <lightwave_domain>
54
-~~~~
55
-**Kerberos spn**
56
-
57
-Before using this method, the client must run kinit successfully.
58
-~~~~
59
-pmd-cli --servername <server> --spn <service_principal_name>
60
-~~~~
61
-## Component
62
-
63
-``<component>`` is one of the following values:
64
-
65
-- ``firewall``
66
-- ``net``
67
-- ``pkg``
68
-- ``usr``
69
-
70
-# Firewall Management
71
-
72
-The Photon Management Daemon provides CLI commands to help you get information about the firewall.
73
-
74
-## Syntax
75
-~~~~
76
-pmd-cli [connection_auth_options] firewall <command> [command_options]
77
-~~~~
78
-## firewall help
79
-
80
-Get help for firewall CLI commands.
81
-~~~~
82
-pmd-cli firewall help
83
-~~~~
84
-## firewall rules
85
-
86
-Get a list of the current persistent firewall rules.
87
-~~~~
88
-pmd-cli firewall rules [command-options]
89
-~~~~
90
-This command returns information about each firewall rule, such as the chain to which it belongs, the policy to enforce, the table to manipulate, and so on.
91
-
92
-Add a new firewall rule.
93
-~~~~
94
-pmd-cli firewall rules --chain <chain_name> --add <rule_specification>
95
-~~~~
96
-Example:
97
-~~~~
98
-pmd-cli firewall rules --chain INPUT --add "-p tcp -m tcp --dport 21 -j ACCEPT"
99
-~~~~
100
-**Note:** To confirm that the firewall rule was added, run iptables -S. Running pmd-cli firewall rules lists only persistent rules.
101
-
102
-Delete a new firewall rule.
103
-~~~~
104
-pmd-cli firewall rules --chain <chain_name> --delete <rule_specification>
105
-~~~~
106
-**Note:**  To confirm that the firewall rule was removed, run iptables -S. Running pmd-cli firewall rules lists only persistent rules.
107
-
108
-Make firewall rule changes peristent (add --persist flag)
109
-~~~~
110
-pmd-cli firewall rules --chain <chain_name> --add <rule_specification> --persist
111
-~~~~
112
-
113
-## firewall version
114
-
115
-Get the version number of the fwmgmt component on the server.
116
-~~~~
117
-pmd-cli firewall version
118
-~~~~
119
-# Network Management
120
-
121
-The Photon Management Daemon provides CLI commands to help you manage network interfaces.
122
-
123
-## Syntax
124
-~~~~
125
-pmd-cli [connection_auth_options] net <command> [command_options]
126
-~~~~
127
-Many of these commands require the interface name (–interface &lt;ifname&gt;). Command options are described below.
128
-
129
-## net link_info
130
-
131
-Get the mac address, mtu, link state, and link mode for the specified interface.
132
-~~~~
133
-pmd-cli net link_info --get --interface <ifname>
134
-~~~~
135
-Set the MAC address, mode (manual or auto), link state (up or down), link mode (manual or auto), and MTU for the specified interface.
136
-~~~~
137
-pmd-cli net link_info --set --interface <ifname> --macaddr <mac_address> --mode <manual|auto> --state <up|down> --mtu <mtu>
138
-~~~~
139
-## net ip4_address
140
-
141
-Get the IPv4 address for the specified interface.
142
-~~~~
143
-pmd-cli net ip4_address --get --interface <ifname>
144
-~~~~
145
-Set the IPv4 address (dot-decimal/prefix notation), mode (dhcp, static, or none), and (optionally) the default gateway for the specified interface.
146
-~~~~
147
-pmd-cli net ip4_address --set --interface <ifname> --mode <dhcp|static|none> --addr <IPv4Address/prefix> --gateway <gateway_address>
148
-~~~~
149
-## net ip6_address
150
-
151
-Get IPv6 address(es) for the specified interface.
152
-~~~~
153
-pmd-cli net ip6_address --get --interface <ifname>
154
-~~~~
155
-Add one or more IPv6 addresses (comma-separated list in colon-separated/prefix notation) to the specified interface.
156
-~~~~
157
-pmd-cli net ip6_address --add --interface <ifname> --addrlist <IPv6Addr1/prefix,IPv6Addr2/prefix,...>
158
-~~~~
159
-Delete one or more IPv6 addresses (comma-separated list in colon-separated/prefix notation) from the specified interface.
160
-~~~~
161
-pmd-cli net ip6_address --del --interface <ifname> --addrlist <IPv6Addr1/prefix,IPv6Addr2/prefix,...>
162
-~~~~
163
-Set the DHCP mode (1=enable, 0=disable) and autoconfigure settings (1=enable, 0=disable) for the specified interface.
164
-~~~~
165
-pmd-cli net ip6_address --set --interface <ifname> --dhcp <1|0> --autoconf <1|0>
166
-~~~~
167
-## net ip_route
168
-
169
-Get the static IP route for the specified interface.
170
-~~~~
171
-pmd-cli net ip_route --get --interface <ifname>
172
-~~~~
173
-Add the static IP route (gateway IP, destination network, and metric) to the specified interface.
174
-~~~~
175
-pmd-cli net ip_route --add --interface <ifname> --gateway <GatewayIP> --destination <DestinationNetwork/prefix> --metric <N>
176
-~~~~
177
-Delete the specified static IP route from the specified interface.
178
-~~~~
179
-pmd-cli net ip_route --del --interface <ifname> --destination <DestinationNetwork/prefix>
180
-~~~~
181
-## net dns_servers
182
-
183
-Get the list of DNS servers.
184
-~~~~
185
-pmd-cli net dns_servers --get
186
-~~~~
187
-Set the DNS mode (dhcp or static) for one or more DNS servers (comma-separated list).
188
-~~~~
189
-pmd-cli net dns_servers --set --mode <dhcp|static> --servers <server1,server2,...>
190
-~~~~
191
-Add a DNS server to the list of DNS servers.
192
-~~~~
193
-pmd-cli net dns_servers --add --servers <server>
194
-~~~~
195
-Remove the specified DNS server from the list of DNS servers.
196
-~~~~
197
-pmd-cli net dns_servers --del --servers <server>
198
-~~~~
199
-## net dns_domains
200
-
201
-Get the list of DNS domains.
202
-~~~~
203
-pmd-cli net dns_domains --get
204
-~~~~
205
-Set the list of DNS domains (one or more DNS domains in a comma-separated list).
206
-~~~~
207
-pmd-cli net dns_domains --set --domains <domain1,domain2,...>
208
-~~~~
209
-Add a DNS domain to the list of DNS domains.
210
-~~~~
211
-pmd-cli net dns_domains --add --domains <domain1>
212
-~~~~
213
-Delete a DNS domain from the list of DNS domains.
214
-~~~~
215
-pmd-cli net dns_domains --del --domains <domain1>
216
-~~~~
217
-## net dhcp_duid
218
-
219
-Get the DHCP DUID (optionally interface-specific DUID) for the system.
220
-~~~~
221
-pmd-cli net dhcp_duid --get
222
-~~~~
223
-Set the DHCP DUID for the system, optionally per-interface if the interface is specified.
224
-~~~~
225
-pmd-cli net dhcp_duid --set --duid <duid>
226
-~~~~
227
-## net if_iaid
228
-
229
-Get the IAID for the specified interface.
230
-~~~~
231
-pmd-cli net if_iaid --get --interface <ifname>
232
-~~~~
233
-Set the IAID for the specified interface.
234
-~~~~
235
-pmd-cli net if_iaid --set --interface <ifname> --iaid <iaid>
236
-~~~~
237
-## net ntp_servers
238
-
239
-Get the NTP servers list.
240
-~~~~
241
-pmd-cli net ntp_servers --get
242
-~~~~
243
-Set the NTP servers list.
244
-~~~~
245
-pmd-cli net ntp_servers --set --servers <server1,server2,...>
246
-~~~~
247
-Add the specified server to the NTP servers list.
248
-~~~~
249
-pmd-cli net ntp_servers --add --servers <server>
250
-~~~~
251
-Delete the specified server from the NTP servers list.
252
-~~~~
253
-pmd-cli net ntp_servers --del --servers <server>
254
-~~~~
255
-## net hostname
256
-
257
-Get the system hostname.
258
-~~~~
259
-pmd-cli net hostname --get
260
-~~~~
261
-Set the system hostname.
262
-~~~~
263
-pmd-cli net hostname --set --name <hostname>
264
-~~~~
265
-## net wait_for_link
266
-
267
-Wait for the specified network interface to be up and usable (it can send and receive packets).
268
-~~~~
269
-pmd-cli net wait_for_link --interface <ifname> --timeout <timeout>
270
-~~~~
271
-The timeout (in seconds) specifies the maximum time to wait. Specify 0 for no timeout (wait indefinitely).
272
-
273
-**Note:** You might need to use net wait_for_ip to wait until you can send and receive IP packets.
274
-
275
-## net wait_for_ip
276
-
277
-Wait for the specified interface to acquire a valid IP address for the specified address type.
278
-~~~~
279
-pmd-cli net wait_for_ip --interface <ifname> --timeout <timeout> --addrtype <ipv4,ipv6,static_ipv4,static_ipv6,dhcp_ipv4,dhcp_ipv6,auto_ipv6,link_local_ipv6>
280
-~~~~
281
-The timeout (in seconds) specifies the maximum time to wait. Specify 0 for no timeout (wait indefinitely).
282
-
283
-## net error_info
284
-
285
-Get error information about the specified error code.
286
-~~~~
287
-pmd-cli net error_info --errcode <error_code>
288
-~~~~
289
-Here is a list of error codes:
290
-
291
-- 4097 - invalid parameter
292
-- 4098 - not supported
293
-- 4099 - out of memory
294
-- 4100 - value not found
295
-- 4101 - value exists
296
-- 4102 - invalid interface
297
-- 4103 - invalid mode
298
-- 4104 - bad configuration file
299
-- 4105 - write failed
300
-- 4106 - timout
301
-- 4107 - DCHP timeout
302
-
303
-## net net_info
304
-
305
-Get the specified network configuration parameter for the specified object.
306
-~~~~
307
-pmd-cli net net_info --get --object <ifname or filename> --paramname <param_name>
308
-~~~~
309
-**Note:** The object can be an interface name (for example, &quot;eth0&quot;) or a file name (for example, /etc/systemd/resolved.conf).
310
-
311
-Set the value of the specified network configuration parameter for the specified object (interface or file).
312
-~~~~
313
-pmd-cli net net_info --set --object <ifname or filename> --paramname <param_name> --paramvalue <param_value>
314
-~~~~
315
-**Note** : You can add (+) or remove (-) a parameter by prepending the parameter name with + or -.
316
-
317
-# Package Management
318
-
319
-The Photon Management Daemon provides CLI commands to help you manage packages and repositories.
320
-
321
-## Syntax
322
-~~~~
323
-pmd-cli [connection options] pkg <command> [command options]
324
-~~~~
325
-If a command allows for multiple package names, simply specify on the command line, separated by spaces.
326
-~~~~
327
-pmd-cli pkg info <package_name_1> <package_name_2> <package_name_3> ...
328
-~~~~
329
-## pkg help
330
-
331
-Get help text for pkg CLI commands.
332
-~~~~
333
-pmd-cli pkg help
334
-~~~~
335
-## pkg count
336
-
337
-Get the total number of packages in all repos (including installed).
338
-~~~~
339
-pmd-cli pkg count
340
-~~~~
341
-## pkg distro-sync
342
-
343
-Synchronize installed packages to the latest available versions. If no packages are specified, then all available packages are synchronized.
344
-~~~~
345
-pmd-cli pkg distro-sync
346
-~~~~
347
-## pkg downgrade
348
-
349
-Downgrade the specified package(s). If no packages are specified, then all available packages are downgraded.
350
-~~~~
351
-pmd-cli pkg downgrade <package_name>
352
-~~~~
353
-## pkg erase
354
-
355
-Remove the specified package(s).
356
-~~~~
357
-pmd-cli pkg erase <package_name>
358
-~~~~
359
-## pkg info
360
-
361
-Get general information about the specified package(s),  such as name, version, release, repository, install size, and so on.
362
-~~~~
363
-pmd-cli pkg info <package_name>
364
-~~~~
365
-If no packages are specified, then this command returns information about all packages.
366
-~~~~
367
-## pkg install
368
-~~~~
369
-Install the specified package(s). Update the package if an update is available.
370
-~~~~
371
-pmd-cli pkg install <package_name>
372
-~~~~
373
-## pkg list
374
-
375
-Get a list of packages or groups of packages.
376
-~~~~
377
-pmd-cli pkg list
378
-~~~~
379
-You can filter by group: all, available, installed, extras, obsoletes, recent, and upgrades.
380
-~~~~
381
-pmd-cli pkg list upgrades
382
-~~~~
383
-You can also filter by wildcards.
384
-~~~~
385
-pmd-cli pkg list ph\*
386
-~~~~
387
-## pkg reinstall
388
-
389
-Reinstall the specified package(s).
390
-~~~~
391
-pmd-cli pkg reinstall <package_name>
392
-~~~~
393
-## pkg repolist
394
-
395
-Get a list of the configured software repositories.
396
-~~~~
397
-pmd-cli pkg repolist
398
-~~~~
399
-This command returns a list of the configured software repositories, including the repository ID, repitory name, and status.
400
-
401
-## pkg update
402
-
403
-Update the specified package(s).
404
-~~~~
405
-pmd-cli pkg update <package_name>
406
-~~~~
407
-If no parameters are specified, then all available packages are updated.
408
-
409
-## pkg updateinfo
410
-
411
-Get the update information on all enabled repositories (status = enabled). If this command returns nothing, then the update information may not exist on the server.
412
-~~~~
413
-pmd-cli pkg updateinfo
414
-~~~~
415
-# User Management
416
-
417
-The Photon Management Daemon provides CLI commands to help you manage users and user groups.
418
-
419
-## Syntax
420
-~~~~
421
-pmd-cli [connection options] usr <command> [command options]
422
-~~~~
423
-## usr help
424
-
425
-Display help text for user commands.
426
-~~~~
427
-pmd-cli usr users
428
-~~~~
429
-## usr users
430
-
431
-Get a list of users. This command returns information about each user, including their user name, user ID, user group (if applicable), home directory, and default shell.
432
-~~~~
433
-pmd-cli usr users
434
-~~~~
435
-## usr useradd
436
-
437
-Add a new user. Specify the username.
438
-~~~~
439
-pmd-cli usr useradd <username>
440
-~~~~
441
-The system assigns a user ID, home directory, and default shell to the new user. The user group is unspecified.
442
-
443
-## usr userdel
444
-
445
-Delete the specified user.
446
-~~~~
447
-pmd-cli usr userdel <username>
448
-~~~~
449
-## usr userid
450
-
451
-Get the user ID of the specified user (by name). Used to determine whether the specified user exists.
452
-~~~~
453
-pmd-cli usr userid <username>
454
-~~~~
455
-## usr groups
456
-
457
-Get a list of user groups. This command returns the following information about each user group: user group name and user group ID.
458
-~~~~
459
-pmd-cli usr groups
460
-~~~~
461
-## usr groupadd
462
-
463
-Add a new user group.
464
-~~~~
465
-pmd-cli usr groupadd <user_group_name>
466
-~~~~
467
-The system assigns a group ID to the new user group.
468
-
469
-## usr groupdel
470
-
471
-Delete the specified user group.
472
-~~~~
473
-pmd-cli usr groupdel <user_group_name>
474
-~~~~
475
-## usr groupid
476
-
477
-Get the group ID for the specified user group (by name). Used to determine whether the specified user group exists.
478
-~~~~
479
-pmd-cli usr groupid <user_group_name>
480
-~~~~
481
-## usr version
482
-
483
-Get the version of the usermgmt component at the server.
484
-~~~~
485
-pmd-cli usr version
486
-~~~~
... ...
@@ -1,21 +1,31 @@
1 1
 # Running a Photon OS Machine on GCE
2 2
 
3
-Photon OS comes in a preconfigured image ready for Google Cloud Engine. This section demonstrates how to create a Photon OS instance on Google Cloud Engine with and without cloud-init user data.
3
+Photon OS comes in a preconfigured image ready for Google Cloud Engine. 
4 4
 
5
-This section assumes that you have set up a GCE account and, if you try the examples, are ready to pay Google for its cloud services. The GCE-ready version of Photon OS, however, comes for free. It is, in the parlance of Google cloud services, a private image. You can freely download it without registration from Bintray: 
5
+## Example 
6 6
 
7
-	https://bintray.com/vmware/photon/gce/view
7
+The example in this section shows how to create a Photon OS instance on Google Cloud Engine with and without cloud-init user data.
8 8
 
9
-The GCE-ready image of Photon OS contains packages and scripts that prepare it for the Google cloud to save you time as you implement a compute cluster or develop cloud applications. The GCE-ready version of Photon OS adds the following packages to the [packages installed with the minimal version](https://github.com/vmware/photon/blob/master/common/data/packages_minimal.json): 
9
+### Prerequisites 
10 10
 
11
-	sudo, tar, which, google-daemon, google-startup-scripts, 
11
+- You must have set up a GCE account and are ready to pay Google for its cloud services. The GCE-ready version of Photon OS is a free image and is free. You can download it without registration from the following Bintray location: `https://bintray.com/vmware/photon/gce/view`
12
+
13
+    The GCE-ready image of Photon OS contains packages and scripts that prepare it for the Google cloud to save you time as you implement a compute cluster or develop cloud applications. The GCE-ready version of Photon OS adds the following packages to the [packages installed with the minimal version](https://github.com/vmware/photon/blob/master/common/data/packages_minimal.json): 
14
+	
15
+    ```
16
+    sudo, tar, which, google-daemon, google-startup-scripts, 
12 17
 	kubernetes, perl-DBD-SQLite, perl-DBIx-Simple, perl, ntp
18
+```
13 19
 
14
-In addition to a GCE account, the following examples require the gcloud command-line tool; see [https://cloud.google.com/compute/docs/gcloud-compute](https://cloud.google.com/compute/docs/gcloud-compute).
20
+- Verify that you have the `gcloud command-line tool`. 
21
+    For more information see,  [https://cloud.google.com/compute/docs/gcloud-compute](https://cloud.google.com/compute/docs/gcloud-compute).
15 22
 
16
-Here are the commands to create an instance of Photon OS from the Photon GCE image without using cloud-init. In the following commands, you must replace `<bucket-name>` with the name of your bucket. You also need to replace the path to the Photon GCE tar file. 
23
+### Procedure 
17 24
 
18
-	$ gcloud compute instances list
25
+1. Use the following commands to create an instance of Photon OS from the Photon GCE image without using cloud-init. In the commands, you must replace `<bucket-name>` with the name of your bucket and the path to the Photon GCE tar file. 
26
+	
27
+    ```
28
+$ gcloud compute instances list
19 29
 	$ gcloud compute images list
20 30
 	$ gcloud config list
21 31
 	$ gsutil mb gs://<bucket-name>
... ...
@@ -23,12 +33,16 @@ Here are the commands to create an instance of Photon OS from the Photon GCE ima
23 23
 	$ gcloud compute images create photon-gce-image --source-uri gs://<bucket-name>/photon-gce.tar.gz 
24 24
 	$ gcloud compute instances create photon-gce-vm --machine-type "n1-standard-1" --image photon-gce-image
25 25
 	$ gcloud compute instances describe photon-gce-vm
26
+```
26 27
 	 
27
-
28
-Now, to create a new instance of a Photon OS machine and configure it with a cloud-init user data file, replace the `gcloud compute instances create` command in the example above with the following command. Before running this command, you must upload your user-data file to Google's cloud infrastructure and replace `<path-to-userdata-file>` with its path and file name. 
29
-
30
-	gcloud compute instances create photon-gce-vm --machine-type "n1-standard-1" --image photon-gce-vm --metadata-from-file=user-data=<path-to-userdata-file>
31
-
32
-You can also add a cloud-init user-data file to an existing instance of a Photon OS machine on GCE: 
33
-
34
-	gcloud compute instances add-metadata photon-gce-vm --metadata-from-file=user-data=<path-to-userdata-file>
35 28
\ No newline at end of file
29
+1. To create a new instance of a Photon OS machine and configure it with a cloud-init user data file, replace the `gcloud compute instances create` command in the example above with the following command. Before running this command, you must upload your user-data file to Google's cloud infrastructure and replace `<path-to-userdata-file>` with its path and file name. 
30
+
31
+    ```
32
+    gcloud compute instances create photon-gce-vm --machine-type "n1-standard-1" --image photon-gce-vm --metadata-from-file=user-data=<path-to-userdata-file>
33
+```
34
+     
35
+    You can also add a cloud-init user-data file to an existing instance of a Photon OS machine on GCE: 
36
+	
37
+    ```
38
+gcloud compute instances add-metadata photon-gce-vm --metadata-from-file=user-data=<path-to-userdata-file>
39
+```
... ...
@@ -1,8 +1,10 @@
1 1
 # Setting Up Networking for Multiple NICs
2 2
 
3
-If your machine contains multiple NICs, you should, as a best practice, create a .network configuration file for each network interface. The following scenario demonstrates how to set one wired network interface to use a static IP address and another wired network interface to use a dynamic IP address obtained through DHCP. Keep in mind that the following configurations are examples: You must change the IP addresses and other information to match your network and requirements.  
3
+If your machine contains multiple NICs, it is recommend that you create a `.network` configuration file for each network interface. The following scenario demonstrates how to set one wired network interface to use a static IP address and another wired network interface to use a dynamic IP address obtained through DHCP. 
4 4
 
5
-First, create the .network file for the static Ethernet connection in /etc/systemd/network. A best practice is to match the exact name of the network interface, which is in this example eth0. This example file also includes a DNS server for the static IP address. As a result, the configuration sets the UseDNS key to false in the DHCP column so that Photon OS ignores the DHCP server for DNS for this interface.  
5
+**Note**: The following configurations are examples and you must change the IP addresses and other information to match your network and requirements.  
6
+
7
+First, create the `.network` file for the static Ethernet connection in `/etc/systemd/network`. A best practice is to match the exact name of the network interface, which is `eth0` in this example. This example file also includes a DNS server for the static IP address. As a result, the configuration sets the UseDNS key to false in the DHCP column so that Photon OS ignores the DHCP server for DNS for this interface.  
6 8
 
7 9
 	cat > /etc/systemd/network/10-eth0-static-en.network << "EOF"
8 10
 	[Match]
... ...
@@ -17,7 +19,7 @@ First, create the .network file for the static Ethernet connection in /etc/syste
17 17
 	UseDNS=false
18 18
 	EOF
19 19
 
20
-Second, create the .network file for the second network interface, which is named eth1 in this example. This configuration file sets the eth1 interface to an IP address from DHCP and sets DHCP as the source for DNS lookups. Setting the DHCP key to `yes` acquires an IP address for IPv4 and IPv6. To acquire an IP address for IPv4 only, set the DHCP key to <code>ipv4</code>.
20
+Second, create the `.network` file for the second network interface, which is `eth1` in this example. This configuration file sets the eth1 interface to an IP address from DHCP and sets DHCP as the source for DNS lookups. Setting the DHCP key to `yes` acquires an IP address for IPv4 and IPv6. To acquire an IP address for IPv4 only, set the DHCP key to `ipv4`.
21 21
 
22 22
 	cat > /etc/systemd/network/50-eth1-dhcp-en.network << "EOF"
23 23
 
... ...
@@ -1,8 +1,8 @@
1 1
 # Signed Packages
2 2
 
3
-Photon OS signs its packages and repositories with GPG signatures to bolster security. The GPG signature uses keyed-hash authentication method codes, typically the SHA1 algorithm and an MD5 checksum, to simultaneously verify the integrity and authentication of a package. A keyed-hash message authentication code combines a cryptographic hash function with a secret cryptographic key.
3
+Photon OS signs its packages and repositories with GPG signatures to enhance security. The GPG signature uses keyed-hash authentication method codes, typically the SHA1 algorithm and an MD5 checksum, to simultaneously verify the integrity and authentication of a package. A keyed-hash message authentication code combines a cryptographic hash function with a secret cryptographic key.
4 4
 
5
-In Photon OS, GPG signature verification automatically takes place when you install or update a package with the default package manager, tdnf. The default setting in the tdnf configuration file for checking the GPG is set to `1`, for true:  
5
+In Photon OS, GPG signature verification automatically takes place when you install or update a package with the default package manager, tdnf. The default setting in the tdnf configuration file for checking the GPG is set to `1` for true:  
6 6
 
7 7
     cat /etc/tdnf/tdnf.conf
8 8
     [main]
... ...
@@ -48,7 +48,7 @@ If you have one of the RPMs from Photon OS on another Linux system, such as Ubun
48 48
     rpm -K /home/steve/workspace/photon/stage/SRPMS/kubernetes-1.1.8-4.ph1.src.rpm
49 49
     /home/steve/workspace/photon/stage/SRPMS/kubernetes-1.1.8-4.ph1.src.rpm: sha1 md5 OK
50 50
 
51
-And then you can view the SHA1 digest and the MD5 digest by running the following command: 
51
+You can view the SHA1 digest and the MD5 digest by running the following command: 
52 52
 
53 53
     rpm -Kv /home/steve/workspace/photon/stage/SRPMS/kubernetes-1.1.8-4.ph1.src.rpm
54 54
     /home/steve/workspace/photon/stage/SRPMS/kubernetes-1.1.8-4.ph1.src.rpm:
55 55
new file mode 100644
... ...
@@ -0,0 +1,10 @@
0
+# Standard Syntax for `tdnf` Commands 
1
+
2
+The standard syntax for `tdnf` commands is the same as that for DNF and is as follows: 
3
+
4
+	tdnf [options] <command> [<arguments>...]
5
+
6
+You can view help information by using the following commands: 
7
+
8
+	tdnf --help
9
+	tdnf -h
0 10
\ No newline at end of file
... ...
@@ -1,47 +1,11 @@
1
-# Managing Packages in Photon OS with `tdnf`
2
-
3
-## Introduction
4
-
5
-Photon OS manages packages with an open source, yum-compatible package manager called tdnf, for [Tiny Dandified Yum](https://github.com/vmware/tdnf). Tdnf keeps the operating system as small as possible while preserving yum's robust package-management capabilities. 
1
+# Introduction to `tdnf`
6 2
 
7 3
 On Photon OS, tdnf is the default package manager for installing new packages. It is a C implementation of the DNF package manager without Python dependencies. DNF is the next upcoming major version of yum. 
8 4
 
9 5
 Tdnf appears in the minimal and full versions of Photon OS. Tdnf reads yum repositories and works like yum. The full version of Photon OS also includes yum, and you can install packages by using yum if you want. 
10 6
 
11
-In the minimal version of Photon OS, you can manage packages by using yum, but you must install it first by running the following tdnf command as root: 
7
+In the minimal version of Photon OS, you can manage packages by using yum, but you must install it first by running the following `tdnf` command as root: 
12 8
 
13 9
 	tdnf install yum
14 10
 
15
-## How to Configure a Repository
16
-
17
-Photon OS comes with a preconfigured repository called `photon-iso` that resides in `\etc\yum.repos.d.` If you receive an access error message when working with the `photon-iso` repository, it is probably because you do not have the Photon OS ISO mounted. Mount the ISO and the run the following command to update the metadata for all known repositories, including `photon-iso`: 
18
-
19
-	mount /dev/cdrom /media/cdrom
20
-	tdnf makecache
21
-	
22
-	Refreshing metadata for: 'VMware Lightwave 1.0(x86_64)'
23
-	Refreshing metadata for: 'VMware Photon Linux 1.0(x86_64)Updates'
24
-	Refreshing metadata for: 'VMware Photon Extras 1.0(x86_64)'
25
-	Refreshing metadata for: 'VMware Photon Linux 1.0(x86_64)'
26
-	Metadata cache created.
27
-
28
-
29
-## Basic `tdnf` Commands
30
-
31
-Here's how to install a package:
32
-
33
-	tdnf install pkgname
34
-
35
-Remove a package: 
36
-
37
-	tdnf erase pkgname
38
-
39
-List enabled repositories:
40
-
41
-	tdnf repolist
42
-
43
-## Other Commands, Options, and Examples
44
-
45
-Tdnf implements a subset of the dnf commands as listed in the [dnf guide](http://dnf.readthedocs.org/en/latest/).
46
-
47
-For a description of the tdnf commands and options, including examples, see the [Photon OS Administration Guide](photon-admin-guide.md).
48 11
\ No newline at end of file
12
+Tdnf implements a subset of the `dnf` commands as listed in the [dnf guide](http://dnf.readthedocs.org/en/latest/).
49 13
\ No newline at end of file
50 14
deleted file mode 100644
... ...
@@ -1,10 +0,0 @@
1
-# Tiny DNF for Package Management
2
-
3
-On Photon OS, [Tiny Dandified Yum](https://github.com/vmware/tdnf) or Tiny DNF, is the default package manager for installing new packages. It is a C implementation of the DNF package manager. The standard syntax for `tdnf` commands is the same as that for DNF and is as follows: 
4
-
5
-	tdnf [options] <command> [<arguments>...]
6
-
7
-You can view help information by using the following commands: 
8
-
9
-	tdnf --help
10
-	tdnf -h
11 1
\ No newline at end of file
... ...
@@ -1,6 +1,7 @@
1 1
 # Turning Off DHCP
2 2
 
3
-By default, when Photon OS first starts, it creates a DHCP network configuration file, or rule, which appears in /etc/systemd/network, the highest priority directory for network configuration files with the lowest priority filename:
3
+By default, when Photon OS first starts, it creates a DHCP network configuration file or rule, which appears in `/etc/systemd/network`, the highest priority directory for network configuration files with the lowest priority filename:
4
+
4 5
 	cat /etc/systemd/network/99-dhcp-en.network
5 6
 	[Match]
6 7
 	Name=e*
... ...
@@ -1,31 +1,47 @@
1
-# Turning on Network Debugging
1
+# Network Debugging
2 2
 
3
-You can set `systemd-networkd` to work in debug mode so that you can analyze log files with debugging information to help troubleshoot networking problems. The following procedure turns on network debugging by adding a drop-in file in /etc/systemd to customize the default systemd configuration in /usr/lib/systemd. 
3
+You can set `systemd-networkd` to work in debug mode so that you can analyze log files with debugging information to help troubleshoot networking problems. 
4 4
 
5
-First, run the following command as root to create a directory with this exact name, including the `.d` extension:
5
+You can turn on network debugging by adding a drop-in file in `/etc/systemd` to customize the default systemd configuration in `/usr/lib/systemd`. 
6 6
 
7
-	mkdir -p /etc/systemd/system/systemd-networkd.service.d/
7
+**Procedure**
8 8
 
9
-Second, run the following command as root to establish a systemd drop-in unit with a debugging configuration for the network service:
9
+1. Run the following command as root to create a directory with the name `systemd-networkd.service.d`, including the `.d` extension:
10
+	
11
+    ```
12
+mkdir -p /etc/systemd/system/systemd-networkd.service.d/
13
+```
10 14
 
11
-	cat > /etc/systemd/system/systemd-networkd.service.d/10-loglevel-debug.conf << "EOF"
15
+1. Run the following command as root to establish a `systemd` drop-in unit with a debugging configuration for the network service:
16
+
17
+    ```
18
+cat > /etc/systemd/system/systemd-networkd.service.d/10-loglevel-debug.conf << "EOF"
12 19
 	[Service]
13 20
 	Environment=SYSTEMD_LOG_LEVEL=debug
14 21
 	EOF
15
- 
16
-You must reload the systemctl daemon and restart the systemd-networkd service for the changes to take effect: 
22
+```
17 23
 
18
-	systemctl daemon-reload
24
+1. Reload the `systemctl` daemon and restart the `systemd-networkd` service for the changes to take effect: 
25
+	
26
+    ```
27
+systemctl daemon-reload
19 28
 	systemctl restart systemd-networkd
29
+```
20 30
 
21
-Verify that your changes took effect:
22
-
23
-	systemd-delta --type=extended
24
-
25
-View the log files by running this command: 
31
+1. Verify your changes:
26 32
 
27
-	journalctl -u systemd-networkd
33
+    ```
34
+systemd-delta --type=extended
35
+```
28 36
 
29
-When you are finished debugging the network connections, turn debugging off by deleting the drop-in file: 
37
+1. View the log files by running this command: 
38
+	
39
+    ```
40
+journalctl -u systemd-networkd
41
+```
30 42
 
31
-	rm /etc/systemd/system/systemd-networkd.service.d/10-loglevel-debug.conf
32 43
\ No newline at end of file
44
+1. After debugging the network connections, turn debugging off by deleting the drop-in file: 
45
+	
46
+    ```
47
+rm /etc/systemd/system/systemd-networkd.service.d/10-loglevel-debug.conf
48
+```
... ...
@@ -1,8 +1,12 @@
1 1
 # Use `ip` and `ss` Commands
2 2
 
3
+Use the `ip` and `ss` commands to view a list of network interfaces and information for IP addresses.
4
+
3 5
 Although the `ifconfig` command and the `netstat` command work on Photon OS, VMware recommends that you use the `ip` or `ss` commands. The `ipconfig` and `netstat` commands are deprecated. 
4 6
 
5
-For example, instead of running `netstat` to display a list of network interfaces, run the `ss` command. Similarly, to display information for IP addresses, instead of running `ifconfig -a`, run the `ip addr` command. Examples:
7
+For example, to display a list of network interfaces, run the `ss` command instead of `netstat`. To display information for IP addresses, run the `ip addr` command instead of `ifconfig -a`. 
8
+
9
+Examples are as follows:
6 10
 
7 11
 	USE THIS IPROUTE COMMAND 	INSTEAD OF THIS NET-TOOL COMMAND
8 12
 	ip addr 					ifconfig -a
... ...
@@ -13,7 +17,7 @@ For example, instead of running `netstat` to display a list of network interface
13 13
 	ip -s neigh					arp -v
14 14
 	ip link set eth0 mtu 9000	ifconfig eth0 mtu 9000
15 15
 
16
-Using the `ip route` version of a command instead of the net-tools version often provides more complete, accurate information on Photon OS, as the following example demonstrates: 
16
+Using the `ip route` version of a command instead of the net-tools version often provides more complete and accurate information on Photon OS. Examples are as follows: 
17 17
 
18 18
 	ip neigh
19 19
 	198.51.100.2 dev eth0 lladdr 00:50:56:e2:02:0f STALE
... ...
@@ -1,55 +1,72 @@
1 1
 # Using Predictable Network Interface Names
2 2
 
3
-On a virtual machine running Photon OS, just as on a bare-metal machine, the Ethernet network interface name might shift from one device to another if you add or removed a card and reboot the machine. A device named `eth2`, for example, might become `eth1` after a NIC is removed and the machine is restarted.
3
+When you run Photon OS on a virtual machine or a bare-metal machine, the Ethernet network interface name might shift from one device to another if you add or remove a card and reboot the machine. For example, a device named `eth2` might become `eth1` after you remove a NIC and restart the machine.
4 4
 
5
-You can prevent interface names from reordering by turning on [predictable network interface names](https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/). The naming schemes that Photon OS uses can then assign fixed, predictable names to network interfaces even after cards or other firmware are added or removed and the system is restarted. With predictable network interface names enabled, you can select among several options to assign persistent names to network interfaces:
5
+You can prevent interface names from reordering by turning on [predictable network interface names](https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/). The naming schemes that Photon OS uses can then assign fixed, predictable names to network interfaces even after you add or remove cards or other firmware and the restart the system. 
6
+
7
+When you enable predictable network interface names, you can use one of the following options to assign persistent names to network interfaces:
6 8
 
7 9
 * Apply the `slot` name policy to set the name of networking devices in the `ens` format with a statically assigned PCI slot number.
8 10
 * Apply the `mac` name policy to set the name of networking devices in the `enx` format a unique MAC address. 
9 11
 * Apply the `path` name policy to set the name of networking devices in the `enpXsY` format derived from a device connector's physical location.
10 12
 
11
-(Although Photon OS also supports the `onboard` name policy to set in the `eno` format the name of networking devices from index numbers given by the firmware, the `onboard` policy might result in nonpersistent names.) 
12
-
13
-The option that you choose depends on your use case and your unique networking requirements. If, for instance, you clone clones virtual machines in a use case that requires the MAC addresses to be different from one another but the interface name to be the same, you should consider using `ens` to keep the slot the same after reboots. 
13
+Though Photon OS supports the `onboard` name policy to set the name of networking devices from index numbers given by the firmware in the `eno` format, the policy might result in nonpersistent names. 
14 14
 
15
-Alternatively, if the cloning function supports it and it works for your use case, you can use `enx` to set a MAC address, which also persists after reboots. 
15
+The option to choose depends on your use case and your unique networking requirements. For example, when you clone virtual machines and require the MAC addresses to be different from one another but the interface name to be the same, consider using `ens` to keep the slot the same after system reboots. 
16 16
 
17
-Here's how to turn on predictable network interface names.
17
+Alternatively, if the cloning function supports `enx`, you can use it to set a MAC address which persists after reboots. 
18 18
 
19
-First, make a backup copy of the following file in case you need to restore it later: 
19
+Perform the following steps to turn on predictable network interface names: 
20 20
 
21
+1. Make a backup copy of the following file in case you need to restore it later:
22
+    
23
+    ```
21 24
     cp /boot/grub/grub.cfg /boot/grub/grub.cfg.original
25
+    ``` 
22 26
 
23
-Second, to turn on predictable network interface names, edit `/boot/grub/grub.cfg` to remove the following string: 
27
+2. To turn on predictable network interface names, edit `/boot/grub/grub.cfg` to remove the following string: 
24 28
 
25
-    net.ifnames=0
26
-
27
-The string appears near the bottom of the file in the `menuentry` section:
29
+    
30
+    ```
31
+    net.ifnames=0Item
32
+    ```
33
+    The string appears near the bottom of the file in the `menuentry` section:
28 34
 
35
+    
36
+    ```
29 37
     menuentry "Photon" {
30
-        linux "/boot/"$photon_linux root=$rootpartition net.ifnames=0 $photon_cmdline
31
-        if [ "$photon_initrd" ]; then
38
+       linux "/boot/"$photon_linux root=$rootpartition net.ifnames=0 $photon_cmdline
39
+       if [ "$photon_initrd" ]; then
32 40
             initrd "/boot/"$photon_initrd
33
-        fi
41
+       fi
34 42
     }
35 43
     # End /boot/grub2/grub.cfg
44
+    ```
36 45
 
37
-Edit out `net.ifnames=0`, but make no other changes to the file, and then save it. 
46
+    Edit out `net.ifnames=0`, but make no other changes to the file, and then save it. 
38 47
 
39
-Third, specify the types of policies that you want to use for predictable interface names by modifying the `NamePolicy` option in `/lib/systemd/network/99-default.link`. Here's what the file looks like: 
48
+1. Specify the types of policies that you want to use for predictable interface names by modifying the `NamePolicy` option in `/lib/systemd/network/99-default.link`. The file contents are as follows: 
40 49
 
50
+    
51
+    ```
41 52
     cat /lib/systemd/network/99-default.link
42 53
     [Link]
43 54
     NamePolicy=kernel database
44 55
     MACAddressPolicy=persistent
45 56
 
46
-To use the `ens` or `enx` option, the `slot` policy or the `mac` policy can be added to the space-separated list of policies that follow the `NamePolicy` option in the default link file, `/lib/systemd/network/99-default.link`. The order of the policies matters: Photon OS applies the policy listed first before proceeding to the next policy if the first one fails. Example: 
57
+    ```
58
+
59
+To use the `ens` or `enx` option, the `slot` policy or the `mac` policy can be added to the space-separated list of policies that follow the `NamePolicy` option in the default link file, `/lib/systemd/network/99-default.link`. The order of the policies matters. Photon OS applies the policy listed first before proceeding to the next policy if the first one fails. 
47 60
 
48
-    /lib/systemd/network/99-default.link
61
+For example: 
62
+    
63
+```
64
+/lib/systemd/network/99-default.link
49 65
     [Link]
50 66
     NamePolicy=slot mac kernel database
51 67
     MACAddressPolicy=persistent
68
+```
52 69
 
53
-With the name policy specified in the above example, it's possible that you could still end up with an Ethernet-style interface name if the two previous policies, `slot` and `mac`, fail. 
70
+With the name policy specified in the above example, you might still have an Ethernet-style interface name if the two previous policies, `slot` and `mac`, fail. 
54 71
 
55 72
 For information on setting name policies, see [systemd.link--network device configuration](https://www.freedesktop.org/software/systemd/man/systemd.link.html). 
56 73
\ No newline at end of file
... ...
@@ -1,6 +1,7 @@
1 1
 # Using the Network Configuration Manager
2 2
 
3 3
 The Network Configuration Manager library that ships with Photon OS 2.0 provides a collection of C, Python, and CLI APIs that simplify common onfiguration tasks for:
4
+
4 5
 - interfaces
5 6
 - IP addresses (IPv4 and IPv6 addresses)
6 7
 - routes
... ...
@@ -10,7 +11,8 @@ The Network Configuration Manager library that ships with Photon OS 2.0 provides
10 10
 - service management
11 11
 - object parameters (interfaces and files)
12 12
 
13
-For additional details, see:
13
+For more information, see:
14
+
14 15
 - **CLI** - see the ``-net`` commands in the [Photon Management Daemon Command-line Interface (pmd-cli)](pmd-cli.md)
15 16
 - **C APIs** - [Network Configuration Manager - C API](netmgr.c.md)
16 17
 - **Python APIs** - [Network Configuration Manager - Python API](netmgr.python.md)
17 18
\ No newline at end of file
18 19
deleted file mode 100644
... ...
@@ -1,3 +0,0 @@
1
-# Working with Repositories and Packages
2
-
3
-The design of Photon OS simplifies life-cycle management and improves the security of packages. Photon OS seeks to reduce the burden and complexity of managing clusters of Linux machines by providing curated package repositories and by securing packages with GPG signatures. 
4 1
\ No newline at end of file
5 2
new file mode 100644
... ...
@@ -0,0 +1,15 @@
0
+# Downloading Photon OS
1
+
2
+You download Photon OS from https://github.com/vmware/photon/wiki/Downloading-Photon-OS.
3
+
4
+Photon OS is available in the following pre-packaged, binary formats.
5
+
6
+## Download Formats ####
7
+
8
+| Format | Description |
9
+| --- | --- |
10
+| ISO Image | Contains everything needed to install either the minimal or full installation of Photon OS. The bootable ISO has a manual installer or can be used with PXE/kickstart environments for automated installations. |
11
+| OVA | Pre-installed minimal environment, customized for VMware hypervisor environments. These customizations include a highly sanitized and optimized kernel to give improved boot and runtime performance for containers and Linux applications. Since an OVA is a complete virtual machine definition, we've made available a Photon OS OVA that has virtual hardware version 11; this will allow for compatibility with several versions of VMware platforms or allow for the latest and greatest virtual hardware enhancements. |
12
+| Amazon AMI | Pre-packaged and tested version of Photon OS made ready to deploy in your Amazon EC2 cloud environment. Previously, we'd published documentation on how to create an Amazon compatible instance, but, now we've done the work for you. |
13
+| Google GCE Image | Pre-packaged and tested Google GCE image that is ready to deploy in your Google Compute Engine Environment, with all modifications and package requirements for running Photon OS in GCE. | 
14
+| Azure VHD | Pre-packaged and tested Azure HD image that is ready to deploy in your Microsoft Azure Cloud, with all modifications and package requirements for running Photon OS in Azure. |
0 15
\ No newline at end of file
1 16
new file mode 100644
... ...
@@ -0,0 +1,38 @@
0
+# Installing the Lightwave Client on a Photon Image and Joining the Client to a Domain
1
+
2
+After you have set up a Lightwave domain controller, you can join Photon clients to that domain. You install the Lightwave client first. After the client is installed, you join the client to the domain.
3
+
4
+## Prerequisites
5
+
6
+- Prepare a Photon OS client for the Lightwave client installation.
7
+- Verify that the hostname of the client can be resolved.
8
+- Verify that you have 184 MB free for the Lightwave client installation.
9
+
10
+## Procedure
11
+
12
+1. Log in to your Photon OS client over SSH.
13
+2. Install the Lightwave client by running the following command. 
14
+	
15
+	`# tdnf install lightwave-client -y`
16
+
17
+3. Edit the `iptables` firewall rules configuration file to allow connections on port `2020` as a default setting.
18
+	
19
+	The default Photon OS 2.0 firewall settings block all incoming, outgoing, and forwards so that you must configure the rules.
20
+
21
+	1. Open the  iptables settings file.
22
+	
23
+	`# vi /etc/systemd/scripts/iptables`
24
+
25
+	2. Add allow information over tcp for port 2020 in the end of the file, save, and close the file.
26
+
27
+	`iptables -A INPUT -p tcp -m tcp --dport 2020 -j ACCEPT`
28
+
29
+	3. Run the following command to allow the required connections without restarting the client.
30
+
31
+	`# iptables -A INPUT -p tcp -m tcp --dport 2020 -j ACCEPT`
32
+
33
+4. Join the client to the domain by running the `domainjoin.sh` script and configuring the domain controller FQDN, domain, and the password for the `administrator` user.
34
+
35
+	`# domainjoin.sh --domain-controller <lightwave-server-FQDN> --domain <your-domain> --password '<administrator-user-password>`
36
+
37
+5. In a browser, go to https://*Lightwave-Server-FQDN* to verify that the client appears under the tenants list for the domain.
0 38
\ No newline at end of file
1 39
new file mode 100644
... ...
@@ -0,0 +1,34 @@
0
+# Installing the Lightwave Server and Configuring It as a Domain Controller on a Photon Image
1
+
2
+You can configure Lightwave server as domain controller on a Photon client. You install the Lightwave server first. After the server is installed, you configure a new domain. 
3
+
4
+## Prerequisites
5
+
6
+- Prepare a Photon OS client for the Lightwave server installation.
7
+- Verify that the hostname of the client can be resolved.
8
+- Verify that you have 500 MB free for the Lightwave server installation.
9
+
10
+## Procedure
11
+
12
+1. Log in to your Photon OS client over SSH as an administrator.
13
+2. Install the Lightwave server by running the following command. 
14
+	
15
+	`# tdnf install lightwave -y`
16
+3. Configure the Lightwave server as domain controller by selecting a domain name and password for the `administrator` user.
17
+	
18
+	The minimum required password complexity is 8 characters, one symbol, one upper case letter, and one lower case letter. 
19
+	Optionally, if you want to access the domain controller over IP, configure the ip under the `--ssl-subject-alt-name` parameter.
20
+	`# configure-lightwave-server --domain <your-domain> --password '<administrator-user-password>' --ssl-subject-alt-name <machine-ip-address>`
21
+4. Edit `iptables` rules to allow connections to and from the client.
22
+
23
+	The default Photon OS 2.0 firewall settings block all incoming, outgoing, and forwards so that you must reconfigure them.
24
+	
25
+	`# iptables -P INPUT ACCEPT`
26
+
27
+	`# iptables -P OUTPUT ACCEPT`
28
+
29
+	`# iptables -P FORWARD ACCEPT`
30
+
31
+5. In a browser, go to https://*lightwave-server-FQDN* to verify that you can log in to the newly created domain controller.
32
+	1. On the Cascade Identity Services page, enter the domain that you configured and click **Take me to Lightwave Admin**.
33
+	2. On the Welcome page, enter administrator@your-domain as user name and the password that you set during the domain controller configuration and click **LOGIN**.
0 34
\ No newline at end of file
1 35
new file mode 100644
... ...
@@ -0,0 +1,11 @@
0
+# Installing and Using Lightwave on Photon OS #
1
+
2
+Project Lightwave is an open-sourced project that provides enterprise-grade identity and access management services, and can be used to solve key security, governance, and compliance challenges for a variety of use cases within the enterprise. Through integration between Photon OS and Project Lightwave, organizations can enforce security and governance on container workloads, for example, by ensuring only authorized containers are run on authorized hosts, by authorized users. For more details about Lightwave, see the [project Lightwave page on GitHub](https://github.com/vmware/lightwave).
3
+
4
+## Procedure
5
+
6
+1. [Installing the Lightwave Server and Configuring It as a Domain Controller on a Photon Image](Installing-Lightwave-Server-and-Setting-Up-a-Domain.md)
7
+2. [Installing the Lightwave Client on a Photon Image and Joining the Client to a Domain](Installing-Lightwave-Client-and-Joining-a-Domain.md)
8
+3. [Installing the Photon Management Daemon on a Lightwave Client](Installing-the-Photon-Management-Daemon-on-a-Lightwave-Client.md)
9
+4. [Remotely Upgrade a Single Photon OS Machine With Lightwave Client and Photon Management Daemon Installed](Remotely-Upgrade-a-Photon-OS-Machine-With-Lightwave-Client-and-Photon-Management-Daemon-Installed.md)
10
+5. [Remotely Upgrade Multiple Photon OS Machines With Lightwave Client and Photon Management Daemon Installed](Remotely-Upgrade-Photon-OS-Machine-With-Lightwave-Client-and-Photon-Management-Daemon-Installed.md)
0 11
new file mode 100644
... ...
@@ -0,0 +1,35 @@
0
+# Installing the Photon Management Daemon on a Lightwave Client 
1
+
2
+After you have installed and configured a domain on Lightwave, and joined a client to the domain, you can install the Photon Management Daemon on that client so that you can remotely manage it.
3
+
4
+## Prerequisites
5
+
6
+- Have an installed Lightwave server with configured domain controller on it.
7
+- Have an installed Lightwave client that is joined to the domain.
8
+- Verify that you have 100 MB free for the daemon installation on the client.
9
+
10
+## Procedure
11
+
12
+1. Log in to a machine with installed Lightwave client over SSH as an administrator.
13
+2. Install the Photon Management Daemon.
14
+	
15
+	`# tdnf install pmd -y`
16
+2. Start the Photon Management Daemon.
17
+	 
18
+	`# systemctl start pmd`
19
+3. Verify that the daemon is in an `active` state.
20
+
21
+	`# systemctl status pmd`
22
+4. (Optional) In a new console, use `curl` to verify that the Photon Management Daemon returns information.
23
+
24
+	Use the root credentials for the local client to authenticate against the daemon service.
25
+	`# curl https://<lightwave-client-FQDN>:2081/v1/info -ku root`
26
+
27
+5. (Optional) Create an administrative user for the Photon Management Daemon for your domain and assign it the domain administrator role.
28
+	1. In a browser, go to https://*lightwave-server-FQDN*.
29
+	1. On the Cascade Identity Services page, enter your domain name and click **Take me to Lightwave Admin**.
30
+	2. On the Welcome page, enter administrative credentials for your domain and click **Login**.
31
+	2. Click **Users & Groups** and click **Add** to create a new user.
32
+	3. On the Add New User page, enter user name, at least one name, password, and click **Save**.
33
+	3. Click the **Groups** tab, select the Administrators group, and click  **Membership**  to add the new user to the group.
34
+	4. On the View Members page, select the user that you created, click **Add Member**, click **Save**, and click **Cancel** to return to the previous page.
0 35
\ No newline at end of file
1 36
new file mode 100644
... ...
@@ -0,0 +1,21 @@
0
+# Installation Guide
1
+
2
+The Photon OS *Installation Guide* provides information about how administrators can install Photon OS.
3
+
4
+**Product version: 3.0**
5
+
6
+This documentation applies to all 3.0.x releases.
7
+
8
+## Intended Audiences
9
+
10
+This information is intended for Photon OS administrators who install and set up Photon OS.
11
+
12
+----------
13
+
14
+Copyright &copy; 2016-2018 VMware, Inc. All rights reserved. [Copyright and trademark information](http://pubs.vmware.com/copyright-trademark.html). Any feedback you provide to VMware is subject to the terms at [www.vmware.com/community_terms.html](http://www.vmware.com/community_terms.html).
15
+
16
+**VMware, Inc.**<br>
17
+3401 Hillview Ave.<br>
18
+Palo Alto, CA 94304
19
+
20
+[www.vmware.com](http://www.vmware.com)
0 21
new file mode 100644
... ...
@@ -0,0 +1,49 @@
0
+# Remotely Upgrade Multiple Photon OS Machines With Lightwave Client and Photon Management Daemon Installed
1
+
2
+After you have a configured the Photon Management Daemon (PMD) on multiple machines, you can remotely upgrade any installed package on these machines.
3
+
4
+Upgrade process uses `copenapi_cli` that is supported from both Lightwave and Photon Management Daemon. You can initiate the upgrade process from any machine that has Photon Management Daemon installed.   
5
+
6
+## Prerequisites
7
+
8
+- Have an installed Lightwave server with configured domain controller on it.
9
+- Have installed Lightwave clients that are joined to the domain.
10
+- Have installed Photon Management Daemon on the clients.
11
+
12
+## Procedure
13
+
14
+1. To initiate remote upgrade, log in to a Photon OS machine over SSH to install the Photon Management Daemon CLI.
15
+
16
+	`# tdnf install pmd-cli` 
17
+2. Edit the `copenapi_cli` spec files so that you can specify the machines you want to upgrade and credentials to be used.
18
+	1. Edit the `.netrc` file to specify machines to be upgraded and credentials for the PMD service.
19
+
20
+		`# vi ~/.netrc`  
21
+	3. In the file, enter the IP addresses for the machines and administrative credentials, save and close the file.
22
+
23
+		`# machine <IP-address> login <pmd-administrative-user> password <pmd-administrative user-password>`
24
+
25
+	1. (Optional) Get the location of the `restapispec.json` file.
26
+
27
+		`# cat ~/.copenapi`
28
+
29
+		This command returns `apispec=/root/restapispec.json` as path for the spec file.
30
+ 
31
+	3. Edit the `restapispec.json` file to enter the IP address of the machine to be upgraded.
32
+	
33
+		`# vi /root/restapispec.json`
34
+	4. Change the `host` value to the IP address or the hostname of the machine, leave the port number, and save and close the file.
35
+	
36
+		`"host":"<ip-address>:2081"` 
37
+	
38
+
39
+4. Initiate the upgrade, in this example of the `sed` package and wait for the command to complete.
40
+
41
+	Specify `-k` to force blind trust of certificates and `-n` to use the credentials from the `.netrc` file. 
42
+	`# copenapi_cli pkg update --packages sed -kn`
43
+
44
+5. (Optional) Verify that the package was upgraded successfully.
45
+	1. Log in to the machine that was upgraded over SSH.
46
+	2. List the installed version of the `sed` package.
47
+		
48
+		`# tdnf list installed sed`
0 49
\ No newline at end of file
1 50
new file mode 100644
... ...
@@ -0,0 +1,35 @@
0
+# Remotely Upgrade a Single Photon OS Machine With Lightwave Client and Photon Management Daemon Installed 
1
+
2
+After you have a configured the Photon Management Daemon on a machine, you can remotely upgrade any installed package on that machine. You can use the `root` user credentials.
3
+
4
+Upgrade process uses `pmd-cli` that is supported from both Lightwave and Photon Management Daemon. You can initiate the upgrade process from any machine that has Photon Management Daemon CLI installed.
5
+
6
+## Prerequisites
7
+
8
+- Have an installed Lightwave server with configured domain controller on it.
9
+- Have an installed Lightwave client that is joined to the domain.
10
+- Have an installed Photon Management Daemon on the client.
11
+- Have in installed Photon Management Daemon CLI (pmd-cli) on a machine from which you perform the updates.
12
+
13
+## Procedure
14
+
15
+1. To initiate remote upgrade, log in to a machine that has Photon Management Daemon CLI installed over SSH.
16
+2. Identify packages that can be upgraded on the client machine.
17
+	2. List the available updates for the machine.
18
+		
19
+		`# pmd-cli --server-name <machine-IP-address> --user root pkg list updates`
20
+	3. Verify the currently installed version of a package, for example `sed`.
21
+
22
+		`# `# pmd-cli --server-name <machine-IP-address> --user root pkg installed sed`
23
+		The installed version number shows as earlier than the one listed under the available updates.
24
+
25
+
26
+4. Initiate the upgrade, in this example of the `sed` package, enter password, and wait for the command to complete.
27
+ 
28
+	`# pmd-cli --server-name <machine-IP-address> --user root pkg update sed`
29
+
30
+5. (Optional) Verify that the client machine package was upgraded successfully.
31
+	1. Log in to the machine that was upgraded over SSH.
32
+	2. List the installed version of the `sed` package.
33
+		
34
+		`# pmd-cli --server-name <machine-IP-address> --user root pkg installed sed`
0 35
\ No newline at end of file
1 36
new file mode 100644
... ...
@@ -0,0 +1,46 @@
0
+# Remotely Upgrade Multiple Photon OS Machines With Lightwave Client and Photon Management Daemon Installed
1
+
2
+After you have a configured the Photon Management Daemon (PMD) on multiple machines, you can remotely upgrade any installed package on these machines.
3
+
4
+Upgrade process uses `copenapi_cli` that is supported from both Lightwave and Photon Management Daemon. You can initiate the upgrade process from any machine that has Photon Management Daemon installed.   
5
+
6
+## Prerequisites
7
+
8
+- Have an installed Lightwave server with configured domain controller on it.
9
+- Have installed Lightwave clients that are joined to the domain.
10
+- Have installed Photon Management Daemon on the clients.
11
+
12
+## Procedure
13
+
14
+1. To initiate remote upgrade, log in to a Photon OS machine over SSH to install the Photon Management Daemon CLI.
15
+
16
+	`# tdnf install pmd-cli` 
17
+2. Edit the `copenapi_cli` spec files so that you can specify the machines you want to upgrade and credentials to be used.
18
+	1. Edit the `.netrc` file to specify machines to be upgraded and credentials for the PMD service.
19
+
20
+		`# vi ~/.netrc`  
21
+	2. In the file, enter the IP addresses for the machines and administrative credentials, save and close the file.
22
+
23
+		`# machine <IP-address> login <pmd-administrative-user> password <pmd-administrative user-password>`
24
+
25
+	3. Go to [https://raw.githubusercontent.com/vmware/pmd/master/conf/restapispec.json](https://raw.githubusercontent.com/vmware/pmd/master/conf/restapispec.json "the following link") and save the `restapispec.json` file locally to the `root` folder.
26
+
27
+ 
28
+	4. Edit the `restapispec.json` file to enter the IP address of the machine to be upgraded.
29
+	
30
+		`# vi /root/restapispec.json`
31
+	5. Change the `host` value to the IP address or the hostname of the machine, leave the port number, and save and close the file.
32
+	
33
+		`"host":"<ip-address>:2081"` 
34
+	
35
+
36
+4. Initiate the upgrade, in this example of the `sed` package and wait for the command to complete.
37
+
38
+	Specify `-k` to force blind trust of certificates and `-n` to use the credentials from the `.netrc` file. 
39
+	`# copenapi_cli pkg update  --packages sed -kn`
40
+
41
+5. (Optional) Verify that the client machine package was upgraded successfully.
42
+	1. Log in to the machine that was upgraded over SSH.
43
+	2. List the installed version of the `sed` package.
44
+		
45
+		`# tdnf list installed sed`
0 46
\ No newline at end of file
1 47
new file mode 100644
... ...
@@ -0,0 +1,35 @@
0
+# Remotely Upgrade a Single Photon OS Machine With Lightwave Client and Photon Management Daemon Installed
1
+
2
+After you have a configured the Photon Management Daemon on a machine, you can remotely upgrade any installed package on that machine. You can use the `root` user credentials.
3
+
4
+Upgrade process uses `pmd-cli` that is supported from both Lightwave and Photon Management Daemon. You can initiate the upgrade process from any machine that has Photon Management Daemon CLI installed.
5
+
6
+## Prerequisites
7
+
8
+- Have an installed Lightwave server with configured domain controller on it.
9
+- Have an installed Lightwave client that is joined to the domain.
10
+- Have an installed Photon Management Daemon on the client.
11
+- Have in installed Photon Management Daemon CLI (pmd-cli) on a machine from which you perform the updates.
12
+
13
+## Procedure
14
+
15
+1. To initiate remote upgrade, log in to a machine that has Photon Management Daemon CLI installed over SSH.
16
+2. Identify packages that can be upgraded on the client machine.
17
+	2. List the available updates for the machine.
18
+		
19
+		`# pmd-cli --server-name <machine-IP-address> --user root pkg list updates`
20
+	3. Verify the currently installed version of a package, for example `sed`.
21
+
22
+		`# `# pmd-cli --server-name <machine-IP-address> --user root pkg installed sed`
23
+		The installed version number shows as earlier than the one listed under the available updates.
24
+
25
+
26
+4. Initiate the upgrade, in this example of the `sed` package, enter password, and wait for the command to complete.
27
+ 
28
+	`# pmd-cli --server-name <machine-IP-address> --user root pkg update sed`
29
+
30
+5. (Optional) Verify that the client machine package was upgraded successfully.
31
+	1. Log in to the machine that was upgraded over SSH.
32
+	2. List the installed version of the `sed` package.
33
+		
34
+		`# pmd-cli --server-name <machine-IP-address> --user root pkg installed sed`
0 35
\ No newline at end of file
1 36
new file mode 100644
... ...
@@ -0,0 +1,262 @@
0
+# Running Photon OS on Amazon Elastic Cloud Compute
1
+
2
+This guide describes how to get Photon OS up and running on Amazon Web Services Elastic Cloud Compute (EC2), customize Photon with cloud-init, connect to it with SSH, and run a containerized application.
3
+ 
4
+## About Photon OS?
5
+Photon OS™ is an open source Linux container host optimized for cloud-native applications, cloud platforms, and VMware infrastructure. Photon OS provides a secure run-time environment for efficiently running containers. For an overview, see [https://vmware.github.io/photon/](#https://vmware.github.io/photon/).
6
+
7
+## Prerequisites
8
+
9
+Using Photon OS within AWS EC2 requires the following resources:
10
+
11
+- **AWS account**. Working with EC2 requires an Amazon account for AWS with valid payment information. Keep in mind that, if you try the examples in this document, you will be charged by Amazon. See [Setting Up with Amazon EC2](#http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/get-set-up-for-amazon-ec2.html).
12
+- **Amazon tools**. The following examples also assume that you have installed and configured the Amazon AWS CLI and the EC2 CLI and AMI tools, including ec2-ami-tools.
13
+
14
+See [Installing the AWS Command Line Interface](#http://docs.aws.amazon.com/cli/latest/userguide/installing.html), [Setting Up the Amazon EC2 Command Line Interface Tools on Linux](#http://docs.aws.amazon.com/AWSEC2/latest/CommandLineReference/set-up-ec2-cli-linux.html), and [Configuring AWS Command-Line Interface](#http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html). Also see [Setting Up the AMI Tools](#http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/set-up-ami-tools.html).
15
+This article uses an Ubuntu 14.04 workstation to generate the keys and certificates that AWS requires.
16
+
17
+## Downloading the Photon OS Image for Amazon
18
+
19
+VMware packages Photon OS as a cloud-ready Amazon machine image (AMI) that you can download for free from [Bintray](https://bintray.com/vmware/photon).
20
+
21
+Download the Photon OS AMI now and save it on your workstation. For instructions, see [Downloading Photon OS](Downloading-Photon-OS.md).
22
+
23
+**Note**: The AMI version of Photon is a virtual appliance with the information and packages that Amazon needs to launch an instance of Photon in the cloud. To build the AMI version, VMware starts with the minimal version of Photon OS and adds the sudo and tar packages to it. 
24
+
25
+## Getting Photon OS Up and Running on EC2
26
+
27
+To run Photon OS on EC2, you must use cloud-init with an EC2 data source. The cloud-init service configures the cloud instance of a Linux image. An _instance_ is a virtual server in the Amazon cloud. 
28
+
29
+The examples in this article show how to generate SSH and RSA keys for your Photon instance, upload the Photon OS `.ami` image to the Amazon cloud, and configure it with cloud-init. In many of the examples, you must replace information with your own paths, account details, or other information from Amazon. 
30
+
31
+### Step 1: Create a Key Pair
32
+
33
+The first step is to generate SSH keys on, for instance, an Ubuntu workstation: 
34
+
35
+	ssh-keygen -f ~/.ssh/mykeypair
36
+
37
+The command generates a public key in the file with a `.pub` extension and a private key in a file with no extension. Keep the private key file and remember the name of your key pair; the name is the file name of the two files without an extension. You'll need the name later to connect to the Photon instance.
38
+
39
+Change the mode bits of the public key pair file to protect its security. In the command, include the path to the file if you need to. 
40
+
41
+	chown 600 mykeypair.pub
42
+
43
+Change the mode bits on your private key pair file so that only you can view it:
44
+
45
+	chmod 400 mykeypair
46
+
47
+To import your public key pair file (but not your private key pair file), connect to the EC2 console at https://console.aws.amazon.com/ec2/ and select the region for the key pair. A key pair works in only one region, and the instance of Photon that will be uploaded later must be in the same region as the key pair. Select `key pairs` under `Network & Security`, and then import the public key pair file that you generated earlier. 
48
+
49
+For more information, see [Importing Your Own Key Pair to Amazon EC2](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html#how-to-generate-your-own-key-and-import-it-to-aws).
50
+
51
+### Step 2: Generate a Certificate
52
+
53
+When you bundle up an image for EC2, Amazon requires an RSA user signing certificate. You create the certificate by using openssl to first generate a private RSA key and then to generate the RSA certificate that references the private RSA key. Amazon uses the pairing of the private key and the user signing certificate for  handshake verification. 
54
+
55
+First, on Ubuntu 14.04 or another workstation that includes openssl, run the following command to generate a private key. If you change the name of the key, keep in mind that you will need to include the name of the key in the next command, which generates the certificate. 
56
+
57
+	openssl genrsa 2048 > myprivatersakey.pem
58
+
59
+Remember where you store your private key locally; you'll need it again later. 
60
+
61
+Second, run the following command to generate the certificate. The command prompts you to provide more information, but because you are generating a user signing certificate, not a server certificate, you can just type `Enter` for each prompt to leave all the fields blank. 
62
+
63
+	openssl req -new -x509 -nodes -sha256 -days 365 -key myprivatersakey.pem -outform PEM -out certificate.pem
64
+
65
+For more information, see the Create a Private Key and the Create the User Signing Certificate sections of [Setting Up the AMI Tools](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/set-up-ami-tools.html#ami-upload-bundle).
66
+
67
+Third, upload to AWS the certificate value from the `certificate.pem` file that you created in the previous command. Go to the Identity and Access Management console at https://console.aws.amazon.com/iam/, navigate to the name of your user, open the `Security Credentials` section, click `Manage Signing Certificates`, and then click `Upload Signing Certificate`. Open `certificate.pem` in a text editor, copy and paste the contents of the file into the `Certificate Body` field, and then click `Upload Signing Certificate`.
68
+
69
+For more information, see the Upload the User Signing Certificate section of [Setting Up the AMI Tools](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/set-up-ami-tools.html#ami-upload-bundle).
70
+
71
+### Step 3: Create a Security Group
72
+
73
+The next prerequisite is to create a security group and set it to allow SSH, HTTP, and HTTPS connections over ports 22, 80, and 443, respectively. Connect to the EC2 command-line interface and run the following commands: 
74
+
75
+	aws ec2 create-security-group --group-name photon-sg --description "My Photon security group"
76
+	{
77
+	    "GroupId": "sg-d027efb4"
78
+	}
79
+	aws ec2 authorize-security-group-ingress --group-name photon-sg --protocol tcp --port 22 --cidr 0.0.0.0/0
80
+
81
+The `GroupId` is returned by EC2. Write it down; you'll need it later.
82
+
83
+By using `0.0.0.0/0` for SSH ingress on Port 22, you are opening the port to all IP addresses--which is not a security best practice but a convenience for the examples in this article. For a production instance or other instances that are anything more than temporary machines, you should authorize only a specific IP address or range of addresses. See Amazon's document on [Authorizing Inbound Traffic for Linux Instances](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/authorizing-access-to-an-instance.html).
84
+
85
+Repeat the command to allow incoming traffic on Port 80 and on Port 443: 
86
+
87
+	aws ec2 authorize-security-group-ingress --group-name photon-sg --protocol tcp --port 80 --cidr 0.0.0.0/0
88
+
89
+	aws ec2 authorize-security-group-ingress --group-name photon-sg --protocol tcp --port 443 --cidr 0.0.0.0/0
90
+
91
+Check your work: 
92
+
93
+	aws ec2 describe-security-groups --group-names photon-sg
94
+
95
+### Step 4: Extract the Tarball 
96
+
97
+Next, make a directory to store the image, and then extract the Photon OS image from its archive by running the following `tar` command. (You might have to change the file name to match the version you have.)    
98
+
99
+	mkdir bundled
100
+	tar -zxvf ./photon-ami.tar.gz
101
+
102
+### Step 5: Bundle the Image
103
+
104
+The next step is to run the `ec2-bundle-image` command to create an instance store-backed Linux AMI from the Photon OS image that you extracted in the previous step. The result of the `ec2-bundle-image` command is a manifest that describes the machine in an XML file. 
105
+
106
+The command uses the certificate path to your PEM-encoded RSA public key certificate file; the path to your PEM-encoded RSA private key file; your EC2 user account ID; the correct architecture for Photon OS; the path to the Photon OS AMI image extracted from its tar file; and the `bundled` directory from the previous step. 
107
+
108
+You must replace the values of the certificate path, the private key, and the user account with your own values.
109
+
110
+	$ ec2-bundle-image --cert certificate.pem --privatekey myprivatersakey.pem --user <EC2 account id>  --arch x86_64 --image photon-ami.raw --destination ./bundled/
111
+
112
+### Step 6: Put the Bundle in a Bucket
113
+
114
+Next, make an S3 bucket, replacing `<bucket-name>` with the name that you want. The command creates the bucket in the region specified in your Amazon configuration file, which should be the same region in which you are using your key pair file: 
115
+
116
+	$ aws s3 mb s3://<bucket-name>
117
+
118
+Now upload the bundle to the Amazon S3 cloud. The following command includes the path to the XML file containing the manifest for the Photon OS machine created during the previous step, though you might have to change the file name to match the version you have. The manifest file is typically located in the same directory as the bundle. 
119
+
120
+The command also includes the name of the Amazon S3 bucket in which the bundle is to be stored; your AWS access key ID; and your AWS secret access key.
121
+
122
+	$ ec2-upload-bundle --manifest ./bundled/photon-ami.manifest.xml --bucket <bucket-name> --access-key <Account Access Key> --secret-key <Account Secret key>
123
+
124
+### Step 7: Register the Image
125
+
126
+The final step in creating an AMI before you can launch it is to register it. The following command includes a name for the AMI, its architecture, and its virtualization type. The virtualization type for Photon OS is `hvm`.
127
+
128
+	$ ec2-register <bucket-name>/photon-ami.manifest.xml --name photon-ami --architecture x86_64 --virtualization-type hvm
129
+
130
+Once registered, you can launch as many new instances as you want.
131
+
132
+### Step 8: Run an Instance of the Image with Cloud-Init
133
+
134
+Now things get a little tricky. In the following command, the `user-data-file` option instructs cloud-init to import the cloud-config data in `user-data.txt`.  
135
+
136
+The command also includes the ID of the AMI, which you can obtain by running `ec2-describe-images`; the instance type of `m3.medium`, which is a general purpose instance type; and the name of key pair, which should be replaced with your own--otherwise, you won't be able to connect to the instance. 
137
+
138
+Before you run the command, change directories to the directory containing the `mykeypair` file and add the path to the `user-data.txt`. 
139
+
140
+	$ ec2-run-instances <ami-ID> --instance-type m3.medium -g photon-sg --key mykeypair --user-data-file user-data.txt
141
+
142
+Here are the contents of the `user-data.txt` file that cloud-init applies to the machine the first time it boots up in the cloud.  
143
+
144
+	#cloud-config
145
+	hostname: photon-on-01
146
+	groups:
147
+	- cloud-admins
148
+	- cloud-users
149
+	users:
150
+	- default
151
+	- name: photonadmin
152
+	   gecos: photon test admin user
153
+	   primary-group: cloud-admins
154
+	   groups: cloud-users
155
+	   lock-passwd: false
156
+	   passwd: vmware
157
+	- name: photonuser
158
+	   gecos: photon test user
159
+	   primary-group: cloud-users
160
+	   groups: users
161
+	   passwd: vmware
162
+	packages:
163
+	- vim
164
+
165
+### Step 9: Get the IP Address of Your Image
166
+
167
+Now run the following command to check on the state of the instance that you launched: 
168
+
169
+	$ ec2-describe-instances
170
+
171
+Finally, you can obtain the external IP address of the instance by running the following query: 
172
+
173
+	$ aws ec2 describe-instances --instance-ids <instance-id> --query 'Reservations[*].Instances[*].PublicIpAddress' --output=text
174
+
175
+If need be, check the cloud-init output log file on EC2 at `/var/log/cloud-init-output.log` to see how EC2 handled the settings in the cloud-init data file. 
176
+
177
+For more information on using cloud-init user data on EC2, see [Running Commands on Your Linux Instance at Launch](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html).
178
+
179
+## Deploy a Containerized Application in Photon OS
180
+
181
+This section shows you how to connect to the Photon instance by using SSH and to launch a web server by running it in Docker.
182
+
183
+### Step 1: Connect with SSH
184
+
185
+Connect to the instance over SSH by specifying the private key (.pem) file and the user name for the Photon machine, which is `root`:
186
+
187
+	ssh -i ~/.ssh/mykeypair root@<public-ip-address-of-instance>
188
+
189
+For complete instructions, see [Connecting to Your Linux Instance Using SSH](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AccessingInstancesLinux.html). 
190
+
191
+### Step 2: Run Docker
192
+
193
+On the minimal version of Photon OS, the docker engine is enabled and running by default, which you can see by running the following command: 
194
+
195
+	systemctl status docker
196
+
197
+### Step 3: Start the Web Server
198
+
199
+**Note**: Please make sure that the proper security policies have been enabled on the Amazon AWS side to enable traffic to port 80 on the VM. 
200
+
201
+Since Docker is running, you can run an application in a container--for example, the Nginx Web Server. This example uses the popular open source web server Nginx. The Nginx application has a customized VMware package that the Docker engine can download directly from the Docker Hub.
202
+
203
+To pull Nginx from its Docker Hub and start it, run the following command: 
204
+
205
+	docker run -p 80:80 vmwarecna/nginx
206
+
207
+The Nginx web server should be bound to the public DNS value for  the instance of Photon OS--that is, the same address with which you connected over SSH. 
208
+
209
+### Step 4: Test the Web Server
210
+
211
+On your local workstation, open a web browser and go to the the public address of the Photon OS instance running Docker. The following screen should appear, showing that the web server is active:
212
+
213
+![Nginx](images/Nginx.jpg)
214
+
215
+When you're done, halt the Docker container by typing `Ctrl+c` in the SSH console where you are connected to EC2. 
216
+
217
+You can now run other containerized applications from the Docker Hub or your own containerized application on Photon OS in the Amazon cloud. 
218
+
219
+## Launching the Web Server with Cloud-Init
220
+
221
+To eliminate the manual effort of running Docker, you can add `docker run` and its arguments to the cloud-init user data file by using `runcmd`: 
222
+
223
+	#cloud-config
224
+	hostname: photon-on-01
225
+	groups:
226
+	- cloud-admins
227
+	- cloud-users
228
+	users:
229
+	- default
230
+	- name: photonadmin
231
+	   gecos: photon test admin user
232
+	   primary-group: cloud-admins
233
+	   groups: cloud-users
234
+	   lock-passwd: false
235
+	   passwd: vmware
236
+	- name: photonuser
237
+	   gecos: photon test user
238
+	   primary-group: cloud-users
239
+	   groups: users
240
+	   passwd: vmware
241
+	packages:
242
+	- vim
243
+	runcmd:
244
+	- docker run -p 80:80 vmwarecna/nginx
245
+
246
+To try this addition, you'll have to run another instance with this new cloud-init data source and then get the instance's public IP address to check that the Nginx web server is running. 
247
+
248
+## Terminating the AMI Instance
249
+
250
+Because Amazon charges you while the instance is running, make sure to shut it down when you're done.  
251
+
252
+First, get the ID of the AMI so you can terminate it: 
253
+
254
+	$ ec2-describe-instances
255
+
256
+Finally, terminate the Photon OS instance by running the following command, replacing the placeholder with the ID that the `ec2-describe-images` command returned. If you ran a second instance of Photon OS with the cloud-init file that runs docker, terminate that instance, too. 
257
+
258
+	$ ec2-terminate-instances <instance-id>
259
+
260
+
261
+
0 262
new file mode 100644
... ...
@@ -0,0 +1,117 @@
0
+# Running Photon OS on Google Compute Engine
1
+
2
+This guide describes how to get started using Photon OS as a virtual machine on Google Compute Engine (GCE). Once Photon OS is installed as an image on GCE, this document shows how to deploy a containerized application in Docker with a single command.
3
+
4
+- [About Photon OS](#about-photon-os)
5
+- [Prerequisites for Photon OS on GCE](#prerequisites-for-photon-os-on-gce)
6
+- [Downloading Photon OS](#downloading-photon-os)
7
+- [Installing Photon OS on Google Compute Engine](#installing-photon-os-on-google-compute-engine)
8
+- [Deploying a Containerized Application in Photon OS](#deploying-a-containerized-application-in-photon-os)
9
+
10
+## About Photon OS
11
+
12
+Photon OS™ is an open source Linux container host optimized for cloud-native applications, cloud platforms, and VMware infrastructure. Photon OS provides a secure run-time environment for efficiently running containers. For an overview, see  [https://vmware.github.io/photon/](https://vmware.github.io/photon/).
13
+
14
+## Prerequisites for Photon OS on GCE
15
+
16
+Using Photon OS on Google Compute Engine requires the following resources:
17
+
18
+* An account on Google Compute Engine
19
+* The Google Cloud SDK
20
+* The Photon OS image for GCE
21
+
22
+Keep in mind that, if you try the examples in this document, Google will charge your account for the cloud services that you use. The GCE-ready version of Photon OS, however, comes for free.
23
+
24
+## Downloading Photon OS
25
+
26
+VMware recommends that administrators use the Photon OS image for Google Compute Engine (GCE) to create Photon OS instances on GCE. Although earlier releases of Photon OS required heavy modification of the Photon instance to make the image compatible with GCE, Photon OS 1.0 comes with pre-modified images for popular cloud providers, including GCE.
27
+
28
+You can download the Photon OS image for GCE from the following URL:
29
+
30
+[https://bintray.com/vmware/photon](https://bintray.com/vmware/photon)
31
+
32
+For instructions, see [Downloading Photon OS](Downloading-Photon-OS.md).
33
+
34
+## Installing Photon OS on Google Compute Engine
35
+
36
+After you download the Photon OS image for GCE, log into GCE and complete the following steps.
37
+
38
+### Step 1: Create a New Bucket
39
+
40
+Create a new bucket to store your Photon OS image for GCE.
41
+
42
+![gce1](images/gce1.jpg)
43
+
44
+### Step 2: Upload the Photon OS Image
45
+
46
+Once you’ve created the bucket, you’re ready to upload the Photon OS image. While viewing the bucket that you’ve created, click the `Upload files` button, navigate to your Photon OS image and click the `Choose` button. 
47
+
48
+As the image below shows, when the upload finishes, you should see your Photon OS compressed image in the file list for the bucket that you created.
49
+
50
+![gce2](images/gce2.jpg)
51
+
52
+### Step 3: Create a New Image
53
+
54
+Next, you need to create a new image. Click on `Images` in the `Compute` category in the left panel; then, click on the `New Image` button. 
55
+
56
+Enter a name for the image in the `Name` field and change the `Source` to `Cloud Storage file` using the pull-down menu. Then, in the `Cloud Storage file` field, enter the bucket name and filename as the path to the Photon OS image for GCE. In this example, where the bucket was named `photon_storage,` the path is as follows:
57
+ 
58
+	photon_storage/photon-gce-2.0-tar.gz
59
+
60
+*Note: The new image form will autopopulate the `gs://` file path prefix.*
61
+
62
+After you’re finished completing the name and Cloud Storage object path, click the `Create` button to create your image. You should be returned to your Images catalog and your Photon OS image should be at the top of the list. 
63
+
64
+### Step 4: Create a New Instance
65
+
66
+To create an instance, check the box next to the Photon OS image and click the `Create Instance` button. 
67
+
68
+On the `Create a new instance` form, provide a name for this instance, confirm the zone into which this instance is to be deployed and, before clicking `Create,` place a check in the boxes for `Allow HTTP traffic` and `Allow HTTPS traffic.` 
69
+
70
+Outside of this demo, your application may or may not require these firewall rules. Please choose accordingly outside of this demo. However, since we will demonstrate a running web server container, we want these ports to be open for our instance. 
71
+
72
+![gce4](images/gce4.jpg)
73
+
74
+When the instance is created you will be returned to your list of VM instances. If you click on the instance, the status page for the instance will allow you to SSH into your Photon OS environment using the SSH button at the top of the panel. 
75
+
76
+At this point, your instance is running and you are ready to start the Docker engine and run a container workload.
77
+
78
+## Deploying a Containerized Application in Photon OS
79
+
80
+Now that you have your container runtime environment up and running, you can easily deploy a containerized application. For this example, you will deploy the popular open source Web Server Nginx. The Nginx application has a customized VMware package that is published as a dockerfile and can be downloaded directly through the Docker module from the Docker Hub.
81
+
82
+### Step 1: Run Docker
83
+
84
+To run Docker from the command prompt, enter the command below to initialize the Docker engine:
85
+
86
+    systemctl start docker
87
+
88
+To ensure Docker daemon service runs on every subsequent VM reboot, enter:
89
+ 
90
+    systemctl enable docker
91
+
92
+### Step 2: Run the Nginx Web Server
93
+
94
+Now that the Docker daemon service is running, it is a simple task to pull and then start the Nginx Web Server container from Docker Hub.  To do this, type the following command:
95
+ 
96
+    docker run -d -p 80:80 vmwarecna/nginx
97
+
98
+This command pulls the Nginx Web Server files and the dependent containers to ensure this containerized application can run.  You will see a screenshot similar to the one below, as the container and dependencies are downloaded and the container is prepared to run:
99
+
100
+![gce5](images/gce5.jpg)
101
+
102
+Once the `docker run` process is completed, you will be returned to the command prompt.  You now have a fully active website up and running through typing just a single command within Photon OS using containers.
103
+
104
+### Step 3: Test the Web Server
105
+
106
+**Note** : Please make sure that the proper security policies have been enabled on the Google GCE side to enable traffic to port 80 on the VM.
107
+
108
+To test that your web server is active, we need to get the IP address of the Photon OS virtual machine. To get the IP address, enter the following command:
109
+
110
+This command displays a list of network adapters connected to the virtual machine. Typically, the web server daemon will be bound to `eth0;` record the IP address associated with `eth0.` Alternatively, visit the status page of your Photon OS instance in GCE where the IP address is listed under `External IP.`
111
+
112
+Start a browser on your host machine and enter the IP address of your Photon OS virtual machine. The following screen should appear, showing that your web server is active:
113
+
114
+![gce6](images/gce6.jpg)
115
+
116
+You can now run any other containerized application from Docker Hub or your own containerized application within Photon OS.
0 117
new file mode 100644
... ...
@@ -0,0 +1,247 @@
0
+# Running Photon OS on Microsoft Azure
1
+
2
+Photon OS can serve as a run-time environment for Linux containers on Microsoft Azure. This topic describes how to set up and run the cloud-ready version of Photon OS as an instance of a virtual machine in the Azure cloud. Once running, Docker can run a containerized application in the Photon OS instance.
3
+
4
+**Note:** These instructions apply to Photon OS 2.0. There is no Photon OS 1.0 distribution image for Microsoft Azure.
5
+
6
+- [About Photon OS](#about-photon-os)
7
+- [Prerequisites](#prerequisites)
8
+- [Downloading and Extracting the Photon OS VHD File](#downloading-and-extracting-the-photon-os-vhd-file)
9
+- [Setting Up Azure Storage and Uploading the VHD](#setting-up-azure-storage-and-uploading-the-vhd)
10
+- [Deploying a Containerized Application in Photon OS](#deploying-a-containerized-application-in-photon-os)
11
+
12
+# About Photon OS
13
+
14
+Photon OS™ is an open source Linux container host optimized for cloud-native applications, cloud platforms, and VMware infrastructure. Photon OS provides a secure run-time environment for efficiently running containers. For an overview, see  [https://vmware.github.io/photon/](https://vmware.github.io/photon/).
15
+
16
+# Prerequisites
17
+
18
+- Microsoft Azure account ([sign up](https://azure.microsoft.com) if you don&#39;t already have one)
19
+- Azure CLI 2.0 (install the latest version) - see  [Install Azure CLI 2.0](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest) and  [Get started with Azure CLI 2.0](https://docs.microsoft.com/en-us/cli/azure/get-started-with-azure-cli?view=azure-cli-latest).
20
+- Pair of SSH public / private keys
21
+
22
+# Downloading and Extracting the Photon OS VHD File
23
+
24
+VMware packages Photon OS as a cloud-ready virtual hard disk (VHD file) that you can download for free from  [Bintray](https://bintray.com/vmware/photon). This VHD file is a virtual appliance with the information and packages that Azure needs to launch an instance of Photon in the cloud. After you have downloaded the distribution archive, extract the VHD file from it. You will later need to upload this VHD file to Azure, where it will be stored in an Azure storage account. For download instructions, see [Downloading Photon OS](Downloading-Photon-OS.md).
25
+
26
+# Setting Up Azure Storage and Uploading the VHD
27
+
28
+You can use either the Azure Portal or the Azure CLI to set up your Azure storage space, upload the Photon OS VHD file, and create the Photon OS VM.
29
+
30
+## Setting Up Using the Azure Portal
31
+
32
+You can use the Azure portal to set up Photon OS 2.0 in the Azure cloud. The following instructions are brief. Refer to the Azure documentation for details.
33
+
34
+1. Log in to the Azure portal at  [http://portal.azure.com](http://portal.azure.com/).
35
+2. Create a resource group. In the toolbar, choose Resource Groups, click **+Add** , fill in the resource group fields, and choose **Create**.
36
+3. Create a storage account. In the toolbar, choose Storage Accounts, click **+Add** , fill in the storage account fields (and the resource group you just created), and choose **Create**.
37
+4. Select the storage account.
38
+5. Scroll down the storage account control bar, click Containers (below BLOB SERVICE), click **+Container** , fill in the container fields, and choose **Create**.
39
+6. Select the container you just created.
40
+7. Click **Upload** and upload the Photon OS VHD image file to this container.
41
+8. Once the VHD file is uploaded, refer to the Azure documentation for instructions on how to create and manage your Photon OS VM.
42
+
43
+## Setting Up Using the Azure CLI
44
+
45
+You can use the Azure CLI 2.0 to set up Photon OS. You must first  [Install Azure CLI 2.0](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest).
46
+
47
+**Note:**  Except where overridden with parameter values, these commands create objects with default settings.
48
+
49
+### Step 1: Create a Resource Group
50
+
51
+From the Azure CLI, create a resource group.
52
+````
53
+az group create \
54
+ --name &lt;your_resource_group&gt; \
55
+ --location westus
56
+````
57
+
58
+### Step 2: Create a Storage Account
59
+
60
+Create a storage account associated with this resource group.
61
+````
62
+az storage account create \
63
+    --resource-group &lt;your_resource_group&gt; \
64
+    --location westus \
65
+    --name &lt;your_account_name&gt; \
66
+    --kind Storage \
67
+    --sku Standard_LRS
68
+````
69
+### Step 3: List the Keys for the Storage Account
70
+
71
+Retrieve the keys associated with your newly created storage account.
72
+````
73
+az storage account keys list \
74
+    --resource-group &lt;your_resource_group&gt; \
75
+    --account-name &lt;your_account_name&gt;
76
+````
77
+### Step 4: Create the Storage Container
78
+
79
+Create a storage container associated with your newly created storage account.
80
+
81
+**Note:** The sample create.sh script, described below, does this for you programmatically.
82
+````
83
+az storage container create \
84
+    --account-name &lt;your_account_name&gt; \
85
+    --name &lt;your_container_name&gt;
86
+````
87
+### Step 5: Verify Your Setup in the Azure Portal
88
+
89
+1. Log into the Azure portal using your account credentials.
90
+2. From the left toolbar, click **Storage Accounts**. You should see your storage accounts.
91
+3. Select the storage account.
92
+4. Scroll down the storage account control bar and click **Containers** (below BLOB SERVICE). You should see the container you created.
93
+
94
+### Step 6: Upload the Photon OS Distribution to Your Storage Container
95
+
96
+The Photon OS distribution for Azure is 16GB. You can download it locally or to a mounted, shared location.
97
+````
98
+az storage blob upload \
99
+    --account-name &lt;your_account_name&gt; \
100
+    --account-key &lt;your_account_key&gt; \
101
+    --container-name &lt;your_container_name&gt; \
102
+    --type page \
103
+    --file &lt;vhd_path&gt; \
104
+    --name &lt;vm_name&gt;.vhd
105
+````
106
+### Example Setup Script
107
+
108
+You can use the following script (create.sh) to upload your VHD file programmatically and create the VM. Before you run it, specify the following settings:
109
+
110
+- resource_group name
111
+- account_name
112
+- account_key (public or private)
113
+- container_name
114
+- public_key_file
115
+- vhd_path and and vm_name of the Photon OS VHD distribution file
116
+
117
+This script returns the complete IP address of the newly created VM.
118
+````
119
+#!/bin/bash
120
+vhd_path=$1
121
+vm_name=$2
122
+export PATH=$PATH:/root/azure_new/bin/az
123
+echo PATH=$PATH
124
+resource_group=&quot;&quot;
125
+account_name=&quot;&quot;
126
+account_key=&quot;&quot;
127
+container_name=&quot;mydisks&quot;
128
+url=&quot;https://${account_name}.blob.core.windows.net/${container_name}/${vm_name}.vhd&quot;
129
+public_key_file=&quot;/root/azure_new/jenkins.pub&quot;
130
+echo &quot;########################&quot;
131
+echo &quot;#   Create container   #&quot;
132
+echo &quot;########################&quot;
133
+/root/azure_new/bin/az storage container create --account-name ${account_name} --name ${container_name}
134
+echo &quot;##################&quot;
135
+echo &quot;#   Upload vhd   #&quot;
136
+echo &quot;##################&quot;
137
+/root/azure_new/bin/az storage blob upload --account-name ${account_name} \
138
+    --account-key ${account_key} \
139
+    --container-name ${container_name} \
140
+    --type page \
141
+    --file ${vhd_path} \
142
+    --name ${vm_name}.vhd
143
+echo &quot;##################&quot;
144
+echo &quot;#   Create vm    #&quot;
145
+echo &quot;##################&quot;
146
+echo &quot;az vm create --resource-group ${resource_group} --location westus --name ${vm_name} --storage-account ${account_name} --os-type linux --admin-username michellew --ssh-key-value ${public_key_file} --image ${url} --use-unmanaged-disk ... ...&quot;
147
+/root/azure_new/bin/az vm create --resource-group ${resource_group} --location westus --name ${vm_name} --storage-account ${account_name} --os-type linux --admin-username michellew --ssh-key-value ${public_key_file} --image ${url} --use-unmanaged-disk
148
+````
149
+### Removing Photon OS from Azure
150
+
151
+You can use the following delete.sh script to programmatically (and silently) remove the VM instance, VHD file, and container.
152
+
153
+**Note:**  Consider deleting idle VMs so that you are not charged when not in use.
154
+
155
+Before you run it, specify the following settings:
156
+
157
+- resource_group name (from step 1, above)
158
+- account_name (from step 2, above)
159
+- account_key (public or private) (from step 3, above)
160
+- container_name (from step 4, above)
161
+- public_key_file
162
+- vm_name of the Photon OS VHD distribution file
163
+
164
+**delete.sh**
165
+
166
+````
167
+#!/bin/bash
168
+vm_name=$1
169
+resource_group=&quot;&quot;
170
+account_name=&quot;&quot;
171
+account_key=&quot;&quot;
172
+container_name=&quot;mydisks&quot;
173
+url=&quot;https://${account_name}.blob.core.windows.net/${container_name}/${vm_name}.vhd&quot;
174
+public_key_file=&quot;/root/azure_new/jenkins.pub&quot;
175
+exit_code=0
176
+echo &quot;##################&quot;
177
+echo &quot;#   Delete vm    #&quot;
178
+echo &quot;##################&quot;
179
+echo &quot;az vm list  --resource-group ${resource_group} ... ...&quot;
180
+/root/azure_new/bin/az vm list  --resource-group ${resource_group}
181
+echo &quot;az vm delete --resource-group ${resource_group} --name ${vm_name} --yes ... ...&quot;
182
+/root/azure_new/bin/az vm delete --resource-group ${resource_group} --name ${vm_name} --yes
183
+if [$? -ne 0];then
184
+   exit_code=1
185
+fi
186
+echo &quot;az vm list  --resource-group ${resource_group} ... ...&quot;
187
+/root/azure_new/bin/az vm list  --resource-group ${resource_group}
188
+echo &quot;##############$####&quot;
189
+echo &quot;#   Delete vhd    #&quot;
190
+echo &quot;###############$###&quot;
191
+echo &quot;az storage blob list --account-name ${account_name} --container-name ${container_name} ... ...&quot;
192
+/root/azure_new/bin/az storage blob list --account-name ${account_name} --container-name ${container_name}
193
+echo &quot;az storage blob delete --account-name ${account_name} --container-name ${container_name} --name ${vm_name}.vhd ... ...&quot;
194
+/root/azure_new/bin/az storage blob delete --account-name ${account_name} --container-name ${container_name} --name ${vm_name}.vhd
195
+if [$? -ne 0];then
196
+   exit_code=1
197
+fi
198
+echo &quot;az storage blob list --account-name ${account_name} --container-name ${container_name} ... ...&quot;
199
+/root/azure_new/bin/az storage blob list --account-name ${account_name} --container-name ${container_name}
200
+echo &quot;########################&quot;
201
+echo &quot;#   Delete container   #&quot;
202
+echo &quot;########################&quot;
203
+/root/azure_new/bin/az storage container delete --account-name ${account_name} --name ${container_name}
204
+/root/azure_new/bin/az storage container delete --account-name ${account_name} --name vhds
205
+exit ${exit_code}
206
+````
207
+
208
+## Deploying a Containerized Application in Photon OS
209
+
210
+Now that you have your container runtime environment up and running, you can easily deploy a containerized application. For this example, you will deploy the popular open source Web Server Nginx. The Nginx application has a customized VMware package that is published as a dockerfile and can be downloaded, directly, through the Docker module from the Docker Hub.
211
+
212
+### Step 1: Run Docker
213
+
214
+To run Docker from the command prompt, enter the following command, which initializes the docker engine:
215
+````
216
+systemctl start docker
217
+````
218
+To ensure Docker daemon service runs on every subsequent VM reboot, enter the following command:
219
+````
220
+systemctl enable docker
221
+````
222
+### Step 2: Run the Nginx Web Server
223
+
224
+Now the Docker daemon service is running, it is a simple task to &quot;pull&quot; and start the Nginx Web Server container from Docker Hub. To do this, type the following command:
225
+````
226
+docker run -d -p 80:80 vmwarecna/nginx
227
+````
228
+
229
+This pulls the Nginx Web Server files and appropriate dependent container filesystem layers required for this containerized application to run.
230
+
231
+![Azure docker run](images/azure-docker-run.png)
232
+
233
+After the "docker run" process completes, you return to the command prompt. You now have a fully active website up and running in a container.
234
+
235
+### Step 3: Test the Web Server
236
+
237
+**Note** : Please make sure that the proper security policies have been enabled on the Microsoft Azure side to enable traffic to port 80 on the VM.
238
+
239
+To test that your Web Server is active:
240
+
241
+1. Run the ifconfig command to get the IP address of the Photon OS Virtual Machine.
242
+The output displays a list of adapters that are connected to the virtual machine. Typically, the web server daemon will be bound on "eth0."
243
+2. Start a browser on your host machine and enter the IP address of your Photon OS Virtual Machine.
244
+3. You should see a screen confirming that the nginx web server is successfully installed and working.
245
+
246
+You can now run any other containerized application from Docker Hub or your own containerized application within Photon OS.
0 247
new file mode 100644
... ...
@@ -0,0 +1,359 @@
0
+# Running Photon OS on Workstation 
1
+
2
+This guide describes how to get started using Photon OS as a virtual machine within VMware Workstation. It provides instructions for downloading Photon OS (as an OVA or ISO file), describes the various installation options, and walks through the steps of installing the Photon OS distribution on Workstation. Once Photon OS is installed, this document shows how to deploy a containerized application in Docker with a single command.
3
+
4
+- [About Photon OS](#about-photon-os)
5
+- [Requirements](#requirements)
6
+- [Deciding Whether to Use OVA or ISO](#deciding-whether-to-use-ova-or-iso)
7
+- [Downloading Photon OS](#downloading-photon-os)
8
+- [Importing the OVA for Photon OS 2.0](#importing-the-ova-for-photon-os-20)
9
+- [Installing the ISO Image for Photon OS 2.0](#installing-the-iso-image-for-photon-os-20)
10
+- [Deploying a Containerized Application in Photon OS](#deploying-a-containerized-application-in-photon-os)
11
+- [Installing Photon OS 1.0](#installing-photon-os-10)
12
+
13
+**Note**: If you want to upgrade an existing Photon 1.0 VM, refer to the instructions in [Upgrading to Photon OS 2.0](Upgrading-to-Photon-OS-2.0.md). 
14
+
15
+# About Photon OS
16
+
17
+Photon OS™ is an open source Linux container host optimized for cloud-native applications, cloud platforms, and VMware infrastructure. Photon OS provides a secure run-time environment for efficiently running containers. For an overview, see  [https://vmware.github.io/photon/](https://vmware.github.io/photon/).
18
+
19
+# Requirements
20
+
21
+Using Photon OS within VMware Workstation requires the following resources:
22
+
23
+| **Resource** | **Description** |
24
+| --- | --- |
25
+| VMware Workstation | VMware Workstation must be installed (Workstation 10 or higher). The latest version is recommended. |
26
+| Memory | 2GB of free RAM (recommended) |
27
+| Storage | **Minimal Photon install** : 512MB of free space (minimum); **Full Photon install** : 4GB of free space (minimum); 8GB is recommended |
28
+| Distribution File | Photon OS ISO or OVA file downloaded from bintray ([https://bintray.com/vmware/photon/](https://bintray.com/vmware/photon/)).
29
+
30
+Resource requirements and recommendations vary depending on several factors, including the host environment (for example, VMware Workstation and VMware vSphere), the distribution file used (ISO or OVA), and the selected installation settings (for example, full or basic installation).
31
+
32
+**Note:**  The setup instructions in this guide use VMware Workstation Professional version 12.5.7.
33
+
34
+![Workstation version](images/ws_version.png)
35
+
36
+# Deciding Whether to Use OVA or ISO
37
+
38
+The first step is decide whether to use the the OVA or ISO distribution to set up Photon OS.
39
+
40
+- **OVA import** : Because of the nature of an OVA, you're getting a pre-installed version of Photon OS. For Workstation, choose the OVA with Hardware Version 11 (_not_ 13). The OVA benefits from a simple import process and some kernel tuning for VMware environments. However, because it's a pre-installed version, the set of packages that are installed are predetermined. Any additional packages that you need can be installed using tdnf.
41
+- **ISO install** : The ISO, on the other hand, allows for a more complete installation or automated installation via kickstart.
42
+
43
+If you're just looking for the fastest way to get up and running, start with the OVA.
44
+
45
+# Downloading Photon OS
46
+
47
+Once you've decided which way to install, you'll need to download the correct binaries. Go to the following Bintray URL and download the latest release of Photon OS:
48
+
49
+[https://bintray.com/vmware/photon/](https://bintray.com/vmware/photon/)
50
+
51
+For instructions, see [Downloading Photon OS](Downloading-Photon-OS.md).
52
+
53
+# Importing the OVA for Photon OS 2.0
54
+
55
+Using the OVA is the easiest way to create a Photon OS VM on VMware Workstation.
56
+
57
+## Step 1: Start the Import Process
58
+
59
+After you've downloaded the OVA file (OVA with Hardware Version 11), do one of the following:
60
+
61
+- Double-click it to start the import process, or
62
+- Start VMware Workstation and, from the File menu, choose **Open**.
63
+
64
+![OVA file](images/ws-ova-import.png)
65
+
66
+## Step 2: Specify the Name and Storage Location
67
+
68
+Change the name and storage location, if you want.
69
+
70
+![Name and Storage Location](images/ws-ova-path.png)
71
+
72
+Choose **Import**.
73
+
74
+![License](images/ws-ova-license.png)
75
+
76
+Review the License Agreement and choose **Accept**.
77
+
78
+## Step 3: Configure VM Settings
79
+
80
+Once the OVA is imported, Workstation displays a summary of the settings for your Photon OS VM.
81
+
82
+![Settings](images/ws-ova-settings.png)
83
+
84
+Choose **Edit virtual machine settings**. Workstation displays the Virtual Machine settings. You can either accept the defaults or change settings as needed.
85
+
86
+![OVA settings](images/ws-ova-settings-edit.png)
87
+
88
+Select the Options tab.
89
+
90
+![Options](images/ws-ova-settings-options.png)
91
+
92
+Under Guest operating system, select **Linux**.
93
+
94
+For Version, click the list and select **VMWare Photon 64-bit**.
95
+
96
+![Version](images/ws-ova-os.png)
97
+
98
+**Note:**  If you want to configure a secure boot for the Photon OS VM, select **Advanced**  and select (check) **Boot with EFI instead of BIOS**. The EFI boot ensures that the ISO content is signed by VMware and that the entire stack is secure.
99
+
100
+![EFI boot](images/ws-ova-settings-efi.png)
101
+
102
+Choose **OK**.
103
+
104
+## Step 4: Power on the VM
105
+
106
+From the tab, choose  **Power on this virtual machine**.
107
+
108
+![OVA splash](images/ws-ova-splash.png)
109
+
110
+After the splash screen, Workstation will prompt you to log in.
111
+
112
+## Step 5: Update Login Credentials
113
+
114
+**Note** : Because of limitations within OVA support on Workstation, it was necessary to specify a default password for the OVA option. However, all Photon OS instances that are created by importing the OVA will require an immediate password change upon login. The default account credentials are:
115
+
116
+| **Setting** | **Value** |
117
+| --- | --- |
118
+| Username | ``root`` |
119
+| Password | ``changeme`` |
120
+
121
+After you provide these credentials, Workstation prompts you to create a new password and type it a second time to verify it. For security, Photon OS forbids common dictionary words for the root password. Once logged in, you will see the shell prompt.
122
+
123
+![OVA password](images/ws-ova-password.png)
124
+
125
+Once complete, proceed to [Deploying a Containerized Application in Photon OS](#deploying-a-containerized-application-in-photon-os).
126
+
127
+# Installing the ISO Image for Photon OS 2.0
128
+
129
+After you have downloaded the Photon OS ISO image into a folder of your choice, open VMware Workstation.
130
+
131
+## Step 1: Start the Installation Process
132
+
133
+From the File menu, choose **New Virtual Machine**  to create a new virtual machine.
134
+
135
+![New virtural machine](images/ws-iso-new.png)
136
+
137
+Select **Typical** or **Custom**, and then choose **Next**. These instructions refer to a Typical installation.
138
+
139
+![Typical installation](images/ws-iso-typical.png)
140
+
141
+## Step 2: Select the ISO Image
142
+
143
+Select **Installer disc image file (iso)**, choose **Browse** and select the Photon OS ISO file.
144
+
145
+![Photon ISO file](images/ws-iso-selected.png)
146
+
147
+## Step 3: Select the Operating System
148
+
149
+Choose **Next**. Select the Guest operating system.
150
+
151
+For the Guest operating system, select **Linux**.
152
+
153
+Click the Version dropdown and select **VMware Photon 64-bit**  from the list.
154
+
155
+![Operating System](images/ws-iso-os.png)
156
+
157
+## Step 4: Specify the VM Name and Location
158
+
159
+Choose **Next**. Specify a virtual machine name and location.
160
+
161
+![VM Name and Location](images/ws-iso-name.png)
162
+
163
+## Step 5: Specify Disk Options
164
+
165
+Choose **Next**. Specify the maximum disk size and whether you want to split the virtual disk into multiple files or store it as a single file.
166
+
167
+![Disk options](images/ws-iso-disk.png)
168
+
169
+## Step 6: Configure VM Settings
170
+
171
+Choose **Next**. Workstation displays a summary of your selections.
172
+
173
+![Workstation settings](images/ws-iso-summary.png)
174
+
175
+**Important** : _Before_ you finish creating the Photon OS Virtual Machine, we strongly recommend that you customize the virtual machine and remove any unwanted devices that are not needed for a container run-time environment. To remove unnecessary devices, choose **Customize hardware**.
176
+
177
+![Customize hardware](images/ws-iso-customize.png)
178
+
179
+Consider removing the following components, which are not used by Photon OS:
180
+
181
+- Select **Sound Card**, un-tick the **Connect at power on** option. Confirm your action and choose **Close** to return to the VM Settings by .
182
+- Select **USB Controller** and ensure that the **Share Bluetooth devices with the virtual machine** setting is unchecked (it should be unchecked, by default) and then choose **Close**.
183
+- Select **Display** and ensure that the **Accelerate 3D Graphics** option is unchecked (it should be unchecked, by default) and then choose **Close**.
184
+- At this stage we have now made all the necessary customizations and you are ready to select the Photon OS ISO image to boot and begin the installation process.
185
+- Choose  **Finish**.
186
+
187
+In Workstation, choose **Edit virtual machine settings**, select **CD/DVD (IDE)**, and verify that **Connect at power on** is selected.
188
+
189
+![CD/DVD](images/ws-iso-cd.png)
190
+
191
+## Step 7: Configure a Secure Boot (Optional)
192
+
193
+**Note:**  If you want to configure a secure boot for the Photon OS VM, in Workstation, choose  **Edit virtual machine settings**, select  **Options**, choose **Advanced**, and select **Boot with EFI instead of BIOS**.
194
+
195
+![Boot with EFI](images/ws-iso-efi.png)
196
+
197
+The EFI boot ensures that the ISO content is signed by VMware and that the entire stack is secure.
198
+
199
+Choose **OK**.
200
+
201
+![ISO settings](images/ws-iso-settings.png)
202
+
203
+## Step 8: Power On the VM
204
+
205
+Choose **Power on this virtual machine**.
206
+
207
+When you see the Photon Installer boot menu, press Enter on your keyboard to start installing.
208
+
209
+![Installer](images/ws-iso-installer.png)
210
+
211
+Review the license agreement.
212
+
213
+![License agreement](images/ws-iso-license.png)
214
+
215
+Choose **Accept** and press Enter.
216
+
217
+## Step 9: Configure the Partition
218
+
219
+The installer will detect one disk, which should be the 8GB volume configured as part of the virtual machine creation. Choose **Auto**  to have the installer automatically allocate the partition, or choose **Custom**  if you want to configure individual partitions, and then press the Enter key.
220
+
221
+![Partition](images/ws-iso-disk-partition.png)
222
+
223
+**Note:**  If you choose Custom, the installer displays the following screen.
224
+
225
+![Custom partition](images/ws-iso-disk-partition-custom.png)
226
+
227
+For each custom partition, choose **Create New**  and specify the following information:
228
+
229
+![New partition](images/ws-iso-disk-partition-new.png)
230
+
231
+**Size** - Preallocated size of this partition, in MB.
232
+
233
+**Type** - One of the following options:
234
+
235
+- **ext3** - ext3 file system
236
+- **ext4** - ext4 file system
237
+- **swap** - swap partition
238
+
239
+**Mountpoint** - Mount point for this partition.
240
+
241
+Choose **OK** and press the Enter key. When you are done defining custom partitions, choose **Next** and press the Enter key.
242
+
243
+The installer prompts you to confirm that you want to erase the entire disk. Choose  **Yes**  and press the Enter key.
244
+
245
+![Disk erase](images/ws-iso-disk-erase.png)
246
+
247
+## Step 10: Select an Installation Option
248
+
249
+After partitioning the disk, the installer will prompt you to select an installation option.
250
+
251
+![installation option](images/ws-iso-install-option.png)
252
+
253
+Each installation option provides a different run-time environment, depending on your requirements.
254
+
255
+| **Option** | **Description** |
256
+| --- | --- |
257
+| **Photon Minimal** | Photon Minimum is a very lightweight version of the container host runtime that is best suited for container management and hosting. There is sufficient packaging and functionality to allow most common operations around modifying existing containers, as well as being a highly performant and full-featured runtime. |
258
+| **Photon Full** | Photon Full includes several additional packages to enhance the authoring and packaging of containerized applications and/or system customization. For simply running containers, Photon Full will be overkill. Use Photon Full for developing and packaging the application that will be run as a container, as well as authoring the container, itself. For testing and validation purposes, Photon Full will include all components necessary to run containers. |
259
+| **Photon OSTree Server** | This installation profile will create the server instance that will host the filesystem tree and managed definitions for rpm-ostree managed hosts created with the "Photon OSTree Host" installation profile. Most environments should need only one Photon OSTree Server instance to manage the state of the Photon OSTree Hosts. Use Photon OSTree Server when you are establishing a new repository and management node for Photon OS hosts. |
260
+
261
+**Note:**  The option you choose determines the disk and memory resources required for your installation.
262
+
263
+Select the option you want and press the Enter key.
264
+
265
+## Step 11: Select the Linux Kernel
266
+
267
+Select a Linux kernel to install.
268
+
269
+![Kernel](images/ws-iso-kernel.png)
270
+
271
+- **Hypervisor optimized** means that any components that are not needed for running under a VMware hypervisor have been removed for faster boot times.
272
+- **Generic** means that all components are included.
273
+
274
+Choose **Next** and press the Enter key.
275
+
276
+## Step 12: Specify the Hostname
277
+
278
+The installer prompts you for a hostname and suggest a randomly generated, unique hostname that you can change if you want.
279
+
280
+![Hostname](images/ws-iso-hostname.png)
281
+
282
+Press the Enter key.
283
+
284
+## Step 13: Specify the System root Password
285
+
286
+**_Note_** _: Photon OS will not permit commonly used dictionary words to be set as a root password._
287
+
288
+The installer prompts you to enter the system root password. Type the password and press the Enter key.
289
+
290
+![Password](images/ws-iso-root-password.png)
291
+
292
+The installer prompts you to confirm the root password by typing it a second time.
293
+
294
+![Confirm password](images/ws-iso-root-password-confirm.png)
295
+
296
+Press the Enter key. The installer proceeds to install the software. Installation times will vary based on the system hardware and installation options you selected. Most installations complete in less than one minute.
297
+
298
+## Step 14: Reboot the VM and Log In
299
+
300
+Once finished, the installer displays a confirmation message (which includes how long it took to install Photon OS) and prompts you to press a key on your keyboard to boot the new VM.
301
+
302
+![confirmation message](images/ws-iso-installed.png)
303
+
304
+Press any key on the keyboard and the virtual machine will reboot into Photon OS.
305
+
306
+As the initial boot process begins, the installer displays the Photon splash screen, and then a login prompt.
307
+
308
+![Splash screen](images/ws-iso-splash.png)
309
+
310
+At the login prompt, type **root**  as the username and provide the password chosen during the installation.
311
+
312
+![Password](images/ws-iso-login.png)
313
+
314
+You have now successfully set up Photon OS and are ready to use your container run-time environment. Proceed to the next section to deploy a containerized application.
315
+
316
+# Deploying a Containerized Application in Photon OS
317
+
318
+Now that you have your container runtime environment up and running, you can easily deploy a containerized application. For this example, you will deploy the popular open source Web Server Nginx. The Nginx application has a customized VMware package that is published as a dockerfile and can be downloaded directly through the Docker module from the Docker Hub.
319
+
320
+## Step 1: Run Docker
321
+
322
+To run Docker from the command prompt, enter the following command, which initializes the docker engine:
323
+
324
+    systemctl start docker
325
+
326
+To ensure Docker daemon service runs on every subsequent VM reboot, enter the following command:
327
+
328
+    systemctl enable docker
329
+
330
+## Step 2: Run the Nginx Web Server
331
+
332
+Now the Docker daemon service is running, it is a simple task to "pull" and start the Nginx Web Server container from Docker Hub. To do this, type the following command:
333
+
334
+    docker run -d -p 80:80 vmwarecna/nginx
335
+
336
+This pulls the Nginx Web Server files and appropriate dependent container filesystem layers required for this containerized application to run.
337
+
338
+![Docker run](images/ws-docker-run.png)
339
+
340
+After the **docker run**  process completes, you return to the command prompt. You now have a fully active website up and running in a container.
341
+
342
+## Step 3: Test the Web Server
343
+
344
+To test that your Web Server is active, run the **ifconfig** command to get the IP address of the Photon OS Virtual Machine.
345
+
346
+![IP config](images/ws-docker-ifconfig.png)
347
+
348
+The output displays a list of adapters that are connected to the virtual machine. Typically, the web server daemon will be bound on "**eth0**".
349
+
350
+Start a browser on your host machine and enter the IP address of your Photon OS Virtual Machine (the **inet addr** for eth0). You should see a screen similar to the following example as confirmation that your web server is active.
351
+
352
+![Confirmation](images/ws-docker-confirm.png)
353
+
354
+You can now run any other containerized application from Docker Hub or your own containerized application within Photon OS.
355
+
356
+# Installing Photon OS 1.0
357
+
358
+Refer to the Photon OS 1.0 installation instructions in [Running Photon OS on Fusion](Running-Project-Photon-on-Fusion.md).
0 359
new file mode 100644
... ...
@@ -0,0 +1,503 @@
0
+# Running Photon OS on vSphere
1
+
2
+This guide describes how to get started using Photon OS as a virtual machine within VMware vSphere. It provides instructions for downloading Photon OS (as an OVA or ISO file), describes the various installation options, and walks through the steps of installing the Photon OS distribution on vSphere. Once Photon OS is installed, this document highlights how to deploy a containerized application in Docker with a single command.
3
+
4
+- [About Photon OS](#about-photon-os)
5
+- [Deciding Whether to Use OVA or ISO](#deciding-whether-to-use-ova-or-iso)
6
+- [Downloading Photon OS](#downloading-photon-os)
7
+- [Importing the OVA for Photon OS 2.0](#importing-the-ova-for-photon-os-20)
8
+- [Installing the ISO Image for Photon OS 2.0](#installing-the-iso-image-for-photon-os-20)
9
+- [Deploying a Containerized Application in Photon OS](#deploying-a-containerized-application-in-photon-os)
10
+- [Installing Photon OS v1.0](#installing-photon-os-10)
11
+
12
+**Note**: If you want to upgrade an existing Photon 1.0 VM, refer to the instructions in [Upgrading to Photon OS 2.0](Upgrading-to-Photon-OS-2.0.md). 
13
+
14
+## About Photon OS
15
+
16
+Photon OS™ is an open source Linux container host optimized for cloud-native applications, cloud platforms, and VMware infrastructure. Photon OS provides a secure run-time environment for efficiently running containers. For an overview, see  [https://vmware.github.io/photon/](https://vmware.github.io/photon/).
17
+
18
+## Requirements
19
+
20
+Using Photon OS within VMware vSphere requires the following resources:
21
+
22
+| **Resources** | **Description** |
23
+| --- | --- |
24
+| VMware vSphere installed | VMware web client (v6.5) for ESXi hosts (recommended) **Note:** vSphere 6 and vSphere 5.5 (these clients provide limited support; not all features are available). |
25
+| Memory | ESXi host with 2GB of free RAM (recommended) |
26
+| Storage | **Minimal Photon install** : ESXi host with at least 512MB of free space (minimum); **Full Photon install** : ESXi host with at least 4GB of free space (minimum); 16GB is recommended |
27
+| Distribution File | Photon OS ISO or OVA file downloaded from Bintray |
28
+
29
+Resource requirements and recommendations vary depending on several factors, including the host environment (for example, VMware vSphere and VMware Fusion), the distribution file used (ISO or OVA), and the selected installation settings (for example, full or basic installation).
30
+
31
+**Note:** The setup instructions in this guide use VMware vSphere 6 and the vSphere web client.
32
+
33
+## Deciding Whether to Use OVA or ISO
34
+
35
+The first step is decide whether to use the OVA or ISO distribution to set up Photon OS.
36
+
37
+- **OVA import** : Because of the nature of an OVA, you're getting a pre-installed version of Photon OS. You can choose the hardware version you want (OVA with hardware version 13 or 11). The OVA benefits from a simple import process and some kernel tuning for VMware environments. However, because it's a pre-installed version, the set of packages that are installed are predetermined. Any additional packages that you need can be installed using tdnf.
38
+- **ISO install** : The ISO, on the other hand, allows for a more complete installation or automated installation via kickstart.
39
+
40
+If you're just looking for the fastest way to get up and running, start with the OVA.
41
+
42
+## Downloading Photon OS
43
+
44
+Once you've decided which way to install, you'll need to download the correct binaries. Go to the following Bintray URL and download the latest release of Photon OS:
45
+
46
+[https://bintray.com/vmware/photon/](https://bintray.com/vmware/photon/)
47
+
48
+For instructions, see [Downloading Photon OS](Downloading-Photon-OS.md).
49
+
50
+**Note:** For ISO installation, you will need to upload to a datashare that is attached to the ESXi host, or mount the file share (where the ISO resides) as a data store.
51
+
52
+## Importing the OVA for Photon OS 2.0
53
+
54
+Using the OVA is a fast and easy way to create a Photon OS VM on VMware vSphere.
55
+
56
+After you've downloaded the OVA, log in to your vSphere environment.
57
+
58
+### Step 1: Start the Import Process
59
+
60
+From the Actions pull-down menu, choose **Create/Register VM**.
61
+
62
+![Create/Register VM](images/vs-ova-new-vm.png)
63
+
64
+In the Select creation type window, choose  **Deploy a virtual machine from an OVF or OVA file**.
65
+
66
+(images/vs-ova-new-vm-ova.png)
67
+
68
+Choose **Next**.
69
+
70
+### Step 2: Select the OVA File
71
+
72
+Enter a name for the virtual machine, and select the OVA file.
73
+
74
+![OVA file](images/vs-ova-name-selected.png)
75
+
76
+Choose **Next**.
77
+
78
+### Step 3: Specify the Target Datastore
79
+
80
+From the Select storage screen, select the target datastore for your VM.
81
+
82
+![Target datastore](images/vs-ova-storage.png)
83
+
84
+Choose  **Next**.
85
+
86
+### Step 4: Accept the License Agreement
87
+
88
+Read through the Photon OS License Agreement, and then choose **I Agree**.
89
+
90
+![License](images/vs-ova-license.png)
91
+
92
+Choose **Next**.
93
+
94
+### Step 5: Select Deployment Options
95
+
96
+Select deployment options.
97
+
98
+![Deployment Options](images/vs-ova-deployment-options.png)
99
+
100
+Photon OS is provisioned with a maximum disk size. By default, Photon OS uses only the portion of disk space that it needs, usually much less that the entire disk size ( **Thin** client). If you want to pre-allocate the entire disk size (reserving it entirely for Photon OS instead), select **Thick**  instead.
101
+
102
+Choose **Next**.
103
+
104
+### Step 6: Verify Deployment Settings
105
+
106
+Verify your deployment settings.
107
+
108
+![Deployment settings](images/vs-ova-settings.png)
109
+
110
+Click **Finish**. vSphere uploads and validates your OVA. Depending on bandwidth, this operation might take a while.
111
+
112
+When finished, vShield powers up a new VM based on your selections.
113
+
114
+### Step 7: Change Login Settings
115
+
116
+![Login settings](images/vs-ova-splash.png)
117
+
118
+After the VM is booted, open the command window. vSphere prompts you to log in.
119
+
120
+**Note**: Because of limitations within OVA support on vSphere, it was necessary to specify a default password for the OVA option. However, all Photon OS instances that are created by importing the OVA will require an immediate password change upon login. The default account credentials are:
121
+
122
+| **Setting** | **Value** |
123
+| --- | --- |
124
+| Username | ``root`` |
125
+| Password | ``changeme`` |
126
+
127
+After you provide these credentials, vSphere prompts you to create a new password and type it a second time to verify it.
128
+
129
+**Note:** For security, Photon OS forbids common dictionary words for the root password.  
130
+
131
+Once logged in, you will see the shell prompt.
132
+
133
+![Shell prompt](images/vs-ova-login.png)
134
+
135
+Once complete, proceed to [Deploying a Containerized Application in Photon OS](#deploying-a-containerized-application-in-photon-os).
136
+
137
+### Step 9: Export the VM as a Template (Optional)
138
+
139
+Consider converting this imported VM into a template (from the Actions menu, choose **Export** ) so that you have a master Photon OS instance that can be combined with vSphere Guest Customization to enable rapid provisioning of Photon OS instances.
140
+
141
+## Installing the ISO Image for Photon OS 2.0
142
+
143
+After you have downloaded the Photon OS ISO image into a folder of your choice, complete the following steps.
144
+
145
+### Step 1: Upload the ISO Image
146
+
147
+Upload the ISO image to a datastore that is attached to the host on which you'll create the Photon OS virtual machine.
148
+
149
+### Step 2: Create a New VM
150
+
151
+Log in to your vSphere environment. In the Virtual Machines window, choose **Create/Register VM**.
152
+
153
+On the Select creation type screen, select **Create a new virtual machine**.
154
+
155
+![Create new virtual machine](images/vs-iso-new.png)
156
+
157
+Choose **Next**.
158
+
159
+### Step 3: Configure VM Settings
160
+
161
+Specify a VM name.
162
+
163
+![VM name](images/vs-iso-name.png)
164
+
165
+Specify a guest operating system.
166
+
167
+- For Compatibility, select **ESXi 6.5**.
168
+- For Guest OS family, select **Linux**.
169
+- For Guest OS version, select **VMware Photon OS (64-bit)**.
170
+
171
+![Guest operating system](images/vs-iso-os.png)
172
+
173
+Choose  **Next**.
174
+
175
+### Step 4: Select the Target Datastore
176
+
177
+Select the datastore where you want to store the VM.
178
+
179
+![Target datastore](images/vs-iso-datastore.png)
180
+
181
+Click **Next**.
182
+
183
+### Step 5: Customize VM Settings
184
+
185
+Customize the virtual machine settings.
186
+
187
+![v](images/vs-iso-customize.png)
188
+
189
+For CD/DVD Drive 1, click the drop-down and select **Datastore ISO file**.
190
+
191
+In the Datastore browser, select the ISO that you want to import.
192
+
193
+Change other settings as applicable.
194
+
195
+- The recommended virtual hardware settings for your Photon VM are heavily dependent upon the container load you intend to run within Photon OS – more containers or more intensive containers will require you to adjust these settings for your application load. VMware suggests 2 vCPU, 1024MB memory, 20GB hard disk. Any unwanted devices should be removed. Be sure to mount the Photon OS ISO on the CD/DVD Drive and put a check in the box next to, Connect At Power On.
196
+- If you want to configure a secure boot for the Photon OS VM you created, choose the VM Options tab, expand Boot Options, and select EFI from the firmware drop-down.  An EFI boot ensures that the ISO content is signed by VMware and that the entire stack is secure.
197
+
198
+Choose **Next**.
199
+
200
+### Step 6: Verify VM Settings
201
+
202
+The installer displays a summary of your selected settings.
203
+
204
+![Summary](images/vs-iso-ready.png)
205
+
206
+Click **Finish**. vSphere creates the VM.
207
+
208
+### Step 7: Power on the VM
209
+
210
+Select the VM and power it on.
211
+
212
+![Power on VM](images/vs-iso-install.png)
213
+
214
+When you see the Photon Installer boot menu, press Enter on your keyboard to start installing.
215
+
216
+### Step 8: Accept the License Agreement
217
+
218
+Read the License Agreement and press the Enter key to accept.
219
+
220
+![License Agreement](images/vs-iso-license.png)
221
+
222
+### Step 9: Configure the Partition
223
+
224
+The installer will detect one disk, which should be the 16GB volume configured as part of the virtual machine creation. Choose **Auto**  to have the installer automatically allocate the partition, or choose **Custom**  if you want to configure individual partitions, and then press the Enter key.
225
+
226
+![Partition](images/vs-iso-partition.png)
227
+
228
+**Note:**  If you choose Custom, the installer displays the following screen.
229
+
230
+![Custom Partition](images/vs-iso-partition-custom.png)
231
+
232
+For each custom partition, choose **Create New**  and specify the following information:
233
+
234
+![New Partition](images/vs-iso-partition-new.png)
235
+
236
+**Size** - Preallocated size of this partition, in MB.
237
+
238
+**Type** - One of the following options:
239
+
240
+- **ext3** - ext3 file system
241
+- **ext4** - ext4 file system
242
+- **swap** - swap partition
243
+
244
+**Mountpoint** - Mount point for this partition.
245
+
246
+Choose **OK** and press the Enter key. When you are done defining custom partitions, choose **Next** and press the Enter key.
247
+
248
+The installer prompts you to confirm that you want to erase the entire disk.
249
+
250
+![Erase disk](images/vs-iso-erase.png)
251
+
252
+Choose **Yes** and press the Enter key.
253
+
254
+### Step 10: Select an Installation Option
255
+
256
+After partitioning the disk, the installer will prompt you to select an installation option.
257
+
258
+![Installation Option](images/vs-iso-install-option.png)
259
+
260
+Each install option provides a different run-time environment, depending on your requirements.
261
+
262
+| **Option** | **Description** |
263
+| --- | --- |
264
+| **Photon Minimal** | Photon Minimum is a very lightweight version of the container host runtime that is best suited for container management and hosting. There is sufficient packaging and functionality to allow most common operations around modifying existing containers, as well as being a highly performant and full-featured runtime. |
265
+| **Photon Full** | Photon Full includes several additional packages to enhance the authoring and packaging of containerized applications and/or system customization. For simply running containers, Photon Full will be overkill. Use Photon Full for developing and packaging the application that will be run as a container, as well as authoring the container, itself. For testing and validation purposes, Photon Full will include all components necessary to run containers. |
266
+| **Photon OSTree Server** | This installation profile will create the server instance that will host the filesystem tree and managed definitions for rpm-ostree managed hosts created with the "Photon OSTree Host" installation profile. Most environments should need only one Photon OSTree Server instance to manage the state of the Photon OSTree Hosts. Use Photon OSTree Server when you are establishing a new repository and management node for Photon OS hosts. |
267
+
268
+**Note:**  The option you choose determines the disk and memory resources required for your installation.
269
+
270
+Select the option you want and press the Enter key.
271
+
272
+### Step 11: Select the Linux Kernel
273
+
274
+Select a Linux kernel to install.
275
+
276
+![Linux Kernel](images/vs-iso-kernel.png)
277
+
278
+- **Hypervisor**  optimized means that any components that are not needed for running under a VMware hypervisor have been removed for faster boot times.
279
+- **Generic**  means that all components are included.
280
+
281
+Choose **Next** and press the Enter key.
282
+
283
+### Step 12: Specify the Hostname
284
+
285
+The installer prompts you for a hostname and suggest a randomly generated, unique hostname that you can change if you want.
286
+
287
+![Hostname](images/vs-iso-hostname.png)
288
+
289
+Press the Enter key.
290
+
291
+### Step 13: Specify the System root Password
292
+
293
+The installer prompts you to enter the system root password.
294
+
295
+_Note: Photon OS will not permit commonly used dictionary words to be set as a root password._
296
+
297
+![Root password](images/vs-iso-root-password.png)
298
+
299
+Type a password and press the Enter key.
300
+
301
+The installer prompts you to confirm your root password by typing it a second time.
302
+
303
+![Password confirmation](images/vs-iso-root-password-confirm.png)
304
+
305
+**Note:** If you have trouble with unintentional repeated characters in the Remote Console, follow VMware KB 196 ( [http://kb.vmware.com/kb/196](http://kb.vmware.com/kb/196)) for a setting to apply to the virtual machine.
306
+
307
+Press the Enter key. The installer proceeds to install the software. Installation times will vary based on the system hardware and installation options you selected. Most installations complete in less than one minute.
308
+
309
+### Step 14: Reboot the VM and Log In
310
+
311
+Once finished, the installer displays a confirmation message (which includes how long it took to install Photon OS) and prompts you to press a key on your keyboard to boot the new VM.
312
+
313
+![Boot VM](images/vs-iso-installed.png)
314
+
315
+As the initial boot process begins, the installer displays the Photon splash screen, and then a login prompt.
316
+
317
+![Login prompt](images/vs-iso-splash.png)
318
+
319
+At the login prompt, type **root**  as the username and provide the password chosen during the installation.
320
+
321
+![Password](images/vs-iso-login.png)
322
+
323
+You have now successfully setup Photon OS and are ready to use your container runtime environment. Proceed to the next section to deploy a containerized application.
324
+
325
+## Deploying a Containerized Application in Photon OS
326
+
327
+Now that you have your container runtime environment up and running, you can easily deploy a containerized application. For this example, you will deploy the popular open source Web Server Nginx. The Nginx application has a customized VMware package that is published as a dockerfile and can be downloaded, directly, through the Docker module from the Docker Hub.
328
+
329
+### Step 1: Run Docker
330
+
331
+To run Docker from the command prompt, enter the following command, which initializes the docker engine:
332
+
333
+    systemctl start docker
334
+
335
+To ensure Docker daemon service runs on every subsequent VM reboot, enter the following command:
336
+
337
+    systemctl enable docker
338
+
339
+### Step 2: Run the Nginx Web Server
340
+
341
+Now the Docker daemon service is running, it is a simple task to "pull" and start the Nginx Web Server container from Docker Hub. To do this, type the following command:
342
+
343
+    docker run -d -p 80:80 vmwarecna/nginx
344
+
345
+This pulls the Nginx Web Server files and appropriate dependent container filesystem layers required for this containerized application to run.
346
+
347
+![Docker run](images/vs-docker-run.png)
348
+
349
+After the **docker run**  process completes, you return to the command prompt. You now have a fully active website up and running in a container!
350
+
351
+### Step 3: Test the Web Server
352
+
353
+To test that your Web Server is active, run the ifconfig command to get the IP address of the Photon OS Virtual Machine.
354
+
355
+![IP address](images/vs-docker-ifconfig.png)
356
+
357
+The output displays a list of adapters that are connected to the virtual machine. Typically, the web server daemon will be bound on **eth0**.
358
+
359
+Start a browser on your host machine and enter the IP address of your Photon OS Virtual Machine. You should see a screen similar to the following example as confirmation that your web server is active.
360
+
361
+![Docker confirmation](images/vs-docker-confirm.png)
362
+
363
+You can now run any other containerized application from Docker Hub or your own containerized application within Photon OS.
364
+
365
+## Installing Photon OS v1.0
366
+
367
+This section provides installation instructions for Photon OS v1.0.
368
+
369
+### Photon OS 1.0 Prerequisites
370
+
371
+In order to install and start using Photon OS with VMware vSphere, the following pre-requisites must be satisfied: 
372
+
373
+* VMware vSphere 5.5 or VMware vSphere 6.0 installed 
374
+* ESXi host with recommended 2GB of free RAM
375
+* ESXi host with recommended 8GB of free disk space
376
+* The Photon OS ISO downloaded from Bintray
377
+
378
+This document uses VMware vSphere 6. VMware recommends that you use the latest version, though vSphere 5.5 or later should work as well. 
379
+
380
+### Importing the Photon OS 1.0 OVA
381
+
382
+Using the OVA is a fast and easy way to create a Photon OS VM. Once you’ve downloaded the OVA, log in to your vSphere environment and, from the `Actions` pull-down menu, select, `Deploy OVF Template …` On the popup window, point vSphere to the OVA file that you’ve downloaded. 
383
+
384
+![vsphere1](images/vsphere1.jpg)
385
+
386
+Click the `Next` button at the bottom of the window and vSphere will upload and validate your OVA. Depending on bandwidth, this operation might take a while. 
387
+
388
+After validating the image, vSphere will present a summary of the details of the OVA. Click the `Next` button to proceed to selecting a location to store the imported Photon OS instance.
389
+
390
+Click `Finish`
391
+
392
+At this point, you’ve got a Photon OS instance ready to go; but before you power on that Photon OS instance, consider first converting this VM into a template. By converting this imported VM to a template, you have a master Photon OS instance that can be combined with vSphere Guest Customization to enable rapid provisioning of Photon OS instances. 
393
+
394
+The OVA contains a default password of "changeme" for the root account that must be changed upon initial login. For security, Photon OS forbids common dictionary words for the root password.
395
+ 
396
+### Installing the Photon OS 1.0 ISO Image
397
+
398
+Once the ISO image has been uploaded to a datastore that is attached to the host on which you’ll create the Photon OS virtual machine, start the installation process by creating a new virtual machine.
399
+When creating a new VM, the first thing you’ll need to specify is the compatibility of that VM with ESXi versions. Select a compatibility level for your VM, as shown below. Photon OS shouldn’t require any particular compatibility, but VMware recommends that you choose the latest available option for your release of vSphere.
400
+
401
+![vsphere2](images/vsphere2.jpg)
402
+
403
+When prompted for the `Guest OS Family,` choose `Linux` and, for Guest OS Version, choose `Other 3.x Linux (64-bit)`. 
404
+
405
+![vsphere3](images/vsphere3.jpg)
406
+
407
+The recommended virtual hardware settings for your Photon VM are heavily dependent upon the container load you intend to run within Photon OS – more containers or more intensive containers will require you to adjust these settings for your application load. VMware suggests 2 vCPU, 1024MB memory, 20GB hard disk. Any unwanted devices should be removed.  Be sure to mount the Photon OS ISO on the CD/DVD Drive and put a check in the box next to, `Connect At Power On.`
408
+
409
+![vsphere4](images/vsphere4.jpg)
410
+
411
+To summarize, these are the settings we recommend as a starting point for your Photon OS container runtime host: Thin provisioned, hardware compatibility: ESXi 6.0 and later (VM version 11).
412
+
413
+Power on the Photon OS virtual machine and, within a few seconds, the Photon Installer Boot Menu will appear.  Download and install the Remote Console if you do not have it already; otherwise, click `Launch Remote Console` to interact with the installer.
414
+
415
+![vsphere5](images/vsphere5.jpg)
416
+
417
+Once connected to the remote console, select `Install` to proceed.
418
+
419
+![vsphere6](images/vsphere6.png)
420
+
421
+After you accept the EULA, the installer will detect one disk, which should be the 20GB volume configured as part of the virtual machine creation. Select the disk and press enter.  When you are prompted to confirm that it is okay to erase the entire disk, select `Yes` to accept and proceed with the installation.
422
+
423
+![vsphere7](images/vsphere7.jpg)
424
+
425
+You will now be presented with several installation options:
426
+
427
+![vsphere8](images/vsphere8.png)
428
+
429
+Each install option provides a different runtime environment:
430
+
431
+* Photon Minimal: Photon Minimum is a very lightweight version of the container host runtime that is best suited for container management and hosting. There is sufficient packaging and functionality to allow most common operations around modifying existing containers, as well as being a highly performant and full-featured runtime. 
432
+
433
+* Photon Full: Photon Full includes several additional packages to enhance the authoring and packaging of containerized applications and system customization. For simply running containers, Photon Full will be overkill. Use Photon Full for developing and packaging the application that will be run as a container, as well as authoring the container itself. For testing and validation purposes, Photon Full will include all components necessary to run containers. 
434
+
435
+* Photon OSTree Host: This installation profile creates a Photon OS instance that will source its packages from a central rpm-ostree server and continue to have the library and state of packages managed by the definition that is maintained on the central rpm-ostree server. Use Photon OStree Hosts when you are interested in experimenting with the concept of a centrally authored and maintained OS version. This concept of treating the OS as a versioned, atomic entity can simplify lifecycle management and security at scale. 
436
+
437
+* Photon OSTree Server: This installation profile will create the server instance that will host the filesystem tree and managed definitions for rpm-ostree managed hosts created with the Photon OSTree Host installation profile. Most environments should need only one Photon OSTree Server instance to manage the state of the Photon OSTree Hosts. Use Photon OSTree Server when you are establishing a new repository and management node for Photon OS hosts.  
438
+
439
+For the purposes of this how-to guide, select the option to install Photon Minimal. Once `Photon Minimal` is highlighted, press the Enter key on your keyboard.
440
+
441
+You will now be prompted for a hostname. Photon OS will prepopulate a randomly generated, unique hostname; you can either use this suggestion or enter your own hostname, as shown in the screenshot below:
442
+
443
+![vsphere9](images/vsphere9.jpg)
444
+
445
+After selecting a hostname and pressing Enter, you will be prompted to first type and, then, confirm the system root password. If you have trouble with unintentional repeated characters in the Remote Console, follow VMware KB 196 (http://kb.vmware.com/kb/196) for a setting to apply to the virtual machine.
446
+
447
+*Note: Photon OS will not permit commonly used dictionary words to be set as a root password.*
448
+
449
+After confirming the password, the installation process should begin.
450
+
451
+Installation times will vary based on system hardware and installation options, but most installations complete in less than a minute. Once the installation completes, press any key and the virtual machine will reboot into Photon OS.
452
+
453
+As the initial boot process begins, you will see the Photon splash screen before you are taken to a login prompt.
454
+
455
+At the login prompt, enter `root` as the username and provide the password chosen during the installation. 
456
+
457
+You have now successfully setup Photon OS and are ready to use your container runtime environment.
458
+ 
459
+### Installing a Containerized Application in Photon OS 1.0
460
+Now that you have your container runtime environment up and running, you may be wondering, “what can I do now?” A command prompt is not the most exciting thing. To help demonstrate the ease with which you can deploy a containerized application, this section showcases how you can quickly get a web server up and running.
461
+
462
+For this example, we will use the popular open source web server Nginx. The Nginx application has a customized VMware package  published as a dockerfile that can be downloaded directly in Docker from the Docker Hub.
463
+
464
+To run Docker from the command prompt, enter the command below to initialize the docker engine:
465
+
466
+`systemctl start docker`
467
+
468
+To ensure the docker daemon service runs on every subsequent VM reboot, enter:
469
+
470
+`systemctl enable docker`
471
+
472
+Now that the docker daemon service is running, it is a simple task to pull and start the Nginx Web Server container from Docker Hub.  To do this, enter the following command:
473
+
474
+`docker run -d -p 80:80 vmwarecna/nginx`
475
+
476
+This will then pull the Nginx Web Server files and appropriate dependent containers to ensure this containerized application can run.  You will see a screenshot similar to below, as the container and dependencies are downloaded and the container is prepared to run: 
477
+
478
+![vsphere12](images/vsphere12.jpg)
479
+
480
+Once the `docker run` process is completed, you will be returned to the command prompt.  You now have a fully active web server up and running through typing just a single command within Photon OS using containers.
481
+
482
+To test that your web server is active, we need to get the IP address of the Photon OS Virtual Machine. To get the IP address, enter the following command: 
483
+
484
+	ifconfig
485
+
486
+This will now display a list of adapters connected to the virtual machine.  Typically, the web server daemon will be bound to `eth0.`  
487
+
488
+Start a browser on your host machine and enter the IP address of your Photon OS Virtual Machine.  The following screen will appear showing that your web server is active:
489
+
490
+![vsphere13](images/vsphere13.jpg)
491
+
492
+You can now run any other containerized application from Docker Hub or your own containerized application within Photon OS.
493
+
494
+If you are having trouble viewing the screen that shows the web server is active, you might have to add an iptables rule to your container VM to allow traffic on Port 80:
495
+
496
+`iptables -I INPUT 1 -p tcp --dport 80 -j ACCEPT`
497
+
498
+In addition, you might have to modify /etc/httpd/httpd.conf to listen on Port 80 by adding the following line:  
499
+
500
+`Listen 0.0.0.0:80`
501
+
502
+
0 503
new file mode 100644
... ...
@@ -0,0 +1,514 @@
0
+# Running Photon OS on Fusion
1
+
2
+This guide describes how to get started using Photon OS as a virtual machine within VMware Fusion. It provides instructions for downloading Photon OS (as an OVA or ISO file), describes the various installation options, and walks through the steps of installing the Photon OS distribution on Fusion. Once Photon OS is installed, this document shows how to deploy a containerized application in Docker with a single command.
3
+
4
+- [About Photon OS](#about-photon-os)
5
+- [Requirements](#requirements)
6
+- [Deciding Whether to Use an OVA or ISO](#deciding-whether-to-use-an-ova-or-iso)
7
+- [Downloading Photon OS](#downloading-photon-os)
8
+- [Importing the OVA for Photon OS 2.0](#importing-the-ova-for-photon-os-20)
9
+- [Installing the ISO Image for Photon OS 2.0](#installing-the-iso-image-for-photon-os-20)
10
+- [Deploying a Containerized Application in Photon OS](#deploying-a-containerized-application-in-photon-os)
11
+- [Installing Photon OS 1.0](#installing-photon-os-10)
12
+
13
+**Note**: If you want to upgrade an existing Photon 1.0 VM, refer to the instructions in [Upgrading to Photon OS 2.0](Upgrading-to-Photon-OS-2.0.md). 
14
+
15
+# About Photon OS
16
+
17
+Photon OS™ is an open source Linux container host optimized for cloud-native applications, cloud platforms, and VMware infrastructure. Photon OS provides a secure run-time environment for efficiently running containers. For an overview, see [https://vmware.github.io/photon/](https://vmware.github.io/photon/).
18
+
19
+# Requirements
20
+
21
+Using Photon OS within VMware Fusion requires the following resources:
22
+
23
+| **Resource** | **Description** |
24
+| --- | --- |
25
+| VMware Fusion | VMware Fusion (v7.0 or higher) must be installed. The latest version is recommended. |
26
+| Memory | 2GB of free RAM (recommended) |
27
+| Storage | **Minimal Photon install** : 512MB of free space (minimum); **Full Photon install** : 4GB of free space (minimum); 8GB recommended. |
28
+| Distribution File | Photon OS ISO or OVA file downloaded from bintray ( [https://bintray.com/vmware/photon/](https://bintray.com/vmware/photon/)). |
29
+
30
+Resource requirements and recommendations vary depending on several factors, including the host environment (for example, VMware Fusion and VMware vSphere), the distribution file used (ISO or OVA), and the selected installation settings (for example, full or basic installation).
31
+
32
+**Note:** The setup instructions in this guide use VMware Fusion Professional version 8.5.8, as per the following screenshot.
33
+
34
+![Fusion version](images/fs-version.png)
35
+
36
+# Deciding Whether to Use an OVA or ISO
37
+
38
+The first step is decide whether to use the OVA or ISO distribution to set up Photon OS.
39
+
40
+- **OVA import**: Because of the nature of an OVA, you're getting a pre-installed version of Photon OS. Choose the OVA with Hardware Version 11 (_not_ 13). The OVA benefits from a simple import process and some kernel tuning for VMware environments. However, because it's a pre-installed version, the set of packages that are installed are predetermined. Any additional packages that you need can be installed using **tdnf**.
41
+- **ISO install**: The ISO, on the other hand, allows for a more complete installation or automated installation via kickstart.
42
+
43
+If you're just looking for the fastest way to get up and running, start with the OVA.
44
+
45
+# Downloading Photon OS
46
+
47
+Once you've decided which way to install, you'll need to download the correct binaries. Go to the following Bintray URL and download the latest release of Photon OS:
48
+
49
+[https://bintray.com/vmware/photon/](https://bintray.com/vmware/photon/)
50
+
51
+For instructions, see  [Downloading Photon OS](Downloading-Photon-OS.md).
52
+
53
+# Importing the OVA for Photon OS 2.0
54
+
55
+Importing the OVA image is the easiest way to create a Photon OS VM.
56
+
57
+## Step 1: Start the Import Process
58
+
59
+After you have downloaded the latest Photon OS OVA image (OVA with Hardware Version 11) into a folder of your choice, open VMware Fusion. From the File menu, choose **Import …**. Fusion prompts you to choose an existing virtual machine.
60
+
61
+![Import process](images/fs-ova-import.png)
62
+
63
+Choose the **Choose File …**  button to locate and select the Photon OS OVA, then choose **Continue**.
64
+
65
+![Select OVA ](images/fs-ova-selected.png)
66
+
67
+## Step 2: Specify the Name and Storage Location
68
+
69
+Provide the name and storage location for your Photon OS VM, then choose **Save**.
70
+
71
+![Name and storage location](images/fs-ova-name.png)
72
+
73
+Review the Photon OS License Agreement, then choose **Accept** to start the import process.
74
+
75
+![License](images/fs-ova-license.png)
76
+
77
+## Step 3: Configure VM Settings
78
+
79
+After the OVA is imported, Fusion displays a confirmation that the import has completed and a summary of the settings for your Photon OS VM. The following screen shot is an example (your settings may vary).
80
+
81
+![VM settings](images/fs-ova-finish.png)
82
+
83
+**Important:** Choose **Customize Settings**  to change the operating system (as recognized by the hypervisor) for the newly imported VM.
84
+
85
+![Custom settings](images/fs-ova-settings.png)
86
+
87
+Choose **General**.
88
+
89
+Click the selection box next to **OS**, select **Linux** , and then select **VMware Photon 64-bit**.
90
+
91
+![Operating system](images/fs-ova-os.png)
92
+
93
+Close the settings window. Fusion prompts you to verify that you want to change the operating system.
94
+
95
+![Confirm settings](images/fs-ova-os-confirm.png)
96
+
97
+Click **Change**. Your Photon OS VM is ready to power on.
98
+
99
+## Step 4: Power on the VM
100
+
101
+Power on the Photon OS VM. Fusion may ask you whether you want to upgrade this VM.
102
+
103
+![Upgrade VM](images/fs-ova-upgrade.png)
104
+
105
+How you respond depends on which hardware version (13 or 11) that you want to use. Upgrade if you need to use devices supported only in hardware version 13. Don't upgrade if you want to be compatible with older tools that are supported in hardware version 11.
106
+
107
+## Step 5: Update Login Credentials
108
+
109
+![Splash screen](images/fs-ova-splash.png)
110
+
111
+After the VM is booted, Fusion prompts you to log in.
112
+
113
+**Note** : Because of limitations within OVA support on Fusion, it was necessary to specify a default password for the OVA option. However, all Photon OS instances that are created by importing the OVA will require an immediate password change upon login. The default account credentials are:
114
+
115
+| **Setting** | **Value** |
116
+| --- | --- |
117
+| Username | ``root`` |
118
+| Password | ``changeme`` |
119
+
120
+After you provide these credentials, Fusion prompts you to create a new password and type it a second time to verify it. For security, Photon OS forbids common dictionary words for the root password. Once logged in, you will see the shell prompt.
121
+
122
+![Login](images/fs-ova-login.png)
123
+
124
+Once complete, proceed to [Deploying a Containerized Application in Photon OS](#deploying-a-containerized-application-in-photon-os).
125
+
126
+# Installing the ISO Image for Photon OS 2.0
127
+
128
+After you have downloaded the latest Photon OS ISO image into a folder of your choice, open VMware Fusion.
129
+
130
+## Step 1: Start the Installation Process
131
+
132
+From the File menu, choose  **New**.
133
+
134
+![Installation](images/fs-iso-new.png)
135
+
136
+From the Select the Installation Method dialog, select **Install from disc or image**, and then choose **Continue**.
137
+
138
+![Installation method](images/fs-iso-new-prompt.png)
139
+
140
+## Step 2: Select the ISO Image
141
+
142
+Drag a disc image onto the window or choose **Use another disc or disc image...**, choose the ISO file you want, and then choose **Continue**.
143
+
144
+![ISO image](images/fs-iso-new-selected.png)
145
+
146
+## Step 3: Select the Operating System
147
+
148
+On the Choose Operating System dialog, select **Linux**  in the left-hand column and **VMware Photon 64-bit**  in the right-hand column.
149
+
150
+![Operating system](images/fs-iso-os.png)
151
+
152
+Choose **Continue**.
153
+
154
+## Step 4: Select the Virtual Disk (Optional)
155
+
156
+If you are using a Fusion version that is older than Fusion 8, you might see the following dialog.
157
+
158
+![Virtual disk](images/fs-iso-virtual-disk.png)
159
+
160
+If you see this dialog, unless you're installing into an existing machine, choose **Create a new virtual disk**  from the Choose a Virtual Disk dialog, and then choose **Continue**.
161
+
162
+**Note:** Fusion v8 and later automatically defaults to creating a new 8GB disk and formats it automatically. If you want to use an existing disk, or if you want to pre-allocate all 8GB, go into VM Settings, choose **Add Device**, and choose either **New Hard Disk** or **Existing Hard Disk**. Expand **Advanced options**  and configure whether you want to pre-allocate disk space (disabled by default) or split into multiple files (enabled by default).
163
+
164
+## Step 5: Configure VM Settings
165
+
166
+**Important:** Before you finish creating the Photon OS Virtual Machine, we strongly recommend that you customize the virtual machine and remove any unwanted devices that are not needed for a container run-time environment.
167
+
168
+![VM settings](images/fs-iso-finish.png)
169
+
170
+To remove unnecessary devices, choose **Customize Settings**.
171
+
172
+First, choose a name for your Virtual Machine, along with the folder into which you create the Virtual Machine (or accept the default folder).
173
+
174
+![Custom settings](images/fs-iso-name.png)
175
+
176
+Choose **Save**. The virtual machine will be created. The Settings screen allows you to customize virtual hardware for the new virtual machine. If it does not automatically appear, open **Settings** from the Virtual Machine menu bar.
177
+
178
+![Settings](images/fs-iso-settings.png)
179
+
180
+You can remove (recommended) the following components that are not used by Photon OS:
181
+
182
+- Select **Display** and ensure that the **Accelerate 3D Graphics** option is unchecked (it should be unchecked, by default). Select **Show All** to return to the VM Settings.
183
+- Select **CD/DVD (IDE)** and ensure that the **Connect CD/DVD Drive** box is checked (it should be checked by default). Select **Show All** to return to the VM Settings.
184
+- Select **Sound Card**, un-check the **Connect Sound Card** Option, and click **Remove Sound Card.** Choose **Remove** to confirm your action. Select **Show All** to return to the VM Settings.
185
+- Select **USB &amp; Bluetooth** and uncheck the **Share Bluetooth devices with Linux** setting. Select **Show All** to return to the VM Settings.
186
+- Select **Printer** and press the **Remove Printer Port** button in the bottom left hand corner. Choose **Remove** to confirm your action. Select **Show All** to return to the VM Settings.
187
+- Select **Camera** and press the **Remove Camera** button in the bottom left hand corner. Choose **Remove** to confirm your action. Select **Show All** to return to the VM Settings.
188
+- Select **Advanced** and ensure that the **Pass Power Status to VM** option is unchecked (it should be unchecked, by default). Select **Show All,** but do not close the VM Settings window.
189
+
190
+By default, Photon OS is configured with a disk size of 8GB. However, Photon OS uses only the portion of disk space it needs, usually much less that the entire disk size. If you want to pre-allocate the entire disk size (reserving it entirely for Photon OS instead), select **Hard Disk**, expand **Advanced options**, and check **Pre-allocate disk space** (by default, it is unchecked). Select **Show All** to return to the VM Settings.
191
+
192
+## Step 6: Configure a Secure Boot (Optional)
193
+
194
+**Note:**  If you want to configure a secure boot for the Photon OS VM you created, edit its .vmx file  and add the following line:
195
+
196
+**firmware = "efi"**
197
+
198
+The EFI boot ensures that the ISO content is signed by VMware and that the entire stack is secure.
199
+
200
+After you have made the customizations you want, close the Virtual Machine Settings window. You are now ready to boot and begin the installation process.
201
+
202
+## Step 7: Power On the VM
203
+
204
+Return to the Fusion main menu, select the Photon OS Virtual Machine, and click **Start Up** (you can also choose **Start Up** from the Virtual Machine menu).
205
+
206
+Fusion powers on the host and starts the installation. Within a few seconds, Fusion displays the Photon OS installer boot menu.
207
+
208
+![Photon OS installer](images/fs-iso-install.png)
209
+
210
+Press the Enter key on your keyboard to start installing.
211
+
212
+![License](images/fs-iso-license.png)
213
+
214
+Read the License Agreement and press the Enter key to accept.
215
+
216
+## Step 8: Configure the Partition
217
+
218
+The Installer will detect one disk, which should be the 8GB volume configured as part of the virtual machine creation.
219
+
220
+![Partition](images/fs-iso-partition.png)
221
+
222
+Choose **Auto**  to have the installer automatically allocate the partition, or choose **Custom** if you want to configure individual partitions, and then press the Enter key.
223
+
224
+**Note:** If you choose **Custom**, the installer displays the following screen.
225
+
226
+![Custom partition](images/fs-iso-partition-custom.png)
227
+
228
+For each custom partition, choose **Create New**  and specify the following information:
229
+
230
+![New partition](images/fs-iso-partition-new.png)
231
+
232
+**Size** - Preallocated size of this partition, in MB.
233
+
234
+**Type** - One of the following options:
235
+
236
+- **ext3** - ext3 file system
237
+- **ext4** - ext4 file system
238
+- **swap** - swap partition
239
+
240
+**Mountpoint** - Mount point for this partition.
241
+
242
+Choose **OK** and press the Enter key. When you are done defining custom partitions, choose **Next**  and press the Enter key.
243
+
244
+The installer prompts you to confirm that you want to erase the entire disk.
245
+
246
+![Disk erase](images/fs-iso-disk-erase.png)
247
+
248
+Choose **Yes** and press the Enter key to accept and proceed with the installation.
249
+
250
+## Step 9: Select an Installation Option
251
+
252
+After partitioning, the installer prompts you to select one of three installation options:
253
+
254
+![Installation options](images/fs-iso-install-option.png)
255
+
256
+Each install option provides a different run-time environment. Select the option that best meets your requirements.
257
+
258
+| **Option** | **Description** |
259
+| --- | --- |
260
+| **Photon Minimal** | Photon Minimum is a very lightweight version of the container host runtime that is best suited for container management and hosting. There is sufficient packaging and functionality to allow most common operations around modifying existing containers, as well as being a highly performant and full-featured runtime. |
261
+| **Photon Full** | Photon Full includes several additional packages to enhance the authoring and packaging of containerized applications and/or system customization. For simply running containers, Photon Full will be overkill. Use Photon Full for developing and packaging the application that will be run as a container, as well as authoring the container, itself. For testing and validation purposes, Photon Full will include all components necessary to run containers. |
262
+| **Photon OSTree Server** | This installation profile will create the server instance that will host the filesystem tree and managed definitions for rpm-ostree managed hosts created with the "Photon OSTree Host" installation profile. Most environments should need only one Photon OSTree Server instance to manage the state of the Photon OSTree Hosts. Use Photon OSTree Server when you are establishing a new repository and management node for Photon OS hosts. |
263
+
264
+**Note:** The option you choose determines the disk and memory resources required for your installation.
265
+
266
+Select the option you want and press the Enter key.
267
+
268
+## Step 10: Select the Linux Kernel
269
+
270
+The installer prompts you to select the Linux kernel to install:
271
+
272
+![Linux kernel](images/fs-iso-kernel.png)
273
+
274
+- **Hypervisor optimized** means that any components that are not needed for running under a VMware hypervisor have been removed for faster boot times.
275
+- **Generic** means that all components are included.
276
+
277
+## Step 11: Specify the Hostname
278
+
279
+The installer prompts you for a hostname and suggest a randomly generated, unique hostname that you can change if you want.
280
+
281
+![Hostname](images/fs-iso-hostname.png)
282
+
283
+Press the Enter key.
284
+
285
+## Step 12: Specify the System root Password
286
+
287
+_Note: Photon OS will not permit commonly used dictionary words to be set as a root password._
288
+
289
+The installer prompts you to enter the system root password. Type the password, and then press the Enter key.
290
+
291
+![Password](images/fs-iso-root-password.png)
292
+
293
+Confirm the root password by typing it a second time.
294
+
295
+![Password confirmation](images/fs-iso-root-password-confirm.png)
296
+
297
+Press the Enter key. The installer proceeds to install the software. Installation times will vary based on the system hardware and installation options you selected. Most installations complete in less than one minute.
298
+
299
+Once finished, the installer displays a confirmation message (which includes how long it took to install Photon OS) and prompts you to press a key on your keyboard to boot the new VM.
300
+
301
+![Confirmation](images/fs-iso-installed.png)
302
+
303
+## Step 13: Reboot the VM and Log In
304
+
305
+Press any key on the keyboard and the virtual machine will reboot into Photon OS.
306
+
307
+![Reboot](images/fs-iso-splash.png)
308
+
309
+As the initial boot process begins, the installer displays the Photon splash screen, and then a login prompt.
310
+
311
+At the login prompt, enter **root**  as the username and provide the password chosen during the installation.
312
+
313
+![Password](images/fs-iso-login.png)
314
+
315
+You have now successfully setup Photon OS and are ready to use your container run-time environment. Proceed to the next section to deploy a containerized application.
316
+
317
+# Deploying a Containerized Application in Photon OS
318
+
319
+Now that you have your container runtime environment up and running, you can easily deploy a containerized application. For this example, you will deploy the popular open source Web Server Nginx. The Nginx application has a customized VMware package that is published as a dockerfile and can be downloaded, directly, through the Docker module from the Docker Hub.
320
+
321
+## Step 1: Run Docker
322
+
323
+To run Docker from the command prompt, enter the following command, which initializes the docker engine:
324
+
325
+    systemctl start docker
326
+
327
+To ensure Docker daemon service runs on every subsequent VM reboot, enter the following command:
328
+
329
+    systemctl enable docker
330
+
331
+## Step 2: Run the Nginx Web Server
332
+
333
+Now the Docker daemon service is running, it is a simple task to "pull" and start the Nginx Web Server container from Docker Hub. To do this, type the following command:
334
+
335
+    docker run -d -p 80:80 vmwarecna/nginx
336
+
337
+This pulls the Nginx Web Server files and appropriate dependent container filesystem layers required for this containerized application to run.
338
+
339
+![Docker run](images/fs-docker-run.png)
340
+
341
+After the **docker run** process completes, you return to the command prompt. You now have a fully active website up and running in a container.
342
+
343
+## Step 3: Test the Web Server
344
+
345
+To test that your Web Server is active, run the ifconfig command to get the IP address of the Photon OS Virtual Machine.
346
+
347
+![IP Address](images/fs-docker-ifconfig.png)
348
+
349
+The output displays a list of adapters that are connected to the virtual machine. Typically, the web server daemon will be bound on "eth0."
350
+
351
+Start a browser on your host machine and enter the IP address of your Photon OS Virtual Machine. You should see a screen similar to the following example as confirmation that your web server is active.
352
+
353
+![Confirmation](images/fs-docker-confirm.png)
354
+
355
+You can now run any other containerized application from Docker Hub or your own containerized application within Photon OS.
356
+
357
+# Installing Photon OS 1.0
358
+
359
+This section provides setup instructions for Photon OS 1.0.
360
+
361
+## Photon OS 1.0 Prerequisites
362
+In order to install and start using Photon OS with VMware Fusion the following pre-requisites must be satisfied:
363
+* VMware Fusion or VMware Workstation must be installed
364
+* Recommended 2GB of free RAM
365
+* Recommended at least 300MB of free disk space
366
+* Photon OS ISO or OVA
367
+
368
+## Importing the Photon OS 1.0 OVA 
369
+
370
+Using the OVA is the easiest way to create a Photon OS VM. Once you’ve downloaded the OVA, open VMware Fusion and select, “Import …” from the File menu. This will open the “Choose an Existing Virtual Machine” wizard. Use the “Choose File …” button to locate and select the Photon OS OVA.
371
+Note: The “Import” operation is specific to Fusion. For Workstation users, simply double-clicking on the OVA will start the import. 
372
+
373
+![Import](https://cloud.githubusercontent.com/assets/11306358/16094763/4ac80e12-3307-11e6-8e7b-10ea353ddbfc.png)
374
+
375
+Click “Continue” and provide the name and storage location for your Photon OS VM. Then, click "Save."
376
+
377
+![Save](https://cloud.githubusercontent.com/assets/11306358/16094759/4ac50000-3307-11e6-8a34-538f36b95f64.png)
378
+
379
+Clicking “Save” will immediately present the Photon OS EULA. In order to start the import process, you'll need to click "Accept" to accept the EULA. 
380
+
381
+![Accept](https://cloud.githubusercontent.com/assets/11306358/16094758/4ac50668-3307-11e6-86ce-943afa12946f.png)
382
+
383
+Once the import is complete, you should get confirmation that the import was Finished and a summary of the settings for your Photon OS VM. Click “Customize Settings” to change the operating system, as recognized by the hypervisor. Within the "General" System Settings for the newly imported VM, click the selection box next to "OS" and select, "VMware Photon 64-bit," as shown below.
384
+
385
+![Settings](https://cloud.githubusercontent.com/assets/11306358/16095187/24abc4f6-3309-11e6-9faa-c4e7b15ba63a.png) 
386
+
387
+Close the settings window and your Photon OS VM is ready to power on.
388
+
389
+![Confirmation](https://cloud.githubusercontent.com/assets/11306358/16094764/4acf69dc-3307-11e6-9d62-7dd37546a233.png)
390
+
391
+Clicking “Finish” will immediately power on your Photon OS VM. Once the VM is booted, you will be presented with a login prompt. Because of limitations within OVA support on Fusion and Workstation, it was necessary to specify a default password for the OVA option. However, all Photon OS instances that are created by importing the OVA will require an immediate password change upon login. The default account credentials are:
392
+
393
+`Username: root`
394
+`Password: changeme`
395
+
396
+As soon as you enter these credentials, you will be forced to create a new password by entering the new password twice before you can access the shell prompt.
397
+
398
+![Login](https://cloud.githubusercontent.com/assets/11306358/16094765/4ad06ce2-3307-11e6-827f-e61107185f42.png)
399
+ 
400
+## Installing Photon OS 1.0 on VMware Fusion from an ISO Image	
401
+With the latest Photon OS ISO image downloaded into a folder of your choice, Open VMware Fusion and Select “File->New.” The following screen will appear: 
402
+
403
+![File->New](https://cloud.githubusercontent.com/assets/11306358/14651747/df593c52-0636-11e6-9cbe-bfd0db9bfa89.png)
404
+
405
+Select "Create a custom virtual machine" from the "Select the Installation Method" dialog, then, click continue. On the "Choose Operating System" dialog, select, "Linux" in the left-hand column and "VMware Photon 64-bit" in the right-hand column. 
406
+
407
+![fusion7](https://cloud.githubusercontent.com/assets/11306358/14651749/df6fbd74-0636-11e6-8070-a584bddf39f5.png)
408
+
409
+Unless you're installing into an existing machine, select, "Create a new virtual disk" from the "Choose a Virtual Disk dialog, then click "Continue."
410
+
411
+![fusion7b](https://cloud.githubusercontent.com/assets/11306358/14651751/df7428a0-0636-11e6-85b2-64e2dff9be84.png)
412
+
413
+You're almost finished; but, before finishing the Photon OS Virtual Machine Creation, we strongly recommend that you customize the virtual machine and remove any unwanted devices that are not needed for a container runtime environment.  
414
+
415
+![fusion9](https://cloud.githubusercontent.com/assets/11306358/14651750/df7385f8-0636-11e6-9310-0d7f375dd7b5.png) 
416
+
417
+To remove unnecessary devices, from the screen shown below, select “Customize Settings."
418
+
419
+First, choose a name for your Virtual Machine and the folder into which you would like to create the Virtual Machine.  If the default folder of “Virtual Machines” is acceptable, click “Save”.  
420
+
421
+![Save](https://cloud.githubusercontent.com/assets/11306358/16105478/724ea650-3350-11e6-8e69-272f6a1f6097.png)
422
+
423
+The virtual machine will be created and a new screen will appear, as shown below, that will allow virtual hardware customization to the new virtual machine. If it does not automatically appear, open "Settings" from the Virtual Machine menu bar. 
424
+
425
+![fusion11](https://cloud.githubusercontent.com/assets/11306358/14653053/cd434ffc-063c-11e6-9861-924489b26d75.png)
426
+
427
+It is our recommendation that the following components are removed, since they’re not used by Photon OS:
428
+* Select “Sound Card” and un-tick the “Connect Sound Card” Option and click "Remove Sound Card." Confirm your action and return to the VM Settings by clicking “Show All.”
429
+* Select “Camera” and press the “Remove Camera” button in the bottom left hand corner, confirm your action and then select “Show All” to return to the VM Settings.
430
+* Select “Printer” and press the “Remove Printer Port” button in the bottom left hand corner, confirm your action and then select “Show All” to return to the VM Settings.
431
+* Select “USB & Bluetooth” and uncheck the “Share Bluetooth devices with Linux” setting and then select “Show All”
432
+* Select “Display” and ensure that the “Accelerate 3D Graphics” option is unchecked (it should be unchecked, by default) and, then, return to the VM Settings by selecting “Show All.”
433
+* Select “Advanced” and ensure that the “Pass Power Status to VM” option is unchecked. Select “Show All," but do not close the VM Settings window.
434
+
435
+At this stage we have now made all the necessary customizations and we are ready to select the Photon OS ISO image to boot and begin the installation process. 
436
+
437
+From the Virtual Machine Settings menu in Fusion, select "CD/DVD (IDE)" and, as shown below, point to the downloaded Photon OS ISO and ensure that there is a check in the "Connect CD/DVD Drive" box.
438
+
439
+![Connect CD/DVD](https://cloud.githubusercontent.com/assets/11306358/16105475/72391e0c-3350-11e6-94a2-64587a06e838.png)
440
+
441
+Return to the Fusion main menu, select the Photon OS Virtual Machine and press the “Play” button to power on the host and start the installation.
442
+Within a few seconds the Photon OS Installer Boot Menu will appear.
443
+
444
+![Boot menu](https://cloud.githubusercontent.com/assets/11306358/16105477/724e902a-3350-11e6-8482-7544d2a6c3fb.png)
445
+
446
+Select – “Install” to proceed. 
447
+
448
+![Install](https://cloud.githubusercontent.com/assets/11306358/16105480/7251abca-3350-11e6-8f8e-d26244fd75ff.png)
449
+
450
+After you accept the EULA, the Installer will detect one disk, which should be the 8GB volume configured as part of the virtual machine creation. Select the disk and press enter.  You will be prompted to confirm it is okay to erase the entire disk, select “Yes” to accept and proceed with the installation.
451
+You will now be presented with four installation options:
452
+
453
+![fusion15](https://cloud.githubusercontent.com/assets/11306358/14651982/d464f31c-0637-11e6-938d-5d6132ccd63f.png)
454
+
455
+Each install option provides a different runtime environment, depending on your requirements:
456
+
457
+* Photon Minimal: Photon Minimum is a very lightweight version of the container host runtime that is best suited for container management and hosting. There is sufficient packaging and functionality to allow most common operations around modifying existing containers, as well as being a highly performant and full-featured runtime. 
458
+
459
+* Photon Full: Photon Full includes several additional packages to enhance the authoring and packaging of containerized applications and/or system customization. For simply running containers, Photon Full will be overkill. Use Photon Full for developing and packaging the application that will be run as a container, as well as authoring the container, itself. For testing and validation purposes, Photon Full will include all components necessary to run containers. 
460
+
461
+* Photon OSTree Host: This installation profile creates a Photon OS instance that will source its packages from a central rpm-ostree server and continue to have the library and state of packages managed by the definition that is maintained on the central rpm-ostree server. Use Photon OStree Hosts when you are interested in experimenting with the concept of a centrally authored and maintained OS version. This concept of treating the OS as a versioned, atomic entity can simplify lifecycle and security management at scale. 
462
+
463
+* Photon OSTree Server: This installation profile will create the server instance that will host the filesystem tree and managed definitions for rpm-ostree managed hosts created with the “Photon OSTree Host” installation profile. Most environments should need only one Photon OSTree Server instance to manage the state of the Photon OSTree Hosts. Use Photon OSTree Server when you are establishing a new repository and management node for Photon OS hosts.  
464
+
465
+For the purposes of this how-to guide, select option 1, “Photon Minimal.”  Once this selection is highlighted, press the Enter key on your keyboard.
466
+
467
+You will now be prompted for a hostname. Photon OS will prepopulate a randomly generated, unique hostname; you can either use this suggestion or enter your own hostname. After selecting a hostname and pressing “Enter,” you will be prompted to first enter and, then, confirm the system root password.
468
+
469
+*Note: Photon OS will not permit commonly used dictionary words to be set as a root password.*
470
+
471
+After confirming the password, the installation process should begin.
472
+Installation times will vary based on system hardware and installation options, but most installations complete in less than one minute. Once the install is complete you will get a confirmation prompt on the screen stating “Congratulations, Photon has been installed in xx secs, Press any key to continue to boot…”  - Press any key and the virtual machine will reboot into Photon OS.
473
+
474
+![Reboot](https://cloud.githubusercontent.com/assets/11306358/16105476/724e70c2-3350-11e6-84af-0c487266108d.png)
475
+
476
+As the initial boot process begins, you will see the Photon splash screen before you are taken to a login prompt.
477
+
478
+![Login](https://cloud.githubusercontent.com/assets/11306358/16094764/4acf69dc-3307-11e6-9d62-7dd37546a233.png)
479
+
480
+At the login prompt, enter “root” as the username and provide the password chosen during the installation. 
481
+
482
+You have now successfully setup Photon OS and are ready to use your container runtime environment.
483
+
484
+## Installing a Containerized Application on Photon OS 1.0
485
+
486
+Now that you have your container runtime environment up and running, you may be wondering, “what can I do now?” A command prompt is not the most exciting!  To help to demonstrate the ease in which you can deploy a containerized application, we will showcase how you can quickly get a Web Server up and running.
487
+For this example, we will use the popular open source Web Server Nginx. The Nginx application has a customized VMware package and published as a dockerfile and can be downloaded, directly, through the Docker module from the Docker Hub.
488
+
489
+To run Docker from the command prompt, enter the command below to initialize the docker engine:
490
+
491
+`systemctl start docker`
492
+
493
+To ensure Docker daemon service runs on every subsequent VM reboot, enter:
494
+
495
+`systemctl enable docker`
496
+
497
+Now the Docker daemon service is running, it is a simple task to “pull” and start the Nginx Web Server container from Docker Hub.  To do this, type the following command:
498
+
499
+`docker run -d -p 80:80 vmwarecna/nginx`
500
+
501
+This will then pull the Nginx Web Server files and appropriate dependent container filesystem layers to ensure this containerized application can run.  You will see a screenshot similar to below, as the container and dependencies are downloaded and the container is prepared to run:
502
+
503
+![fusion19](https://cloud.githubusercontent.com/assets/11306358/9568066/b3950dd8-4f04-11e5-9333-ac0551a22ace.jpg)
504
+
505
+Once “docker run” process is completed, you will be returned to the command prompt.  You now have a fully active website up and running in a container!
506
+
507
+To test that your Web Server is active, we need to get the IP address of the Photon OS Virtual Machine. To get the IP address, enter the following command ifconfig. This will now display a list of adapters connected to the virtual machine.  Typically, the web server daemon will be bound on “eth0.”  
508
+ 
509
+Start a browser on your host machine and enter the IP address of your Photon OS Virtual Machine.  The following screen will appear and that will show that your web server is active: -
510
+
511
+![fusion20](https://cloud.githubusercontent.com/assets/11306358/9568067/b3b6e278-4f04-11e5-93f6-de8383530518.jpg)
512
+
513
+You can now run any other containerized application from Docker Hub or your own containerized application within Photon OS.
0 514
new file mode 100644
... ...
@@ -0,0 +1,28 @@
0
+# Summary
1
+
2
+## Photon OS 3.0
3
+
4
+----
5
+
6
+- [Installation Guide](README.md)
7
+    - [Downloading Photon OS](Downloading-Photon-OS.md)
8
+    - [Build an ISO from the source code for Photon OS](build-photon.md)
9
+    - [Running Photon OS on vSphere](Running-Photon-OS-on-vSphere.md)
10
+    - [Running Photon OS on Fusion](Running-Project-Photon-on-Fusion.md)
11
+    - [Running Photon OS on Workstation](Running-Photon-OS-on-Workstation.md)
12
+    - [Running Photon OS on AWS EC2](Running-Photon-OS-on-Amazon-Elastic-Cloud-Compute.md)
13
+    - [Running Photon OS on Microsoft Azure](Running-Photon-OS-on-Microsoft-Azure.md)
14
+    - [Running Photon OS on Google Compute Engine](Running-Photon-OS-on-Google-Compute-Engine.md)
15
+        -   [Photon OS on GCE](gce.md)
16
+    - [Installing and Using Lightwave on Photon OS](Installing-and-Using-Lightwave-on-Photon-OS.md)
17
+        - [Installing the Lightwave Server and Configuring It as a Domain Controller on a Photon Image](Installing-Lightwave-Server-and-Setting-Up-a-Domain.md) 
18
+        - [Installing the Lightwave Client on a Photon Image and Joining the Client to a Domain](Installing-Lightwave-Client-and-Joining-a-Domain.md)
19
+        - [Installing the Photon Management Daemon on a Lightwave Client](Installing-the-Photon-Management-Daemon-on-a-Lightwave-Client.md)
20
+        - [Remotely Upgrade a Single Photon OS Machine With Lightwave Client and Photon Management Daemon Installed](Remotely-Upgrade-a-Photon-OS-Machine-With-Lightwave-Client-and-Photon-Management-Daemon-Installed.md)
21
+        - [Remotely Upgrade Multiple Photon OS Machines With Lightwave Client and Photon Management Daemon Installed](Remotely-Upgrade-Photon-OS-Machine-With-Lightwave-Client-and-Photon-Management-Daemon-Installed.md)
22
+    - [Photon Management Daemon](using-the-photon-management-daemon.md)
23
+        - [Installing the pmd Package](installing_pmd_package.md)
24
+        - [Available APIs](available_apis.md)
25
+    - [Command-line Interfaces](command-line_interfaces.md)
26
+        - [Photon Management Daemon Command-line Interface (pmd-cli)](pmd-cli.md)
27
+        - [Photon Network Manager Command-line Interface (netmgr)](netmgr-cli.md)
0 28
\ No newline at end of file
1 29
new file mode 100644
... ...
@@ -0,0 +1,47 @@
0
+# Available APIs
1
+
2
+Photon OS includes the following APIs:
3
+
4
+- PMD Rest API
5
+- PMD Python API
6
+- PMD C API
7
+
8
+## PMD REST API
9
+
10
+The PMD REST API is an openapi 2.0 specification. Once the pmd package is installed, you can use a Swagger UI tool to browse the REST API specifications (/etc/pmd/restapispec.json).
11
+You can also browse it using the copenapi_cli tool that comes with the pmd package:
12
+~~~~
13
+# copenapi_cli --apispec /etc/pmd/restapispec.json
14
+~~~~
15
+For more information about the copenapi_cli tool, refer to [github.com/vmware/copenapi](https://github.com/vmware/copenapi).
16
+
17
+## PMD Python API
18
+
19
+Python3 is included with your Photon OS 2.0 distribution. PMD Python interfaces are available for python3 (pmd-python3) and python2 (pmd-python2). You can use tdnf to ensure that the latest version is installed:
20
+~~~~
21
+# tdnf install pmd-python3
22
+# systemctl start pmd
23
+~~~~
24
+To navigate the help documentation for the pmd Python packages:
25
+~~~~
26
+# python3
27
+>>> import pmd
28
+>>> net = pmd.server().net
29
+>>> help(pmd)
30
+~~~~
31
+To show help text for individual interfaces:
32
+~~~~
33
+>>> help(pmd.server().net)
34
+>>> help(pmd.server().pkg)
35
+>>> help(pmd.server().firewall)
36
+>>> help(pmd.server().user)
37
+~~~~
38
+For details about the network commands, see also the [Network Configuration Manager - Python API](photon_admin/netmgr.python.md).
39
+
40
+## PMD C API
41
+
42
+PMD C APIs are defined in the header files (pmd_fwmgmt.h, pmd_netmgr.h, pmd_pkgmgmt.h, pmd_usermgmt.h) that are stored in the following location:  
43
+~~~~
44
+[https://github.com/vmware/pmd/tree/master/include](https://github.com/vmware/pmd/tree/master/include)
45
+~~~~
46
+For details about the network commands, see also the [Network Configuration Manager - C API](photon_admin/netmgr.c.md).
0 47
\ No newline at end of file
1 48
new file mode 100644
... ...
@@ -0,0 +1,91 @@
0
+# Building an ISO from the Source Code for Photon OS
1
+
2
+This document describes how to build an ISO from the source code for Photon OS, the open-source minimalist Linux operating system from VMware that is optimized for cloud computing platforms, VMware vSphere deployments, and applications native to the cloud. 
3
+
4
+## Folder Layout
5
+
6
+Here is the structure of the directories on GitHub that contain the source code for Photon OS:
7
+
8
+```
9
+photon/
10
+├── Makefile
11
+├── README
12
+├── Dockerfile
13
+├── Vagrantfile
14
+├── SPECS        # RPM SPEC files
15
+├── common       # Build, packaging config
16
+├── docs         # Documentation
17
+├── installer    # Installer used at runtime
18
+├── support      # Build scripts
19
+└── tools
20
+```
21
+
22
+## How to Build the ISO
23
+
24
+The following process for building the ISO assumes that the following prerequisites are in place:
25
+
26
+* A build operating system running the 64-bit version of Ubuntu 14.04 or later
27
+* Packages: bison, gawk, g++, createrepo, python-aptdaemon, genisoimage, texinfo, python-requests
28
+* Docker
29
+* Downloaded the source code from the Photon OS repository on GitHub into `$HOME/workspaces/photon`.
30
+
31
+Here's how to install the packages on Ubuntu: 
32
+
33
+```
34
+sudo apt-get -y install bison gawk g++ createrepo python-aptdaemon genisoimage texinfo python-requests libfuse-dev libssl-dev uuid-dev libreadline-dev kpartx git bc
35
+```
36
+Here's how to get Docker:
37
+```
38
+wget -qO- https://get.docker.com/ | sh
39
+```
40
+
41
+Here's how to make the ISO, assuming you checked out the workspace under `$HOME/workspaces/photon`:
42
+```
43
+cd $HOME/workspaces/photon
44
+sudo make iso
45
+```
46
+The ISO is created at `$HOME/workspaces/photon/stage/photon.iso`
47
+
48
+
49
+## How to Use the Cached Toolchain and RPMS
50
+```
51
+mkdir $HOME/photon-cache
52
+sudo make iso PHOTON_CACHE_PATH=$HOME/photon-cache
53
+```
54
+Directory format of `PHOTON_CACHE_PATH` is as follows.
55
+```
56
+photon-cache/
57
+├──tools-build.tar.gz
58
+├──RPMS/x86-64/*.rpm
59
+└──RPMX/noarch/*.rpm
60
+```
61
+## How to Use Cached Sources
62
+```
63
+mkdir $HOME/photon-sources
64
+sudo make iso PHOTON_SOURCES_PATH=$HOME/photon-sources
65
+```
66
+Directory format of `PHOTON_SOURCES_PATH` is as follows.
67
+```
68
+photon-sources/
69
+├──src1.tar.gz
70
+├──src2.tar.gz
71
+└──...
72
+```
73
+
74
+## Where are the Build Logs?
75
+```
76
+$HOME/workspaces/photon/stage/LOGS
77
+```
78
+
79
+## Building RPMs from their Source RPMs
80
+
81
+For instructions on how to install and build a package on Photon OS from the package's source RPM, see the [Photon OS Administration Guide](https://github.com/vmware/photon/blob/master/docs/photon-admin-guide.md#building-a-package-from-a-source-rpm).
82
+
83
+## Complete Build Environment Using Vagrant
84
+A `Vagrantfile` is available to ensure a quick standup of a development or build environment for Photon. This Vagrantfile uses a box called `photon-build-machine` that is created through a [Packer](http://packer.io) template available under `support/packer-templates`; see the [README.md](https://github.com/vmware/photon/blob/master/support/packer-templates/README.md) for more information on how to build `photon-build-machine`.
85
+
86
+## Photon Vagrant Box
87
+As with the build-machine a Packer template is available under `support/packer-templates` to build a Photon based Vagrant box running Docker, see the [README.md](https://github.com/vmware/photon/blob/master/support/packer-templates/README.md) for more information on how to build it. 
88
+
89
+## Automated Build Environment and Vagrant Boxes
90
+Convenience `make` targets also exist to build both the `photon-build-machine` and the `photon` Packer templates as well as building a fresh ISO using the `photon-build-machine`. See the [README.md](https://github.com/vmware/photon/blob/master/support/packer-templates/README.md) for details.
0 91
new file mode 100644
... ...
@@ -0,0 +1,6 @@
0
+# Command-line Interfaces
1
+
2
+Photon OS includes the following command-line utilities:
3
+
4
+- [Photon Management Daemon Command-line Interface (pmd-cli)](pmd-cli.md). The pmd-cli utility enables Photon customers to invoke API requests securely on local and remote servers. 
5
+- [Photon Network Manager Command-line Interface (netmgr)](netmgr-cli.md). A command line interface to manage network configuration of the system.
0 6
new file mode 100644
... ...
@@ -0,0 +1,3 @@
0
+# Title
1
+
2
+Text
0 3
new file mode 100644
... ...
@@ -0,0 +1,151 @@
0
+# Photon OS on GCE
1
+
2
+## Google Compute Engine (GCE) Image background
3
+GCE is a service that lets you run virtual machines on Google's infrastructure. You can customize the virtual machine as much as you want, and you can even install your own custom operating system image. Or, you can adopt one of the public [images](https://cloud.google.com/compute/docs/operating-systems/) provided by Google. For any operating system to work with GCE, it must match Google's infrastructure needs. 
4
+Google provides tools that VM instances require to work correctly on GCE:
5
+
6
+ *   __[Google startup scripts](https://cloud.google.com/compute/docs/startupscript)__: User can provide some startup script to configure their instances at startup.
7
+ *   __[Google Daemon](https://cloud.google.com/compute/docs/metadata)__: Google Daemon creates new accounts and configures ssh to accept public keys using the metadata server.
8
+ *   __[Google Cloud SDK](https://cloud.google.com/sdk/)__: Command line tools to manage your images, instances and other objects on GCE.
9
+
10
+Following is the list (extracted from [this link](https://cloud.google.com/compute/docs/tutorials/building-images)) of items that must be done to make Photon OS work on GCE:
11
+
12
+ *   Install Google Compute Engine Image packages
13
+ *   Install Google Cloud SDK
14
+ *   Change GPT partition table to MBR 
15
+ *   Update the Grub config for new MBR and serial console output
16
+ *   Update ssh configuration
17
+ *   Delete ssh host keys
18
+ *   Set the time zone to UTC
19
+ *   Use the Google NTP server
20
+ *   Delete the hostname file.
21
+ *   Add Google hosts /etc/hosts
22
+ *   Set MTU to 1460. SSH will not work without it.
23
+ *   Create /etc/ssh/sshd_not_to_be_run with just the contents “GOOGLE\n”.
24
+
25
+## The GCE-Ready Image of Photon OS 
26
+
27
+The latest version of Photon OS does all of this for you. It bundles the Google startup scripts, daemon, and cloud SDK into a GCE-ready image that has been modified to meet the configuration requirements of GCE. To download the GCE-ready image of Photon OS for free, go to [Bintray](https://bintray.com/vmware/photon/). To use Photon OS with GCE, you do not need to perform the following steps unless you want to go through the exercise of customizing Photon OS to work with GCE. The Photon OS team has already done it for you. For more information, see [Running Photon OS on Google Compute Engine](Running-Photon-OS-on-Google-Compute-Engine.md). 
28
+
29
+## Creating Photon image for GCE
30
+### 1. Prepare Photon Disk
31
+#### Install Photon Minimal on Fusion/Workstation and install some required packages.
32
+      mount /dev/cdrom /media/cdrom
33
+      tdnf install yum
34
+      tdnf install python2-libs
35
+      yum install ntp sudo wget tar which gptfdisk sed findutils grep gzip --nogpgcheck -y
36
+
37
+#### Photon installer installs GPT partition table by default but GCE only accepts MBR(msdos) type partition table. We need to convert GPT to MBR and update the grub. Following are commands to do that.
38
+  
39
+      # Change partition table to MBR from GPT
40
+      sgdisk -m 1:2 /dev/sda
41
+      grub2-install /dev/sda
42
+      
43
+      # Enable serial console on grub for GCE.
44
+      cat << EOF >> /etc/default/grub
45
+      GRUB_CMDLINE_LINUX="console=ttyS0,38400n8"
46
+      GRUB_TERMINAL=serial
47
+      GRUB_SERIAL_COMMAND="serial --speed=38400 --unit=0 --word=8 --parity=no --stop=1"
48
+      EOF
49
+      
50
+      # Create new grub.cfg based on the settings in /etc/default/grub
51
+      grub2-mkconfig -o /boot/grub2/grub.cfg
52
+      
53
+### 2. Install Google Cloud SDK and GCE Packages
54
+      yum install google-daemon google-startup-scripts
55
+      cp /usr/lib/systemd/system/google* /lib/systemd/system/
56
+      cd /lib/systemd/system/multi-user.target.wants/
57
+      
58
+      # Create links in multi-user.target to auto-start these scripts and services.
59
+      for i in ../google*; do  ln -s $i `basename $i`; done
60
+      
61
+      cd /tmp/; wget https://dl.google.com/dl/cloudsdk/release/google-cloud-sdk.tar.gz --no-check-certificate
62
+      tar -xf google-cloud-sdk.tar.gz
63
+      cd google-cloud-sdk
64
+      ./install.sh
65
+### 3. Update /etc/hosts file with GCE values
66
+      echo "169.254.169.254 metadata.google.internal metadata" >> /etc/hosts
67
+### 4. Remove all servers from ntp.conf and add Google's ntp server.
68
+      sed -i -e "/server/d" /etc/ntp.conf
69
+      cat /etc/ntp.conf
70
+      echo "server 169.254.169.254" >> /etc/ntp.conf
71
+      # Create ntpd.service to auto starting ntp server.
72
+      cat << EOF >> /lib/systemd/system/ntpd.service
73
+      [Unit]
74
+      Description=Network Time Service
75
+      After=network.target nss-lookup.target
76
+
77
+      [Service]
78
+      Type=forking
79
+      PrivateTmp=true
80
+      ExecStart=/usr/sbin/ntpd -g -u ntp:ntp
81
+      Restart=always
82
+      
83
+      [Install]
84
+      WantedBy=multi-user.target
85
+      EOF
86
+      
87
+      # Add link in multi-user.target.wants to auto start this service.
88
+      cd /lib/systemd/system/multi-user.target.wants/
89
+      ln -s ../ntpd.service ntpd.service
90
+      
91
+### 5. Set UTC timezone
92
+      ln -sf /usr/share/zoneinfo/UTC /etc/localtime
93
+
94
+### 6. Update /etc/resolv.conf
95
+      echo "nameserver 8.8.8.8" >> /etc/resolv.conf
96
+
97
+### 7. Remove ssh host keys and add script to regenerate them at boot time.
98
+      rm /etc/ssh/ssh_host_*
99
+      # Depending on the installation, you may need to purge the following keys
100
+      rm /etc/ssh/ssh_host_rsa_key*
101
+      rm /etc/ssh/ssh_host_dsa_key*
102
+      rm /etc/ssh/ssh_host_ecdsa_key*
103
+
104
+      sed -i -e "/exit 0/d" /etc/rc.local
105
+      echo "[ -f /etc/ssh/ssh_host_key ] && echo 'Keys found.' || ssh-keygen -A" >> /etc/rc.local
106
+      echo "exit 0" >> /etc/rc.local
107
+      printf "GOOGLE\n" > /etc/ssh/sshd_not_to_be_run
108
+      
109
+      # Edit sshd_config and ssh_config as per instructions on [this link](https://cloud.google.com/compute/docs/tutorials/building-images).
110
+      
111
+### 8. Change MTU to 1460 for network interface.
112
+      # Create a startup service in systemd that will change MTU and exits
113
+      cat << EOF >> /lib/systemd/system/eth0.service
114
+      [Unit]
115
+      Description=Network interface initialization
116
+      After=local-fs.target network-online.target network.target
117
+      Wants=local-fs.target network-online.target network.target
118
+
119
+      [Service]
120
+      ExecStart=/bin/ifconfig eth0 mtu 1460 up
121
+      Type=oneshot
122
+
123
+      [Install]
124
+      WantedBy=multi-user.target
125
+      EOF
126
+      # Make this service auto-start at boot.
127
+      cd /lib/systemd/system/multi-user.target.wants/
128
+      ln -s ../eth0.service eth0.service
129
+
130
+### 9. Pack and Upload to GCE.
131
+#### Shutdown the Photon VM and copy its disk to tmp folder.       
132
+      # You will need to install Google Cloud SDK on host machine to upload the image and play with GCE.
133
+      cp Virtual\ Machines.localized/photon.vmwarevm/Virtual\ Disk.vmdk /tmp/disk.vmdk
134
+      cd /tmp
135
+      # GCE needs disk to be named as disk.raw with raw format.
136
+      qemu-img convert -f vmdk -O raw disk.vmdk disk.raw
137
+      
138
+      # ONLY GNU tar will work to create acceptable tar.gz file for GCE. MAC's default tar is BSDTar which will not work. 
139
+      # On Mac OS X ensure that you have gtar "GNU Tar" installed. exmaple: gtar -Szcf photon.tar.gz disk.raw 
140
+
141
+      gtar -Szcf photon.tar.gz disk.raw 
142
+      
143
+      # Upload
144
+      gsutil cp photon.tar.gz gs://photon-bucket
145
+      
146
+      # Create image
147
+      gcloud compute --project "<project name>" images create "photon-beta-vYYYYMMDD" --description "Photon Beta" --source-uri https://storage.googleapis.com/photon-bucket/photon032315.tar.gz
148
+      
149
+      # Create instance on GCE of photon image
150
+      gcloud compute --project "photon" instances create "photon" --zone "us-central1-f" --machine-type "n1-standard-1" --network "default" --maintenance-policy "MIGRATE" --scopes "https://www.googleapis.com/auth/devstorage.read_only" "https://www.googleapis.com/auth/logging.write" --image "https://www.googleapis.com/compute/v1/projects/photon/global/images/photon" --boot-disk-type "pd-standard" --boot-disk-device-name "photon"
0 151
new file mode 100644
... ...
@@ -0,0 +1,7 @@
0
+# Installing the pmd Package
1
+
2
+The pmd package is included with your Photon OS 2.0 distribution. To make sure that you have the latest version, you can run:
3
+~~~~
4
+# tdnf install pmd
5
+# systemctl start pmd
6
+~~~~
0 7
\ No newline at end of file
1 8
new file mode 100644
... ...
@@ -0,0 +1,239 @@
0
+# Photon Network Manager Command-line Interface (netmgr)
1
+
2
+For locally logged-on users, Photon OS provides a command line interface to manage network configuration of the system.
3
+
4
+- [Setup Steps](#setup-steps)
5
+- [Syntax](#syntax)
6
+- [Network Manager CLI](#network-manager-cli)
7
+
8
+# Setup Steps
9
+
10
+The netmgr tool is included with your Photon OS distribution. To make sure that you have the latest version, you can run:
11
+~~~~
12
+tdnf install netmgmt
13
+~~~~
14
+# Syntax
15
+The CLI is built on set, get, add, delete command model and uses the option-name - option-value model of specifying command parameters.
16
+~~~~
17
+netmgr <network object> <--get | --set | --add | --del> <command options>
18
+~~~~
19
+Passed-in parameter values can be enclosed in single (&#39;) or double-quotes (&quot;) as long as you use matching characters to denote the beginning and end of the value. Unless a parameter value contains special characters or spaces, you can also omit quotes altogether.
20
+
21
+## network object
22
+
23
+``<network object>`` is one of the following values:
24
+
25
+- ``link_info``
26
+- ``ip4_address``
27
+- ``ip6_address``
28
+- ``ip_route``
29
+- ``dns_servers``
30
+- ``dns_domains``
31
+- ``dhcp_duid``
32
+- ``if_iaid``
33
+- ``ntp_servers``
34
+- ``hostname``
35
+- ``wait_for_link``
36
+- ``wait_for_ip``
37
+- ``error_info``
38
+- ``net_info``
39
+
40
+# Network Manager CLI
41
+
42
+## link_info
43
+
44
+Get the mac address, MTU, link state, and link mode for the (optionally) specified interface.
45
+~~~~
46
+netmgr link_info --get --interface <ifname>
47
+~~~~
48
+Set the MAC address, link state (up or down), link mode (manual or auto), or MTU for the specified interface.
49
+~~~~
50
+netmgr link_info --set --interface <ifname> --macaddr <mac_address>
51
+netmgr link_info --set --interface <ifname> --mode <manual|auto>
52
+netmgr link_info --set --interface <ifname> --state <up|down>
53
+netmgr link_info --set --interface <ifname> --mtu <mtu>
54
+~~~~
55
+## ip4_address
56
+
57
+Get the IPv4 address for the specified interface.
58
+~~~~
59
+netmgr ip4_address --get --interface <ifname>
60
+~~~~
61
+Set the IPv4 address (dot-decimal/prefix notation), mode (dhcp, static, or none), and (optionally) the default gateway for the specified interface.
62
+~~~~
63
+netmgr ip4_address --set --interface <ifname> --mode <dhcp|static|none> --addr <ipv4_address/prefix> --gateway <gateway_address>
64
+~~~~
65
+## ip6_address
66
+
67
+Get IPv6 addresses for the specified interface.
68
+~~~~
69
+netmgr ip6_address --get --interface <ifname>
70
+~~~~
71
+Add one or more IPv6 addresses (comma-separated list in colon-separated/prefix notation) to the specified interface.
72
+~~~~
73
+netmgr ip6_address --add --interface <ifname> --addrlist <ipv6_addr1/prefix,ipv6_addr2/prefix,...>
74
+~~~~
75
+Delete one or more IPv6 addresses (comma-separated list in colon-separated/prefix notation) from the specified interface.
76
+~~~~
77
+netmgr ip6_address --del --interface <ifname> --addrlist <ipv6_addr1/prefix,ipv6_addr2/prefix,...>
78
+~~~~
79
+Set the IPv6 DHCP mode (1=enable, 0=disable) and IPv6 auto-configuration settings (1=enable, 0=disable) for the specified interface.
80
+~~~~
81
+netmgr ip6_address --set --interface <ifname> --dhcp <1|0> --autoconf <1|0>
82
+~~~~
83
+## ip_route
84
+
85
+Get the static IP route for the specified interface.
86
+~~~~
87
+netmgr ip_route --get --interface <ifname>
88
+~~~~
89
+Add the static IP route (gateway IP, destination network, and metric) to the specified interface.
90
+~~~~
91
+netmgr ip_route --add --interface <ifname> --gateway <gateway_address> --destination <destination_network/prefix> --metric <N>
92
+~~~~
93
+Delete the specified static IP route from the specified interface.
94
+~~~~
95
+netmgr ip_route --del --interface <ifname> --destination <destination_network/prefix>
96
+~~~~
97
+## dns_servers
98
+
99
+Get the list of DNS servers.
100
+~~~~
101
+netmgr dns_servers --get
102
+~~~~
103
+Set the DNS mode (DHCP or static) for one or more DNS servers (comma-separated list).
104
+~~~~
105
+netmgr dns_servers --set --mode <dhcp|static> --servers <server1,server2,...>
106
+~~~~
107
+Add a DNS server to the list of DNS servers.
108
+~~~~
109
+netmgr dns_servers --add --servers <server>
110
+~~~~
111
+Remove the specified DNS server from the list of DNS servers.
112
+~~~~
113
+netmgr dns_servers --del --servers <server>
114
+~~~~
115
+## dns_domains
116
+
117
+Get the list of DNS domains.
118
+~~~~
119
+netmgr dns_domains --get
120
+~~~~
121
+Set the list of DNS domains (one or more DNS domains in a comma-separated list).
122
+~~~~
123
+netmgr dns_domains --set --domains <domain1,domain2,...>
124
+~~~~
125
+Add a DNS domain to the list of DNS domains.
126
+~~~~
127
+netmgr dns_domains --add --domains <domain>
128
+~~~~
129
+Delete a DNS domain from the list of DNS domains.
130
+~~~~
131
+netmgr dns_domains --del --domains <domain>
132
+~~~~
133
+## dhcp_duid
134
+
135
+Get the DHCP DUID (optionally interface-specific DUID) for the system.
136
+~~~~
137
+netmgr dhcp_duid --get
138
+~~~~
139
+Set the DHCP DUID for the system, optionally per-interface if the interface is specified.
140
+~~~~
141
+netmgr dhcp_duid --set --duid <duid>
142
+~~~~
143
+## if_iaid
144
+
145
+Get the IAID for the specified interface.
146
+~~~~
147
+netmgr if_iaid --get --interface <ifname>
148
+~~~~
149
+Set the IAID for the specified interface.
150
+~~~~
151
+netmgr if_iaid --set --interface <ifname> --iaid <iaid>
152
+~~~~
153
+## ntp_servers
154
+
155
+Get the NTP servers list.
156
+~~~~
157
+netmgr ntp_servers --get
158
+~~~~
159
+Set the NTP servers list.
160
+~~~~
161
+netmgr ntp_servers --set --servers <server1,server2,...>
162
+~~~~
163
+Add the specified server to the NTP servers list.
164
+~~~~
165
+netmgr ntp_servers --add --servers <server>
166
+~~~~
167
+Delete the specified server from the NTP servers list.
168
+~~~~
169
+netmgr ntp_servers --del --servers <server>
170
+~~~~
171
+## hostname
172
+
173
+Get the system hostname.
174
+~~~~
175
+netmgr hostname --get
176
+~~~~
177
+Set the system hostname.
178
+~~~~
179
+netmgr hostname --set --name <hostname>
180
+~~~~
181
+## wait_for_link
182
+
183
+Wait for the specified network interface to be up and usable (it can send and receive packets).
184
+~~~~
185
+netmgr wait_for_link --interface <ifname> --timeout <timeout>
186
+~~~~
187
+The timeout (in seconds) specifies the maximum time to wait. Specify 0 for no timeout (wait indefinitely).
188
+
189
+**Note:** You might need to use wait_for_ip to wait until you can send and receive IP packets.
190
+
191
+## wait_for_ip
192
+
193
+Wait for the specified interface to acquire a valid IP address for the specified address type.
194
+~~~~
195
+netmgr wait_for_ip --interface <ifname> --timeout <timeout> --addrtype <ipv4,ipv6,static_ipv4,static_ipv6,dhcp_ipv4,dhcp_ipv6,auto_ipv6,link_local_ipv6>
196
+~~~~
197
+The timeout (in seconds) specifies the maximum time to wait. Specify 0 for no timeout (wait indefinitely).
198
+
199
+## error_info
200
+
201
+Get error information about the specified error code.
202
+~~~~
203
+netmgr error_info --errcode <error_code>
204
+~~~~
205
+Here is a list of error codes:
206
+
207
+- 4097 - invalid parameter
208
+- 4098 - not supported
209
+- 4099 - out of memory
210
+- 4100 - value not found
211
+- 4101 - value exists
212
+- 4102 - invalid interface
213
+- 4103 - invalid mode
214
+- 4104 - bad configuration file
215
+- 4105 - write failed
216
+- 4106 - timeout
217
+- 4107 - DCHP timeout
218
+
219
+## net_info
220
+
221
+Get the specified network configuration parameter for the specified object.
222
+~~~~
223
+netmgr net_info --get --object <ifname or filename> --paramname <param_name>
224
+~~~~
225
+**Note:** The object can be an interface name (for example, &quot;eth0&quot;) or a file name (for example, /etc/systemd/resolved.conf).
226
+
227
+Set the value of the specified network configuration parameter for the specified object (interface or file).
228
+~~~~
229
+netmgr net_info --set --object <ifname or filename> --paramname <param_name> --paramvalue <param_value>
230
+~~~~
231
+**Note** : You can add (+) or remove (-) a parameter by prepending the parameter name with + or -.
232
+
233
+For example, in order to add static IPv4 address "10.10.10.1/24" to eth0 interface, the following command adds this **Address** to the **Network** section of the **eth0** network configuration file.
234
+~~~~
235
+netmgr net_info --set --object eth0 --paramname +Network_Address --paramvalue "10.10.10.1/24"
236
+~~~~
237
+
238
+
0 239
new file mode 100644
... ...
@@ -0,0 +1,486 @@
0
+# Photon Management Daemon Command-line Interface (pmd-cli)
1
+
2
+Photon OS 2.0 provides the Photon Management Daemon command line interface (pmd-cli).
3
+
4
+- [Setup Steps](#setup-steps)
5
+- [Syntax](#syntax)
6
+- [Firewall Management](#firewall-management)
7
+- [Network Management](#network-management)
8
+- [Package Management](#package-management)
9
+- [User Management](#user-management)
10
+
11
+# Setup Steps
12
+
13
+The pmd-cli utility is included with your Photon OS 2.0 distribution. To make sure that you have the latest version, you can run:
14
+~~~~
15
+tdnf install pmd-cli
16
+~~~~
17
+# Syntax
18
+~~~~
19
+pmd-cli [connection_auth_options] <component> <command> [command_options]
20
+~~~~
21
+Passed-in parameter values can be enclosed in single (&#39;) or double-quotes (&quot;) as long as you use matching characters to denote the beginning and end of the value. Unless a parameter value contains special characters or spaces, you can also omit quotes altogether.
22
+
23
+## Connection / Authorization Options
24
+
25
+### Local Connections
26
+
27
+For local connections, you omit the connection and authorization options:
28
+~~~~
29
+pmd-cli <component> <cmd> <options>
30
+~~~~
31
+Permissions for the currently logged-in user apply when executing commands. This is the same as specifying --servername localhost.
32
+
33
+### Remote Connections
34
+
35
+For connecting to a remote server (a server other than the local server), you specify two connection / authorization options:
36
+
37
+- ``--servername``: name of the server
38
+- ``--user``: username of a user account on the server
39
+
40
+**Note:**  For authentication, you can specify the username (–user &lt;username&gt;) on the command line, but never the password. For security reasons, the system must prompt you for the password.
41
+
42
+What follows are three options for remote connections.
43
+
44
+**System User**
45
+~~~~
46
+pmd-cli --servername <server> --user <username>
47
+~~~~
48
+**Lightwave User**
49
+
50
+Before using this method, the pmd server must be joined or should be part of embedded Lightwave.
51
+~~~~
52
+pmd-cli --servername <server> --user <username> --domain <lightwave_domain>
53
+~~~~
54
+**Kerberos spn**
55
+
56
+Before using this method, the client must run kinit successfully.
57
+~~~~
58
+pmd-cli --servername <server> --spn <service_principal_name>
59
+~~~~
60
+## Component
61
+
62
+``<component>`` is one of the following values:
63
+
64
+- ``firewall``
65
+- ``net``
66
+- ``pkg``
67
+- ``usr``
68
+
69
+# Firewall Management
70
+
71
+The Photon Management Daemon provides CLI commands to help you get information about the firewall.
72
+
73
+## Syntax
74
+~~~~
75
+pmd-cli [connection_auth_options] firewall <command> [command_options]
76
+~~~~
77
+## firewall help
78
+
79
+Get help for firewall CLI commands.
80
+~~~~
81
+pmd-cli firewall help
82
+~~~~
83
+## firewall rules
84
+
85
+Get a list of the current persistent firewall rules.
86
+~~~~
87
+pmd-cli firewall rules [command-options]
88
+~~~~
89
+This command returns information about each firewall rule, such as the chain to which it belongs, the policy to enforce, the table to manipulate, and so on.
90
+
91
+Add a new firewall rule.
92
+~~~~
93
+pmd-cli firewall rules --chain <chain_name> --add <rule_specification>
94
+~~~~
95
+Example:
96
+~~~~
97
+pmd-cli firewall rules --chain INPUT --add "-p tcp -m tcp --dport 21 -j ACCEPT"
98
+~~~~
99
+**Note:** To confirm that the firewall rule was added, run iptables -S. Running pmd-cli firewall rules lists only persistent rules.
100
+
101
+Delete a new firewall rule.
102
+~~~~
103
+pmd-cli firewall rules --chain <chain_name> --delete <rule_specification>
104
+~~~~
105
+**Note:**  To confirm that the firewall rule was removed, run iptables -S. Running pmd-cli firewall rules lists only persistent rules.
106
+
107
+Make firewall rule changes peristent (add --persist flag)
108
+~~~~
109
+pmd-cli firewall rules --chain <chain_name> --add <rule_specification> --persist
110
+~~~~
111
+
112
+## firewall version
113
+
114
+Get the version number of the fwmgmt component on the server.
115
+~~~~
116
+pmd-cli firewall version
117
+~~~~
118
+# Network Management
119
+
120
+The Photon Management Daemon provides CLI commands to help you manage network interfaces.
121
+
122
+## Syntax
123
+~~~~
124
+pmd-cli [connection_auth_options] net <command> [command_options]
125
+~~~~
126
+Many of these commands require the interface name (–interface &lt;ifname&gt;). Command options are described below.
127
+
128
+## net link_info
129
+
130
+Get the mac address, mtu, link state, and link mode for the specified interface.
131
+~~~~
132
+pmd-cli net link_info --get --interface <ifname>
133
+~~~~
134
+Set the MAC address, mode (manual or auto), link state (up or down), link mode (manual or auto), and MTU for the specified interface.
135
+~~~~
136
+pmd-cli net link_info --set --interface <ifname> --macaddr <mac_address> --mode <manual|auto> --state <up|down> --mtu <mtu>
137
+~~~~
138
+## net ip4_address
139
+
140
+Get the IPv4 address for the specified interface.
141
+~~~~
142
+pmd-cli net ip4_address --get --interface <ifname>
143
+~~~~
144
+Set the IPv4 address (dot-decimal/prefix notation), mode (dhcp, static, or none), and (optionally) the default gateway for the specified interface.
145
+~~~~
146
+pmd-cli net ip4_address --set --interface <ifname> --mode <dhcp|static|none> --addr <IPv4Address/prefix> --gateway <gateway_address>
147
+~~~~
148
+## net ip6_address
149
+
150
+Get IPv6 address(es) for the specified interface.
151
+~~~~
152
+pmd-cli net ip6_address --get --interface <ifname>
153
+~~~~
154
+Add one or more IPv6 addresses (comma-separated list in colon-separated/prefix notation) to the specified interface.
155
+~~~~
156
+pmd-cli net ip6_address --add --interface <ifname> --addrlist <IPv6Addr1/prefix,IPv6Addr2/prefix,...>
157
+~~~~
158
+Delete one or more IPv6 addresses (comma-separated list in colon-separated/prefix notation) from the specified interface.
159
+~~~~
160
+pmd-cli net ip6_address --del --interface <ifname> --addrlist <IPv6Addr1/prefix,IPv6Addr2/prefix,...>
161
+~~~~
162
+Set the DHCP mode (1=enable, 0=disable) and autoconfigure settings (1=enable, 0=disable) for the specified interface.
163
+~~~~
164
+pmd-cli net ip6_address --set --interface <ifname> --dhcp <1|0> --autoconf <1|0>
165
+~~~~
166
+## net ip_route
167
+
168
+Get the static IP route for the specified interface.
169
+~~~~
170
+pmd-cli net ip_route --get --interface <ifname>
171
+~~~~
172
+Add the static IP route (gateway IP, destination network, and metric) to the specified interface.
173
+~~~~
174
+pmd-cli net ip_route --add --interface <ifname> --gateway <GatewayIP> --destination <DestinationNetwork/prefix> --metric <N>
175
+~~~~
176
+Delete the specified static IP route from the specified interface.
177
+~~~~
178
+pmd-cli net ip_route --del --interface <ifname> --destination <DestinationNetwork/prefix>
179
+~~~~
180
+## net dns_servers
181
+
182
+Get the list of DNS servers.
183
+~~~~
184
+pmd-cli net dns_servers --get
185
+~~~~
186
+Set the DNS mode (dhcp or static) for one or more DNS servers (comma-separated list).
187
+~~~~
188
+pmd-cli net dns_servers --set --mode <dhcp|static> --servers <server1,server2,...>
189
+~~~~
190
+Add a DNS server to the list of DNS servers.
191
+~~~~
192
+pmd-cli net dns_servers --add --servers <server>
193
+~~~~
194
+Remove the specified DNS server from the list of DNS servers.
195
+~~~~
196
+pmd-cli net dns_servers --del --servers <server>
197
+~~~~
198
+## net dns_domains
199
+
200
+Get the list of DNS domains.
201
+~~~~
202
+pmd-cli net dns_domains --get
203
+~~~~
204
+Set the list of DNS domains (one or more DNS domains in a comma-separated list).
205
+~~~~
206
+pmd-cli net dns_domains --set --domains <domain1,domain2,...>
207
+~~~~
208
+Add a DNS domain to the list of DNS domains.
209
+~~~~
210
+pmd-cli net dns_domains --add --domains <domain1>
211
+~~~~
212
+Delete a DNS domain from the list of DNS domains.
213
+~~~~
214
+pmd-cli net dns_domains --del --domains <domain1>
215
+~~~~
216
+## net dhcp_duid
217
+
218
+Get the DHCP DUID (optionally interface-specific DUID) for the system.
219
+~~~~
220
+pmd-cli net dhcp_duid --get
221
+~~~~
222
+Set the DHCP DUID for the system, optionally per-interface if the interface is specified.
223
+~~~~
224
+pmd-cli net dhcp_duid --set --duid <duid>
225
+~~~~
226
+## net if_iaid
227
+
228
+Get the IAID for the specified interface.
229
+~~~~
230
+pmd-cli net if_iaid --get --interface <ifname>
231
+~~~~
232
+Set the IAID for the specified interface.
233
+~~~~
234
+pmd-cli net if_iaid --set --interface <ifname> --iaid <iaid>
235
+~~~~
236
+## net ntp_servers
237
+
238
+Get the NTP servers list.
239
+~~~~
240
+pmd-cli net ntp_servers --get
241
+~~~~
242
+Set the NTP servers list.
243
+~~~~
244
+pmd-cli net ntp_servers --set --servers <server1,server2,...>
245
+~~~~
246
+Add the specified server to the NTP servers list.
247
+~~~~
248
+pmd-cli net ntp_servers --add --servers <server>
249
+~~~~
250
+Delete the specified server from the NTP servers list.
251
+~~~~
252
+pmd-cli net ntp_servers --del --servers <server>
253
+~~~~
254
+## net hostname
255
+
256
+Get the system hostname.
257
+~~~~
258
+pmd-cli net hostname --get
259
+~~~~
260
+Set the system hostname.
261
+~~~~
262
+pmd-cli net hostname --set --name <hostname>
263
+~~~~
264
+## net wait_for_link
265
+
266
+Wait for the specified network interface to be up and usable (it can send and receive packets).
267
+~~~~
268
+pmd-cli net wait_for_link --interface <ifname> --timeout <timeout>
269
+~~~~
270
+The timeout (in seconds) specifies the maximum time to wait. Specify 0 for no timeout (wait indefinitely).
271
+
272
+**Note:** You might need to use net wait_for_ip to wait until you can send and receive IP packets.
273
+
274
+## net wait_for_ip
275
+
276
+Wait for the specified interface to acquire a valid IP address for the specified address type.
277
+~~~~
278
+pmd-cli net wait_for_ip --interface <ifname> --timeout <timeout> --addrtype <ipv4,ipv6,static_ipv4,static_ipv6,dhcp_ipv4,dhcp_ipv6,auto_ipv6,link_local_ipv6>
279
+~~~~
280
+The timeout (in seconds) specifies the maximum time to wait. Specify 0 for no timeout (wait indefinitely).
281
+
282
+## net error_info
283
+
284
+Get error information about the specified error code.
285
+~~~~
286
+pmd-cli net error_info --errcode <error_code>
287
+~~~~
288
+Here is a list of error codes:
289
+
290
+- 4097 - invalid parameter
291
+- 4098 - not supported
292
+- 4099 - out of memory
293
+- 4100 - value not found
294
+- 4101 - value exists
295
+- 4102 - invalid interface
296
+- 4103 - invalid mode
297
+- 4104 - bad configuration file
298
+- 4105 - write failed
299
+- 4106 - timout
300
+- 4107 - DCHP timeout
301
+
302
+## net net_info
303
+
304
+Get the specified network configuration parameter for the specified object.
305
+~~~~
306
+pmd-cli net net_info --get --object <ifname or filename> --paramname <param_name>
307
+~~~~
308
+**Note:** The object can be an interface name (for example, &quot;eth0&quot;) or a file name (for example, /etc/systemd/resolved.conf).
309
+
310
+Set the value of the specified network configuration parameter for the specified object (interface or file).
311
+~~~~
312
+pmd-cli net net_info --set --object <ifname or filename> --paramname <param_name> --paramvalue <param_value>
313
+~~~~
314
+**Note** : You can add (+) or remove (-) a parameter by prepending the parameter name with + or -.
315
+
316
+# Package Management
317
+
318
+The Photon Management Daemon provides CLI commands to help you manage packages and repositories.
319
+
320
+## Syntax
321
+~~~~
322
+pmd-cli [connection options] pkg <command> [command options]
323
+~~~~
324
+If a command allows for multiple package names, simply specify on the command line, separated by spaces.
325
+~~~~
326
+pmd-cli pkg info <package_name_1> <package_name_2> <package_name_3> ...
327
+~~~~
328
+## pkg help
329
+
330
+Get help text for pkg CLI commands.
331
+~~~~
332
+pmd-cli pkg help
333
+~~~~
334
+## pkg count
335
+
336
+Get the total number of packages in all repos (including installed).
337
+~~~~
338
+pmd-cli pkg count
339
+~~~~
340
+## pkg distro-sync
341
+
342
+Synchronize installed packages to the latest available versions. If no packages are specified, then all available packages are synchronized.
343
+~~~~
344
+pmd-cli pkg distro-sync
345
+~~~~
346
+## pkg downgrade
347
+
348
+Downgrade the specified package(s). If no packages are specified, then all available packages are downgraded.
349
+~~~~
350
+pmd-cli pkg downgrade <package_name>
351
+~~~~
352
+## pkg erase
353
+
354
+Remove the specified package(s).
355
+~~~~
356
+pmd-cli pkg erase <package_name>
357
+~~~~
358
+## pkg info
359
+
360
+Get general information about the specified package(s),  such as name, version, release, repository, install size, and so on.
361
+~~~~
362
+pmd-cli pkg info <package_name>
363
+~~~~
364
+If no packages are specified, then this command returns information about all packages.
365
+~~~~
366
+## pkg install
367
+~~~~
368
+Install the specified package(s). Update the package if an update is available.
369
+~~~~
370
+pmd-cli pkg install <package_name>
371
+~~~~
372
+## pkg list
373
+
374
+Get a list of packages or groups of packages.
375
+~~~~
376
+pmd-cli pkg list
377
+~~~~
378
+You can filter by group: all, available, installed, extras, obsoletes, recent, and upgrades.
379
+~~~~
380
+pmd-cli pkg list upgrades
381
+~~~~
382
+You can also filter by wildcards.
383
+~~~~
384
+pmd-cli pkg list ph\*
385
+~~~~
386
+## pkg reinstall
387
+
388
+Reinstall the specified package(s).
389
+~~~~
390
+pmd-cli pkg reinstall <package_name>
391
+~~~~
392
+## pkg repolist
393
+
394
+Get a list of the configured software repositories.
395
+~~~~
396
+pmd-cli pkg repolist
397
+~~~~
398
+This command returns a list of the configured software repositories, including the repository ID, repitory name, and status.
399
+
400
+## pkg update
401
+
402
+Update the specified package(s).
403
+~~~~
404
+pmd-cli pkg update <package_name>
405
+~~~~
406
+If no parameters are specified, then all available packages are updated.
407
+
408
+## pkg updateinfo
409
+
410
+Get the update information on all enabled repositories (status = enabled). If this command returns nothing, then the update information may not exist on the server.
411
+~~~~
412
+pmd-cli pkg updateinfo
413
+~~~~
414
+# User Management
415
+
416
+The Photon Management Daemon provides CLI commands to help you manage users and user groups.
417
+
418
+## Syntax
419
+~~~~
420
+pmd-cli [connection options] usr <command> [command options]
421
+~~~~
422
+## usr help
423
+
424
+Display help text for user commands.
425
+~~~~
426
+pmd-cli usr users
427
+~~~~
428
+## usr users
429
+
430
+Get a list of users. This command returns information about each user, including their user name, user ID, user group (if applicable), home directory, and default shell.
431
+~~~~
432
+pmd-cli usr users
433
+~~~~
434
+## usr useradd
435
+
436
+Add a new user. Specify the username.
437
+~~~~
438
+pmd-cli usr useradd <username>
439
+~~~~
440
+The system assigns a user ID, home directory, and default shell to the new user. The user group is unspecified.
441
+
442
+## usr userdel
443
+
444
+Delete the specified user.
445
+~~~~
446
+pmd-cli usr userdel <username>
447
+~~~~
448
+## usr userid
449
+
450
+Get the user ID of the specified user (by name). Used to determine whether the specified user exists.
451
+~~~~
452
+pmd-cli usr userid <username>
453
+~~~~
454
+## usr groups
455
+
456
+Get a list of user groups. This command returns the following information about each user group: user group name and user group ID.
457
+~~~~
458
+pmd-cli usr groups
459
+~~~~
460
+## usr groupadd
461
+
462
+Add a new user group.
463
+~~~~
464
+pmd-cli usr groupadd <user_group_name>
465
+~~~~
466
+The system assigns a group ID to the new user group.
467
+
468
+## usr groupdel
469
+
470
+Delete the specified user group.
471
+~~~~
472
+pmd-cli usr groupdel <user_group_name>
473
+~~~~
474
+## usr groupid
475
+
476
+Get the group ID for the specified user group (by name). Used to determine whether the specified user group exists.
477
+~~~~
478
+pmd-cli usr groupid <user_group_name>
479
+~~~~
480
+## usr version
481
+
482
+Get the version of the usermgmt component at the server.
483
+~~~~
484
+pmd-cli usr version
485
+~~~~
0 486
new file mode 100644
... ...
@@ -0,0 +1,8 @@
0
+# Photon Management Daemon
1
+
2
+The Photon Management Daemon (PMD) that ships with Photon OS 2.0 provides the remote management of a Photon instance via several APIs: a command line client (pmd-cli), a REST API, and a Python API. The PMD provides the ability to manage network interfaces, packages, firewalls, users, and user groups.
3
+
4
+- [Installing the pmd Package](installing_pmd_packages.md)
5
+- [Available APIs](available_apis.md)
6
+
7
+
0 8
new file mode 100644
... ...
@@ -0,0 +1,7 @@
0
+# Quick Start Links
1
+
2
+If you want to start using Photon OS straight away, see the following topics:
3
+
4
+- [Overview](Overview.md)
5
+- [Downloading Photon OS](photon_installation/Downloading-Photon-OS.md)
6
+- [Build an ISO from the source code for Photon OS](photon_installation/build-photon.md)
0 7
\ No newline at end of file
1 8
new file mode 100644
... ...
@@ -0,0 +1,21 @@
0
+# Troubleshooting Guide
1
+
2
+The Photon OS *Troubleshooting Guide* provides solutions for common problems that you might encounter while using Photon OS.
3
+
4
+**Product version: 3.0**
5
+
6
+This documentation applies to all 3.0.x releases.
7
+
8
+## Intended Audiences
9
+
10
+This information is intended for Photon OS administrators who install and set up Photon OS.
11
+
12
+----------
13
+
14
+Copyright &copy; 2016-2018 VMware, Inc. All rights reserved. [Copyright and trademark information](http://pubs.vmware.com/copyright-trademark.html). Any feedback you provide to VMware is subject to the terms at [www.vmware.com/community_terms.html](http://www.vmware.com/community_terms.html).
15
+
16
+**VMware, Inc.**<br>
17
+3401 Hillview Ave.<br>
18
+Palo Alto, CA 94304
19
+
20
+[www.vmware.com](http://www.vmware.com)
0 21
new file mode 100644
... ...
@@ -0,0 +1,1683 @@
0
+# Troubleshooting Guide
1
+
2
+- [Toubleshooting Guide](README.md)
3
+    -    [Introduction](#introduction)
4
+        -   [Systemd and TDNF](#systemd-and-tdnf)
5
+        -   [The Root Account and the `sudo` and `su`
6
+            Commands](#the-root-account-and-the-sudo-and-su-commands)
7
+        -   [Checking the Version and Build
8
+            Number](#checking-the-version-and-build-number)
9
+        -   [General Best Practices](#general-best-practices)
10
+        -   [Logs on Photon OS](#logs-on-photon-os)
11
+        -   [Troubleshooting Progression](#troubleshooting-progression)
12
+    -   [Solutions to Common Problems](#solutions-to-common-problems)
13
+        -   [Resetting a Lost Root
14
+            Password](#resetting-a-lost-root-password)
15
+        -   [Fixing Permissions on Network Config
16
+            Files](#fixing-permissions-on-network-config-files)
17
+        -   [Permitting Root Login with
18
+            SSH](#permitting-root-login-with-ssh)
19
+        -   [Fixing Sendmail If Installed Before an FQDN Was
20
+            Set](#fixing-sendmail-if-installed-before-an-fqdn-was-set)
21
+    -   [Common Troubleshooting Tools on Photon
22
+        OS](#common-troubleshooting-tools-on-photon-os)
23
+        -   [Top](#top)
24
+        -   [ps](#ps)
25
+        -   [netstat](#netstat)
26
+        -   [find](#find)
27
+        -   [Locate](#locate)
28
+        -   [df](#df)
29
+        -   [md5sum and sha256sum](#md5sum-and-sha256sum)
30
+        -   [strace](#strace)
31
+        -   [file](#file)
32
+        -   [stat](#stat)
33
+        -   [watch](#watch)
34
+        -   [vmstat and fdisk](#vmstat-and-fdisk)
35
+        -   [lsof](#lsof)
36
+        -   [fuser](#fuser)
37
+        -   [ldd](#ldd)
38
+        -   [gdb](#gdb)
39
+        -   [Other Troubleshooting Tools Installed by
40
+            Default](#other-troubleshooting-tools-installed-by-default)
41
+        -   [Installing More Tools from
42
+            Repositories](#installing-more-tools-from-repositories)
43
+        -   [Linux Troubleshooting Tools Not on Photon
44
+            OS](#linux-troubleshooting-tools-not-on-photon-os)
45
+    -   [Systemd](#systemd)
46
+        -   [Viewing Services](#viewing-services)
47
+        -   [Using Systemd Commands Instead of Init.d
48
+            Commands](#using-systemd-commands-instead-of-init.d-commands)
49
+        -   [Analyzing System Logs with
50
+            journalctl](#analyzing-system-logs-with-journalctl)
51
+        -   [Inspecting Services with
52
+            `systemd-analyze`](#inspecting-services-with-systemd-analyze)
53
+    -   [Networking](#networking)
54
+        -   [Managing the Network
55
+            Configuration](#managing-the-network-configuration)
56
+        -   [Use `ip` and `ss` Commands Instead of `ifconfig` and
57
+            `netstat`](#use-ip-and-ss-commands-instead-of-ifconfig-and-netstat)
58
+        -   [Inspecting the Status of Network Links with
59
+            `networkctl`](#inspecting-the-status-of-network-links-with-networkctl)
60
+        -   [Turning on Network
61
+            Debugging](#turning-on-network-debugging)
62
+        -   [Installing the Packages for tcpdump and netcat with
63
+            tdnf](#installing-the-packages-for-tcpdump-and-netcat-with-tdnf)
64
+        -   [Checking Firewall Rules](#checking-firewall-rules)
65
+        -   [Netmgr](#netmgr)
66
+    -   [File System](#file-system)
67
+        -   [Checking Disk Space](#checking-disk-space)
68
+        -   [Adding a Disk and Partitioning
69
+            It](#adding-a-disk-and-partitioning-it)
70
+        -   [Expanding Disk Partition](#expanding-disk-partition)
71
+        -   [fdisk](#fdisk)
72
+        -   [fsck](#fsck)
73
+        -   [Fixing File System Errors When fsck
74
+            Fails](#fixing-file-system-errors-when-fsck-fails)
75
+    -   [Packages](#packages)
76
+    -   [Kernel Problems and Boot and Login
77
+        Problems](#kernel-problems-and-boot-and-login-problems)
78
+        -   [Kernel Overview](#kernel-overview)
79
+        -   [Boot Process Overview](#boot-process-overview)
80
+        -   [Blank Screen on Reboot](#blank-screen-on-reboot)
81
+        -   [Investigating Strange
82
+            Behavior](#investigating-strange-behavior)
83
+        -   [Investigating the Guest Kernel When You Cannot Log
84
+            On](#investigating-the-guest-kernel-when-you-cannot-log-on)
85
+        -   [Kernel Log Replication with
86
+            VProbes](#kernel-log-replication-with-vprobes)
87
+    -   [Performance Issues](#performance-issues)
88
+
89
+
90
+
91
+## Introduction 
92
+
93
+This guide describes the fundamentals of troubleshooting problems on Photon OS. An open-source minimalist Linux operating system from VMware, Photon OS is optimized for cloud computing platforms, VMware vSphere deployments, virtual appliances, and applications native to the cloud.
94
+
95
+This guide covers the basics of troubleshooting systemd, packages, network interfaces, services such as SSH and Sendmail, the file system, and the Linux kernel. The guide includes a quick tour of the tools that you can use for troubleshooting and provides examples along the way. The guide also demonstrates how to access the system's log files. 
96
+
97
+For information on how to install and manage Photon OS, see the [Photon OS Administration Guide](https://github.com/vmware/photon/blob/master/docs/photon-admin-guide.md).
98
+
99
+### Systemd and TDNF
100
+
101
+Two characteristics of Photon OS stand out: It manages services with systemd, and it manages packages with its own open source, yum-compatible package manager called tdnf, for Tiny DNF. 
102
+
103
+By using systemd, Photon OS adopts a contemporary Linux standard to bootstrap the user space and concurrently start services--an architecture that differs from traditional Linux systems such as SUSE Linux Enterprise Server 11.
104
+
105
+<!-- [[Image:photon-logo.png|right]] --> 
106
+
107
+A traditional Linux system contains an initialization system called SysVinit. With SLES 11, for instance, SysVinit-style init programs control how the system starts up and shuts down. Init implements system runlevels. A SysVinit runlevel defines a state in which a process or service runs. In contrast to a SysVinit system, systemd defines no such runlevels. Instead, systemd uses a dependency tree of _targets_ to determine which services to start when.
108
+
109
+Because the systemd commands differ from those of an init.d-based Linux system, a section later in this guide illustrates how to troubleshoot by using systemctl commands instead of init.d-style commands. 
110
+
111
+Tdnf keeps the operating system as small as possible while preserving yum's robust package-management capabilities. On Photon OS, tdnf is the default package manager for installing new packages. Since troubleshooting with tdnf differs from using yum, a later section of this guide describes how to solve problems with packages and repositories by using tdnf commands.
112
+
113
+### The Root Account and the `sudo` and `su` Commands
114
+
115
+This guide assumes that you are logged in to Photon OS with the root account and running commands as root. The sudo program comes with the full version of Photon OS. On the minimal version, you must install sudo with tdnf if you want to use it. As an alternative to installing sudo on the minimal version, you can switch users as needed with the `su` command to run commands that require root privileges.
116
+
117
+### Checking the Version and Build Number
118
+
119
+To check the version and build number of Photon OS, concatenate `/etc/photon-release`. Example: 
120
+
121
+	cat /etc/photon-release
122
+	VMware Photon Linux 1.0
123
+	PHOTON_BUILD_NUMBER=a6f0f63
124
+
125
+The build number in the results maps to the commit number on the VMware Photon OS GitHub [commits page](https://github.com/vmware/photon/commits/master).
126
+
127
+### General Best Practices
128
+
129
+When troubleshooting, you should follow some general best practices:
130
+
131
+* **Take a snapshot.** Before you do anything to a virtual machine running Photon OS, take a snapshot of the VM so that you can restore it if need be. 
132
+
133
+* **Make a backup copy.** Before you change a configuration file, make a copy of the original in case you need to restore it later; example: `cp /etc/tdnf/tdnf.conf /etc/tdnf/tdnf.conf.orig`
134
+
135
+* **Collect logs.** Save the log files associated with a Photon OS problem; you or others might need them later. Include not only the log files on the guest but also the `vmware.log` file on the host; `vmware.log` is in the host's directory that contains the VM.
136
+
137
+* **Know what's in your toolbox.** Glance at the man page for a tool before you use it so that you know what your options are. The options can help focus the command's output on the problem you're trying to solve.
138
+
139
+* **Understand the system.** The more you know about the operating system and how it works, the better you can troubleshoot.
140
+
141
+### Logs on Photon OS
142
+
143
+On Photon OS, all the system logs except the installation log and the cloud-init log are written into the systemd journal. The `journalctl` command queries the contents of the systemd journal.
144
+
145
+The installation log files and the cloud-init log files reside in `/var/log`. If Photon OS is running on a virtual machine in a VMware hypervisor, the log file for the VMware tools (vmware-vmsvc.log) also resides in `/var/log`. 
146
+
147
+### Troubleshooting Progression
148
+
149
+If you encounter a problem running an application or appliance on Photon OS and you suspect it involves the operating system, you can troubleshoot by proceeding as follows. 
150
+
151
+First, check the services running on Photon OS:
152
+
153
+	systemctl status
154
+
155
+Second, check your application's log files for clues. (For VMware applications, see [Location of Log Files for VMware Products](https://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1021806).)
156
+
157
+Third, check the service controller or service monitor for your application or appliance. 
158
+
159
+Fourth, check the network interfaces and other aspects of the network service with `systemd-network` commands.
160
+
161
+Fifth, check the operating system's log files: 
162
+
163
+	journalctl
164
+
165
+Next, run the following commands to view all services according to the order in which they were started:
166
+
167
+	systemd-analyze critical-chain 
168
+
169
+Finally, if the previous steps have not revealed enough information to isolate the problem, turn to the troubleshooting tool that you think is most likely to help with the issue at hand. You could, for example, use `strace` to identify the location of the failure. See the list of troubleshooting tools on Photon OS in a later section. 
170
+
171
+## Solutions to Common Problems
172
+
173
+This section describes solutions to problems that you're likely to encounter.
174
+
175
+### Resetting a Lost Root Password
176
+
177
+Here's how to reset a lost root password. 
178
+
179
+First, restart the Photon OS machine or the virtual machine running Photon OS. When the Photon OS splash screen appears as it restarts, type the letter `e` to go to the GNU GRUB edit menu. Be quick about it: Because Photon OS reboots so quickly, you won't have much time to type `e`. Remember that in vSphere and Workstation, you might have to give the console focus by clicking in its window before it will register input from the keyboard. 
180
+
181
+Second, in the GNU GRUB edit menu, go to the end of the line that starts with `linux`, add a space, and then add the following code exactly as it appears below:
182
+
183
+	rw init=/bin/bash
184
+
185
+After you add this code, the GNU GRUB edit menu should look exactly like this:
186
+
187
+![The modified GNU GRUB edit menu](images/grub-edit-menu-changepw.png) 
188
+
189
+Now type `F10`.
190
+
191
+At the command prompt, type `passwd` and then type (and re-enter) a new root password that conforms to the password complexity rules of Photon OS. Remember the password. 
192
+
193
+Next, type the following command:
194
+
195
+	umount /
196
+
197
+Finally, type the following command. You must include the `-f` option to force a reboot; otherwise, the kernel enters a state of panic.
198
+
199
+	reboot -f
200
+
201
+This sequence of commands should look like this:
202
+
203
+![The series of commands to reset the root password](images/resetpw.png)
204
+
205
+After the Photon OS machine reboots, log in with the new root password. 
206
+
207
+### Fixing Permissions on Network Config Files
208
+
209
+If you, as the root user, create a new network configuration file on Photon OS, the network service might be unable to process it until you set the file's mode bits to `644`.
210
+
211
+If you query the journal with `journalctl -u systemd-networkd`, you might see the following error message along with an indication that the network service did not start: 
212
+
213
+	could not load configuration files. permission denied
214
+
215
+The permissions on the network files are the likely cause of this problem. Without the correct permissions, networkd-systemd cannot parse and apply the settings, and the network configuration that you created will not be loaded. 
216
+
217
+After you create a network configuration file with a `.network` extension, you must run the `chmod` command to set the new file's mode bits to `644`. Example: 
218
+
219
+    chmod 644 10-static-en.network
220
+
221
+For Photon OS to apply the new configuration, you must restart the `systemd-networkd` service by running the following command: 
222
+
223
+	systemctl restart systemd-networkd
224
+
225
+###	Permitting Root Login with SSH
226
+
227
+The full version of Photon OS prevents root login with SSH by default. To permit root login over SSH, open `/etc/ssh/sshd_config` with the vim text editor and set `PermitRootLogin` to `yes`. 
228
+
229
+Vim is the default text editor available in both the full and minimal versions of Photon OS. (Nano is also in the full version.) After you modify the SSH daemon's configuration file, you must restart the sshd daemon for the changes to take effect. Example: 
230
+
231
+	vim /etc/ssh/sshd_config
232
+
233
+	# override default of no subsystems
234
+	Subsystem       sftp    /usr/libexec/sftp-server
235
+
236
+	# Example of overriding settings on a per-user basis
237
+	#Match User anoncvs
238
+	#       X11Forwarding no
239
+	#       AllowTcpForwarding no
240
+	#       PermitTTY no
241
+	#       ForceCommand cvs server
242
+	PermitRootLogin yes
243
+	UsePAM yes
244
+
245
+Save your changes in vim and then restart the sshd daemon: 
246
+
247
+	systemctl restart sshd
248
+
249
+You can then connect to the Photon OS machine with the root account over SSH:
250
+
251
+	steve@ubuntu:~$ ssh root@198.51.100.131
252
+
253
+### Fixing Sendmail If Installed Before an FQDN Was Set
254
+
255
+If Sendmail is behaving improperly or if it hangs during installation, it is likely that an FQDN is not set. Take the following corrective action. 
256
+
257
+First, set an FQDN for your Photon OS machine. 
258
+
259
+Then, run the following commands in the order below: 
260
+
261
+    echo $(hostname -f) > /etc/mail/local-host-names
262
+    
263
+    cat > /etc/mail/aliases << "EOF"
264
+        postmaster: root
265
+        MAILER-DAEMON: root
266
+        EOF
267
+
268
+    /bin/newaliases
269
+
270
+    cd /etc/mail
271
+
272
+    m4 m4/cf.m4 sendmail.mc > sendmail.cf
273
+
274
+    chmod 700 /var/spool/clientmqueue
275
+
276
+    chown smmsp:smmsp /var/spool/clientmqueue
277
+
278
+## Common Troubleshooting Tools on Photon OS
279
+
280
+This section describes tools that can help troubleshoot problems. These tools are installed by default on the full version of Photon OS. On the minimal version of Photon OS, you may have to install a tool before you can use it. 
281
+
282
+There is a manual, or man page, on Photon OS for all the tools covered in this section. The man pages provide more information about each tool's commands, options, and output. To view a tool's man page, on the Photon OS command line, type `man` and then the name of the tool. Example: 
283
+
284
+	man strace
285
+
286
+Some of the examples in this section are marked as abridged with ellipsis (`...`).
287
+
288
+### Top
289
+
290
+Photon OS includes the Top tool to monitor system resources, workloads, and performance. It can unmask problems caused by processes or applications overconsuming CPUs, time, or RAM. 
291
+
292
+To view a textual display of resource consumption, run the `top` command: 
293
+
294
+	top
295
+
296
+In Top, you can kill a runaway or stalled process by typing `k` followed by its process ID (PID). 
297
+
298
+![Top on Photon OS](images/top-in-photon-os.png)
299
+
300
+If the percent of CPU utilization is consistently high with little idle time, there might be a runaway process overconsuming CPUs. Restarting the service might solve the problem. 
301
+
302
+A handy trick while troubleshooting an unknown issue is to run Top in the background by using batch mode to write its output to a file in order to collect data about performance:
303
+
304
+	top d 120 b >> top120second.output
305
+
306
+For a list of options that filter top output and other information, see the man page for Top.
307
+
308
+### ps
309
+
310
+The `ps` tool shows the processes running on the machine. The `ps` tool derives flexibility and power from its options, all of which are covered in the tool's Photon OS man page:
311
+
312
+	man ps
313
+
314
+Here are several popular invocations of `ps` for troubleshooting. 
315
+
316
+Show processes by user: 
317
+
318
+	ps aux
319
+
320
+Show processes and child processes by user: 
321
+
322
+	ps auxf
323
+
324
+Show processes containing the string `ssh`:
325
+
326
+	ps aux | grep ssh
327
+
328
+Show processes and the command and options with which they were started: 
329
+
330
+	ps auxww
331
+
332
+Example abridged output: 
333
+
334
+	ps auxww
335
+	USER        PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
336
+	root          1  0.0  0.9  32724  3300 ?        Ss   07:51   0:32 /lib/systemd/systemd --switched-root --system --deserialize 22
337
+
338
+### netstat
339
+
340
+The `netstat` command can identify bottlenecks causing  performance issues. It lists network connections, listening sockets, port information, and interface statistics for different protocols. Examples: 
341
+
342
+	netstat --statistics
343
+	netstat --listening
344
+
345
+### find
346
+
347
+The `find` command can be a useful starting point to troubleshoot a Photon OS machine that has stopped working. The following command, for example, lists the files in the root directory that have changed in the past day: 
348
+
349
+		find / -mtime -1 
350
+
351
+See the `find` [manual](See https://www.gnu.org/software/findutils/manual/find.html). Take note of the security considerations listed in the `find` manual if you are using `find` to troubleshoot an appliance running on Photon OS. 
352
+
353
+### Locate
354
+
355
+The `locate` command is a fast way to find files and directories when all you have is a keyword. Similar to `find` and part of the same `findutils` package preinstalled on the full version of Photon OS by default, the `locate` command finds file names in the file names database. Before you can use `locate` accurately, you should update its database: 
356
+
357
+	updatedb
358
+
359
+Then you can run `locate` to quickly find a file, such as any file name containing `.network`, which can be helpful to see all the system's `.network` configuration files; abridged example: 
360
+
361
+	locate .network
362
+	/etc/dbus-1/system.d/org.freedesktop.network1.conf
363
+	/etc/systemd/network/10-dhcp-en.network
364
+	/usr/lib/systemd/network/80-container-host0.network
365
+	/usr/lib/systemd/network/80-container-ve.network
366
+	/usr/lib/systemd/system/busnames.target.wants/org.freedesktop.network1.busname
367
+	/usr/lib/systemd/system/dbus-org.freedesktop.network1.service
368
+	/usr/lib/systemd/system/org.freedesktop.network1.busnname
369
+	/usr/share/dbus-1/system-services/org.freedesktop.network1.service
370
+
371
+The `locate` command is also a quick way to see whether a troubleshooting tool is installed on Photon OS. Examples: 
372
+
373
+	locate strace
374
+	/usr/bin/strace
375
+	/usr/bin/strace-graph
376
+	/usr/bin/strace-log-merge
377
+	/usr/share/man/man1/strace.1.gz
378
+	/usr/share/vim/vim74/syntax/strace.vim
379
+
380
+	locate traceroute
381
+
382
+The `strace` tool is there but `traceroute` is not. You can, however, quickly install `traceroute` from the Photon OS repository: 
383
+
384
+	tdnf install traceroute
385
+
386
+
387
+### df
388
+
389
+The `df` command reports the disk space available on the file system. Because running out of disk space can lead an application to fail, a quick check of the available space makes sense as an early troubleshooting step: 
390
+
391
+	df -h
392
+
393
+The `-h` option prints out the available and used space in human-readable sizes. After checking the space, you should also check the number of available inodes. Too few available inodes can lead to difficult-to-diagnose problems:
394
+
395
+	df -i
396
+
397
+### md5sum and sha256sum
398
+
399
+`md5sum` calculates 128-bit MD5 hashes--a message digest, or digital signature, of a file--to uniquely identify a file and verify its integrity after file transfers, downloads, or disk errors when the security of the file is not in question. Photon OS also includes `sha256sum`, which is the preferred method of calculating the authenticity of a file to prevent tampering when security is a concern. Photon OS also includes `shasum`, `sha1sum`, `sha384sum`, and `sha512sum`. See the man pages for  `md3sum`, `sha256sum`, and the other SHA utilities. 
400
+
401
+`md5sum` can help troubleshooting installation issues by verifying that the version of Photon OS being installed matches the version on the Bintray download page. If, for instance, bytes were dropped during the download, the checksums will not match. Try downloading it again. 
402
+
403
+### strace
404
+
405
+The `strace` utility follows system calls and signals as they are executed so that you can see what an application, command, or process is doing. `strace` can trace failed commands, identify where a process obtains its configuration, monitor file activity, and find the location of a crash. 
406
+
407
+By tracing system calls, `strace` can help troubleshoot a broad range of problems, including issues with input-output, memory, interprocess communication, network usage, and application performance. 
408
+
409
+For troubleshooting a problem that gives off few or no clues, the following command displays every system call: 
410
+
411
+	strace ls -al
412
+
413
+With strace commands, you can route the output to a file to make it easier to analyze: 
414
+
415
+	strace -o output.txt ls -al
416
+
417
+`strace` can reveal the files that an application is trying to open with the `-eopen` option. This combination can help troubleshoot an application that is failing because it is missing files or being denied access to a file it needs. If, for example, you see "No such file or directory" in the results of `strace -eopen`, something might be wrong: 
418
+
419
+	strace -eopen sshd
420
+	open("/usr/lib/x86_64/libpam.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
421
+	open("/usr/lib/libpam.so.0", O_RDONLY|O_CLOEXEC) = 3
422
+
423
+In the results above, it's OK that the first file is missing because it is found in the next line. In other cases, the application might be unable to open one of its configuration files or reading the wrong one. If the results say "permission denied" for one of the files, check the permissions of the file with `ls -l` or `stat`.   
424
+
425
+When troubleshooting with `strace`, you can include the process ID in its commands. Here's an example of how to find a process ID: 
426
+
427
+	ps -ef | grep apache
428
+
429
+And you can then use `strace` to examine the file a process is working with: 
430
+
431
+	strace -e trace=file -p 1719
432
+
433
+A similar command can trace network traffic: 
434
+
435
+	strace -p 812 -e trace=network
436
+
437
+If an application is crashing, use `strace` to trace the application and then analyze what happens right before the application crashes.
438
+
439
+You can also trace the child processes that an application spawns with the fork system call, and you can do so with systemctl commands that start a process to identify why an application crashes immediately or fails to start: 
440
+
441
+	strace -f -o output.txt systemctl start httpd
442
+
443
+Here's another example. If journalctl is showing that networkd is failing, you can run strace to help determine why: 
444
+
445
+	strace -o output.txt systemctl restart systemd-networkd
446
+
447
+And then grep inside the results for something, such as _exit_ or _error_: 
448
+
449
+	grep exit output.txt
450
+
451
+Maybe the results indicate systemd-resolved is going wrong, and you can then strace it, too: 
452
+
453
+	strace -f -o output.txt systemctl restart systemd-resolved
454
+
455
+### file
456
+
457
+The `file` command determines the file type, which can help troubleshoot problems when an application mistakes one type of file for another, leading it to misbehave. Example: 
458
+
459
+	file /usr/sbin/sshd
460
+	/usr/sbin/sshd: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, stripped
461
+
462
+### stat
463
+
464
+The `stat` command can help troubleshoot problems with files or the file system by showing the last date it was modified and other information. Example:  
465
+
466
+	stat /dev/sda1
467
+	File: '/dev/sda1'
468
+	Size: 0               Blocks: 0          IO Block: 4096   block special file
469
+	Device: 6h/6d   Inode: 6614        Links: 1     Device type: 8,1
470
+	Access: (0660/brw-rw----)  Uid: (    0/    root)   Gid: (    8/    disk)
471
+	Access: 2016-09-02 12:23:56.135999936 +0000
472
+	Modify: 2016-09-02 12:23:52.879999981 +0000
473
+	Change: 2016-09-02 12:23:52.879999981 +0000
474
+	Birth: -
475
+
476
+On Photon OS, `stat` is handy to show permissions for a file or directory in both their absolute octal notation and their read-write-execute abbreviation; truncated example: 
477
+
478
+	chmod 777 tester.md
479
+	stat tester.md
480
+	  File: 'tester.md'
481
+	  Size: 0               Blocks: 0          IO Block: 4096   regular empty file
482
+	Device: 801h/2049d      Inode: 316385      Links: 1
483
+	Access: (0777/-rwxrwxrwx)  Uid: (    0/    root)   Gid: (    0/    root)
484
+
485
+### watch
486
+
487
+The `watch` utility runs a command at regular intervals so you can observe how its output changes over time. `watch` can help dynamically monitor network links, routes, and other information when you are troubleshooting networking or performance issues. Examples: 
488
+
489
+	watch -n0 --differences ss
490
+	watch -n1 --differences ip route
491
+	
492
+Here's another example with a screenshot of the command's output. This command monitors the traffic on your network links. The highlighted numbers are updated every second so you can see the traffic fluctuating: 
493
+
494
+	watch -n1 --differences ip -s link show up
495
+
496
+![The dynamic output of the watch utility](images/watchcmd.png)  
497
+
498
+### vmstat and fdisk
499
+
500
+The `vmstat` tool displays statistics about virtual memory, processes, block input-output, disks, and CPU activity. This tool can help diagnose performance problems, especially system bottlenecks.  
501
+
502
+Its output on a Photon OS virtual machine running in VMware Workstation 12 Pro without a heavy load looks like this: 
503
+
504
+	vmstat
505
+	procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----
506
+	 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st
507
+	 0  0      0   5980  72084 172488    0    0    27    44  106  294  1  0 98  1  0
508
+
509
+What do all these codes mean? They are explained in the vmstat man page. 
510
+
511
+If `r`, the number of runnable processes, is higher than 10, the machine is under stress; consider intervening to reduce the number of processes or to distribute some of the processes to other machines. In other words, the machine has a bottleneck in executing processes.
512
+
513
+If `cs`, the number of context switches per second, is really high, there may be too many jobs running on the machine. 
514
+
515
+If `in`, the number of interrupts per second, is relatively high, there might be a bottleneck for network or disk IO. 
516
+
517
+You can investigate disk IO further by using vmstat's `-d` option to report disk statistics; abridged example on a machine with little load: 
518
+
519
+	vmstat -d
520
+	disk- ------------reads------------ ------------writes----------- -----IO------
521
+	       total merged sectors      ms  total merged sectors      ms    cur    sec
522
+	ram0       0      0       0       0      0      0       0       0      0      0
523
+	ram1       0      0       0       0      0      0       0       0      0      0
524
+	loop0      0      0       0       0      0      0       0       0      0      0
525
+	loop1      0      0       0       0      0      0       0       0      0      0
526
+	sr0        0      0       0       0      0      0       0       0      0      0
527
+	sda    22744    676  470604   12908  72888  24949  805224  127692      0    130
528
+
529
+The `-D` option summarizes disk statistics:
530
+
531
+	vmstat -D
532
+	           26 disks
533
+	            2 partitions
534
+	        22744 total reads
535
+	          676 merged reads
536
+	       470604 read sectors
537
+	        12908 milli reading
538
+	        73040 writes
539
+	        25001 merged writes
540
+	       806872 written sectors
541
+	       127808 milli writing
542
+	            0 inprogress IO
543
+	          130 milli spent IO
544
+
545
+You can also get statistics about a partition. First, run the `fdisk -l` command to list the machine's devices. Then run `vmstat -p` with the name of a device to view its stats: 
546
+
547
+
548
+	fdisk -l
549
+	Disk /dev/ram0: 4 MiB, 4194304 bytes, 8192 sectors
550
+	Units: sectors of 1 * 512 = 512 bytes
551
+	Sector size (logical/physical): 512 bytes / 4096 bytes
552
+	I/O size (minimum/optimal): 4096 bytes / 4096 bytes
553
+	...
554
+	Device        Start      End  Sectors Size Type
555
+	/dev/sda1      2048 16771071 16769024   8G Linux filesystem
556
+	/dev/sda2  16771072 16777182     6111   3M BIOS boot
557
+
558
+	vmstat -p /dev/sda1
559
+	sda1          reads   read sectors  writes    requested writes
560
+	               22579     473306      78510     866088
561
+
562
+See the vmstat man page for more options. 
563
+
564
+### lsof
565
+
566
+The `lsof` command lists open files. And this tool's definition of an open file is quite broad--directories, libraries, streams, domain sockets, and Internet sockets are all considered files, making `lsof` broadly applicable as a mid-level troubleshooting tool to identify the files a process is using. Because a Linux system like Photon OS uses files to do its work, you can run `lsof` as root to see how the system is using them and to see how an application works. 
567
+
568
+If, for example, you cannot unmount a disk because it is in use, you can run `lsof` to identify the files on the disk that are being used. Here's an example showing what's using the root directory: 
569
+
570
+	lsof /root
571
+	COMMAND    PID USER   FD   TYPE DEVICE SIZE/OFF   NODE NAME
572
+	bash       879 root  cwd    DIR    8,1     4096 262159 /root
573
+	bash      1265 root  cwd    DIR    8,1     4096 262159 /root
574
+	sftp-serv 1326 root  cwd    DIR    8,1     4096 262159 /root
575
+	gdb       1351 root  cwd    DIR    8,1     4096 262159 /root
576
+	bash      1395 root  cwd    DIR    8,1     4096 262159 /root
577
+	lsof      1730 root  cwd    DIR    8,1     4096 262159 /root
578
+
579
+You can do the same with an application or virtual appliance by running `lsof` with the user name or process ID of the app. Here's an example that lists the open files used by the Apache HTTP Server:  
580
+
581
+	lsof -u apache
582
+
583
+Running the command with the `-i` option lists all the open network and Internet files, which can help troubleshoot network problems: 
584
+
585
+	lsof -i
586
+
587
+See the Unix socket addresses of a user like _zookeeper_: 
588
+
589
+	lsof -u zookeeper -U
590
+
591
+And here's an example that shows the processes running on Ports 1 through 80:
592
+
593
+	lsof -i TCP:1-80
594
+	COMMAND  PID   USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
595
+	httpd    403   root    3u  IPv6  10733      0t0  TCP *:http (LISTEN)
596
+	httpd    407 apache    3u  IPv6  10733      0t0  TCP *:http (LISTEN)
597
+	httpd    408 apache    3u  IPv6  10733      0t0  TCP *:http (LISTEN)
598
+	httpd    409 apache    3u  IPv6  10733      0t0  TCP *:http (LISTEN)
599
+	sshd     820   root    3u  IPv4  11336      0t0  TCP *:ssh (LISTEN)
600
+	sshd     820   root    4u  IPv6  11343      0t0  TCP *:ssh (LISTEN)
601
+	sshd    1258   root    3u  IPv4  48040      0t0  TCP 198.51.100.143:ssh->198.51.100.1:49759 (ESTABLISHED)
602
+	sshd    1319   root    3u  IPv4  50866      0t0  TCP 198.51.100.143:ssh->198.51.100.1:51054 (ESTABLISHED)
603
+	sshd    1388   root    3u  IPv4  56438      0t0  TCP 198.51.100.143:ssh->198.51.100.1:60335 (ESTABLISHED)
604
+
605
+You can also inspect the files opened by a process ID. Here's a truncated example that queries the files open by the systemd network service: 
606
+
607
+	lsof -p 1917
608
+	COMMAND    PID            USER   FD      TYPE             DEVICE SIZE/OFF   NODE NAME
609
+	systemd-n 1917 systemd-network  cwd       DIR                8,1     4096      2 /
610
+	systemd-n 1917 systemd-network  txt       REG                8,1   887896 272389 /usr/lib/systemd/systemd-networkd
611
+	systemd-n 1917 systemd-network  mem       REG                8,1   270680 262267 /usr/lib/libnss_files-2.22.so
612
+	systemd-n 1917 systemd-network    0r      CHR                1,3      0t0   5959 /dev/null
613
+	systemd-n 1917 systemd-network    1u     unix 0x0000000000000000      0t0  45734 type=STREAM
614
+	systemd-n 1917 systemd-network    3u  netlink                         0t0   6867 ROUTE
615
+	systemd-n 1917 systemd-network    4u     unix 0x0000000000000000      0t0  45744 type=DGRAM
616
+	systemd-n 1917 systemd-network    9u  netlink                         0t0  45754 KOBJECT_UEVENT
617
+	systemd-n 1917 systemd-network   12u  a_inode               0,11        0   5955 [timerfd]
618
+	systemd-n 1917 systemd-network   13u     IPv4             104292      0t0    UDP 198.51.100.143:bootpc
619
+
620
+### fuser
621
+
622
+The `fuser` command identifies the process IDs of processes using files or sockets. The term _process_ is, in this case, synonymous with _user_. To identify the process ID of a process using a socket, run `fuser` with its namespace option and specify `tcp` or `udp` and the name of the process or port. Examples: 
623
+
624
+	fuser -n tcp ssh
625
+	ssh/tcp:               940  1308
626
+	fuser -n tcp http
627
+	http/tcp:              592   594   595   596
628
+	fuser -n tcp 80
629
+	80/tcp:                592   594   595   596
630
+
631
+
632
+### ldd
633
+
634
+By revealing the shared libraries that a program depends on, `ldd` can help troubleshoot an application that is missing a library or finding the wrong one.
635
+
636
+If, for example, you find output that says "file not found," check the path to the library.  
637
+
638
+	ldd /usr/sbin/sshd
639
+    linux-vdso.so.1 (0x00007ffc0e3e3000)
640
+    libpam.so.0 => (file not found)
641
+    libcrypto.so.1.0.0 => /usr/lib/libcrypto.so.1.0.0 (0x00007f624e570000)
642
+
643
+You can also use the `objdump` command to show dependencies for a program's object files; example:
644
+
645
+	objdump -p /usr/sbin/sshd | grep NEEDED
646
+
647
+### gdb
648
+
649
+The gdb tool is the GNU debugger. It lets you peer inside a program while it executes or when it crashes so that you can catch bugs on the fly. The gdb tool is typically used to debug programs written in C and C++. On Photon OS, gdb can help you determine why an application crashed. See the man page for gdb for instructions on how to run it. For an extensive example on how to use gdb to troubleshoot Photon OS running on a VM when you cannot login to Photon OS, see the section on troubleshooting boot and logon problems. 
650
+
651
+### Other Troubleshooting Tools Installed by Default
652
+
653
+The following troubleshooting tools are included in the full version of Photon OS: 
654
+
655
+* `grep` searches files for patterns. 
656
+* `ping` tests network connectivity. 
657
+* `strings` displays the characters in a file to identify its contents.
658
+* `lsmod` lists loaded modules.
659
+* `ipcs` shows data about the inter-process communication (IPC) resources to which a process has read access--typically, shared memory segments, message queues, and semaphore arrays.
660
+* `nm` lists symbols from object files. 
661
+* `diff` compares files side by side. Useful to compare two configuration files when one version works and the other doesn't. 
662
+
663
+### Installing More Tools from Repositories
664
+
665
+You can install several troubleshooting tools from the Photon OS repositories by using the default package management system, `tdnf`. 
666
+
667
+If a tool you need is not installed, the first thing you should do is search the repositories to see whether it's available. The traceroute tool, for example, is not installed by default. Here's how to search for it in the repositories:  
668
+
669
+	tdnf search traceroute
670
+	traceroute : Traces the route taken by packets over an IPv4/IPv6 network
671
+
672
+The results of the above command show that traceroute exists in the repository. You install it with `tdnf`: 
673
+
674
+	tdnf install traceroute
675
+
676
+Additional tools are not installed by default but are in the repository for instant installation with `tdnf`: 
677
+
678
+* `net-tools`: networking tools.
679
+* `ltrace`: tool for intercepting and recording dynamic library calls. It can identify the function an application was calling when it crashed, making it useful for debugging.
680
+* `nfs-utils`: client tools for the kernel Network File System, or NFS, including showmount; installed by default in the full version of Photon OS but not in the minimal version. 
681
+* `pcstat`: A tool that inspects which pages of a file or files are being cached by the Linux kernel.
682
+* `sysstat` and `sar`: Utilities to monitor system performance and usage activity. Installing sysstat also installs sar.
683
+* `systemtap` and `crash`: The systemtap utility is a programmable instrumentation system for diagnosing problems of performance or function. Installing systemtap also installs crash, which is a kernel crash analysis utility for live systems and dump files.
684
+* `dstat`: versatile tool for viewing and analyzing statistics about system resources.
685
+
686
+The `dstat` tool, for example, can help troubleshoot system performance. The tool shows a live, running list of statistics about system resources: 
687
+
688
+	dstat
689
+	You did not select any stats, using -cdngy by default.
690
+	----total-cpu-usage---- -dsk/total- -net/total- ---paging-- ---system--
691
+	usr sys idl wai hiq siq| read  writ| recv  send|  in   out | int   csw
692
+	  1   0  98   1   0   0|4036B   42k|   0     0 |   0     0 |  95   276
693
+	  1   0  98   1   0   0|   0    64k|  60B  940B|   0     0 | 142   320
694
+	  1   1  98   0   0   0|   0    52k|  60B  476B|   0     0 | 149   385
695
+
696
+
697
+### Linux Troubleshooting Tools Not on Photon OS
698
+
699
+The following Linux troubleshoot tools are neither installed on Photon OS by default nor available in the Photon OS repositories: 
700
+
701
+* iostat
702
+* telnet (use SSH instead)
703
+* Iprm
704
+* hdparm
705
+* syslog (use journalctl instead)
706
+* ddd
707
+* ksysmoops
708
+* xev
709
+* GUI tools (because Photon OS has no GUI)
710
+
711
+## Systemd
712
+
713
+Photon OS manages services with systemd and its command-line utility for inspecting and controlling the system, `systemctl`, not the deprecated commands of init.d. For example, instead of running the /etc/init.d/ssh script to stop and start the OpenSSH server on a init.d-based Linux system, you control the service by running the following systemctl commands on Photon OS: 
714
+
715
+	systemctl stop sshd
716
+	systemctl start sshd
717
+
718
+For an overview of systemd, see [systemd System and Service Manager](https://www.freedesktop.org/wiki/Software/systemd/) and the [man page for systemd](https://www.freedesktop.org/software/systemd/man/systemd.html). The systemd man pages are listed at [https://www.freedesktop.org/software/systemd/man/](https://www.freedesktop.org/software/systemd/man/).
719
+
720
+### Viewing Services 
721
+
722
+To view a description of all the active, loaded units, execute the systemctl command without any options or arguments: 
723
+
724
+	systemctl
725
+
726
+To see all the loaded, active, and inactive units and their description, run this command: 
727
+
728
+	systemctl --all
729
+
730
+To see all the unit files and their current status but no description, run this command: 
731
+
732
+	systemctl list-unit-files
733
+
734
+The `grep` command filters the services by a search term, a helpful tactic to recall the exact name of a unit file without looking through a long list of names. Example: 
735
+
736
+	systemctl list-unit-files | grep network
737
+	org.freedesktop.network1.busname           static
738
+	dbus-org.freedesktop.network1.service      enabled
739
+	systemd-networkd-wait-online.service       enabled
740
+	systemd-networkd.service                   enabled
741
+	systemd-networkd.socket                    enabled
742
+	network-online.target                      static
743
+	network-pre.target                         static
744
+	network.target  
745
+
746
+### Using Systemd Commands Instead of Init.d Commands
747
+
748
+Basic system administration commands on Photon OS differ from those on operating systems that use SysVinit. Since Photon OS uses systemd instead of SysVinit, you must use systemd commands to manage services. 
749
+
750
+For example, to list all the services that you can manage on Photon OS, you run the following command instead of `ls /etc/rc.d/init.d/`: 
751
+
752
+	systemctl list-unit-files --type=service
753
+
754
+Similarly, to check whether the `sshd` service is enabled, on Photon OS you run the following command instead of `chkconfig sshd`:
755
+
756
+	systemctl is-enabled sshd
757
+
758
+The `chkconfig --list` command that shows which services are enabled for which runlevel on a SysVinit computer becomes substantially different on Photon OS because there are no runlevels, only targets: 
759
+
760
+	ls /etc/systemd/system/*.wants
761
+
762
+You can also display similar information with the following command: 
763
+
764
+	systemctl list-unit-files --type=service
765
+
766
+Here is a list of some of the systemd commands that take the place of SysVinit commands on Photon OS: 
767
+
768
+	USE THIS SYSTEMD COMMAND 	INSTEAD OF THIS SYSVINIT COMMAND
769
+	systemctl start sshd 		service sshd start
770
+	systemctl stop sshd 		service sshd stop
771
+	systemctl restart sshd 		service sshd restart
772
+	systemctl reload sshd 		service sshd reload
773
+	systemctl condrestart sshd 	service sshd condrestart
774
+	systemctl status sshd 		service sshd status
775
+	systemctl enable sshd 		chkconfig sshd on
776
+	systemctl disable sshd 		chkconfig sshd off
777
+	systemctl daemon-reload		chkconfig sshd --add
778
+
779
+### Analyzing System Logs with journalctl
780
+
781
+The journalctl tool queries the contents of the systemd journal. On Photon OS, all the system logs except the installation log and the cloud-init log are written into the systemd journal. 
782
+
783
+If called without parameters, the `journalctl` command shows all the contents of the journal, beginning with the oldest entry. To display the output in reverse order with new entries first, include the `-r` option in the command:
784
+
785
+	journalctl -r
786
+
787
+The `journalctl` command includes many options to filter its output. For help troubleshooting systemd, two journalctl queries are particularly useful: showing the log entries for the last boot and showing the log entries for a systemd service unit. This command displays the messages that systemd generated during the last time the machine started: 
788
+
789
+	journalctl -b
790
+
791
+This command reveals the messages for only the systemd service unit specified by the `-u` option, which in the following example is the auditing service: 
792
+
793
+	journalctl -u auditd
794
+
795
+You can look at the messages for systemd itself or for the network service:
796
+
797
+	journalctl -u systemd
798
+	journalctl -u systemd-networkd
799
+
800
+Example:  
801
+
802
+	root@photon-1a0375a0392e [ ~ ]# journalctl -u systemd-networkd
803
+	-- Logs begin at Tue 2016-08-23 14:35:50 UTC, end at Tue 2016-08-23 23:45:44 UTC. --
804
+	Aug 23 14:35:52 photon-1a0375a0392e systemd[1]: Starting Network Service...
805
+	Aug 23 14:35:52 photon-1a0375a0392e systemd-networkd[458]: Enumeration completed
806
+	Aug 23 14:35:52 photon-1a0375a0392e systemd[1]: Started Network Service.
807
+	Aug 23 14:35:52 photon-1a0375a0392e systemd-networkd[458]: eth0: Gained carrier
808
+	Aug 23 14:35:53 photon-1a0375a0392e systemd-networkd[458]: eth0: DHCPv4 address 198.51.100.1
809
+	Aug 23 14:35:54 photon-1a0375a0392e systemd-networkd[458]: eth0: Gained IPv6LL
810
+	Aug 23 14:35:54 photon-1a0375a0392e systemd-networkd[458]: eth0: Configured
811
+
812
+
813
+For more information, see [journalctl](https://www.freedesktop.org/software/systemd/man/journalctl.html) or the journalctl man page by running this command: `man journalctl`
814
+
815
+### Inspecting Services with `systemd-analyze`
816
+
817
+The `systemd-analyze` command reveals performance statistics for boot times, traces system services, and verifies unit files. It can help troubleshoot slow system boots and incorrect unit files. See the man page for a list of options. Examples:
818
+
819
+	systemd-analyze blame
820
+
821
+	systemd-analyze dump
822
+
823
+## Networking
824
+
825
+### Managing the Network Configuration
826
+
827
+The network service, which is enabled by default, starts when the system boots. You manage the network service by using systemd commands, such as systemd-networkd, systemd-resolvd, and networkctl. You can check its status of the network service by running the following command: 
828
+
829
+	systemctl status systemd-networkd
830
+
831
+Here is a healthy result of the command: 
832
+
833
+	* systemd-networkd.service - Network Service
834
+	   Loaded: loaded (/usr/lib/systemd/system/systemd-networkd.service; enabled; vendor preset: enabled)
835
+	   Active: active (running) since Fri 2016-04-29 15:08:51 UTC; 6 days ago
836
+	     Docs: man:systemd-networkd.service(8)
837
+	 Main PID: 291 (systemd-network)
838
+	   Status: "Processing requests..."
839
+	   CGroup: /system.slice/systemd-networkd.service
840
+	           `-291 /lib/systemd/systemd-networkd
841
+
842
+Because Photon OS relies on systemd to manage services, you should employ the systemd suite of commands, not deprecated init.d commands or other deprecated commands, to manage networking. 
843
+
844
+### Use `ip` and `ss` Commands Instead of `ifconfig` and `netstat`
845
+
846
+Although the `ifconfig` command and the `netstat` command work on Photon OS, VMware recommends that you use the `ip` or `ss` commands. The `ifconfig` and `netstat` commands are deprecated. 
847
+
848
+For example, instead of running `netstat` to display a list of network interfaces, consider running the `ss` command. Similarly, to display information for IP addresses, instead of running `ifconfig -a`, run the `ip addr` command. Examples:
849
+
850
+	USE THIS IPROUTE COMMAND 	INSTEAD OF THIS NET-TOOL COMMAND
851
+	ip addr 					ifconfig -a
852
+	ss 							netstat
853
+	ip route 					route
854
+	ip maddr 					netstat -g
855
+	ip link set eth0 up 		ifconfig eth0 up
856
+	ip -s neigh					arp -v
857
+	ip link set eth0 mtu 9000	ifconfig eth0 mtu 9000
858
+
859
+Using the `ip route` version of a command instead of the net-tools version often provides more complete, accurate information on Photon OS, as the following example demonstrates: 
860
+
861
+	ip neigh
862
+	198.51.100.2 dev eth0 lladdr 00:50:56:e2:02:0f STALE
863
+	198.51.100.254 dev eth0 lladdr 00:50:56:e7:13:d9 STALE
864
+	198.51.100.1 dev eth0 lladdr 00:50:56:c0:00:08 DELAY
865
+
866
+	arp -a
867
+	? (198.51.100.2) at 00:50:56:e2:02:0f [ether] on eth0
868
+	? (198.51.100.254) at 00:50:56:e7:13:d9 [ether] on eth0
869
+	? (198.51.100.1) at 00:50:56:c0:00:08 [ether] on eth0
870
+
871
+**Important:** If you modify an IPv6 configuration or add an IPv6 interface, you must restart `systemd-networkd`. Traditional methods of using `ifconfig` commands will be inadequate to register the changes. Run the following command instead: 
872
+
873
+	systemctl restart systemd-networkd
874
+
875
+
876
+### Inspecting the Status of Network Links with `networkctl`
877
+
878
+The `networkctl` command shows information about network connections that helps you configure networking services and troubleshoot networking problems. You can, for example, progressively add options and arguments to the `networkctl` command to move from general information about network connections to specific information about a network connection. 
879
+
880
+Running `networkctl` without options defaults to the list command:  
881
+
882
+	networkctl
883
+	IDX LINK             TYPE               OPERATIONAL SETUP
884
+	  1 lo               loopback           carrier     unmanaged
885
+	  2 eth0             ether              routable    configured
886
+	  3 docker0          ether              routable    unmanaged
887
+	 11 vethb0aa7a6      ether              degraded    unmanaged
888
+	 4 links listed.
889
+
890
+Running `networkctl` with the status command displays information that looks like this; you can see there are active network links with IP addresses for not only the Ethernet connection but also a Docker container. 
891
+
892
+	root@photon-rc [ ~ ]# networkctl status
893
+	*      State: routable
894
+	     Address: 198.51.100.131 on eth0
895
+	              172.17.0.1 on docker0
896
+	              fe80::20c:29ff:fe55:3ca6 on eth0
897
+	              fe80::42:f0ff:fef7:bd81 on docker0
898
+	              fe80::4c84:caff:fe76:a23f on vethb0aa7a6
899
+	     Gateway: 198.51.100.2 on eth0
900
+	         DNS: 198.51.100.2
901
+
902
+You can then add a network link, such as the Ethernet connection, as the argument of the status command to show specific information about the link: 
903
+
904
+	root@photon-rc [ ~ ]# networkctl status eth0
905
+	* 2: eth0
906
+	       Link File: /usr/lib/systemd/network/99-default.link
907
+	    Network File: /etc/systemd/network/10-dhcp-en.network
908
+	            Type: ether
909
+	           State: routable (configured)
910
+	            Path: pci-0000:02:01.0
911
+	          Driver: e1000
912
+	      HW Address: 00:0c:29:55:3c:a6 (VMware, Inc.)
913
+	             MTU: 1500
914
+	         Address: 198.51.100.131
915
+	                  fe80::20c:29ff:fe55:3ca6
916
+	         Gateway: 198.51.100.2
917
+	             DNS: 198.51.100.2
918
+	        CLIENTID: ffb6220feb00020000ab116724f520a0a77337
919
+
920
+And you can do the same thing with the Docker container: 
921
+
922
+	networkctl status docker0
923
+	* 3: docker0
924
+	       Link File: /usr/lib/systemd/network/99-default.link
925
+	    Network File: n/a
926
+	            Type: ether
927
+	           State: routable (unmanaged)
928
+	          Driver: bridge
929
+	      HW Address: 02:42:f0:f7:bd:81
930
+	             MTU: 1500
931
+	         Address: 172.17.0.1
932
+	                  fe80::42:f0ff:fef7:bd81
933
+
934
+In the example above, it is OK that the state of the Docker container is unmanaged; Docker handles managing the networking for the containers without using systemd-resolved or systemd-networkd. Instead, Docker manages the container's connection by using its bridge drive.
935
+
936
+For more information about `networkctl` commands and options, see https://www.freedesktop.org/software/systemd/man/networkctl.html.
937
+
938
+### Turning on Network Debugging
939
+
940
+You can set `systemd-networkd` to work in debug mode so that you can analyze log files with debugging information to help troubleshoot networking problems. The following procedure turns on network debugging by adding a drop-in file in /etc/systemd to customize the default systemd configuration in /usr/lib/systemd. 
941
+
942
+First, run the following command as root to create a directory with this exact name, including the `.d` extension:
943
+
944
+	mkdir -p /etc/systemd/system/systemd-networkd.service.d/
945
+
946
+Second, run the following command as root to establish a systemd drop-in unit with a debugging configuration for the network service:
947
+
948
+	cat > /etc/systemd/system/systemd-networkd.service.d/10-loglevel-debug.conf << "EOF"
949
+	[Service]
950
+	Environment=SYSTEMD_LOG_LEVEL=debug
951
+	EOF
952
+ 
953
+You must reload the systemctl daemon and restart the systemd-networkd service for the changes to take effect: 
954
+
955
+	systemctl daemon-reload
956
+	systemctl restart systemd-networkd
957
+
958
+Verify that your changes took effect:
959
+
960
+	systemd-delta --type=extended
961
+
962
+View the log files by running this command: 
963
+
964
+	journalctl -u systemd-networkd
965
+
966
+When you are finished debugging the network connections, turn debugging off by deleting the drop-in file: 
967
+
968
+	rm /etc/systemd/system/systemd-networkd.service.d/10-loglevel-debug.conf
969
+
970
+### Installing the Packages for tcpdump and netcat with tdnf
971
+
972
+The minimal version of Photon OS leaves out several useful networking tools to keep the operating system lean. Tcpdump, for example, is absent in the minimal version but available in the repository. The minimal version does, however, include the iproute2 tools by default. 
973
+
974
+Tcpdump captures and analyzes packets on a network interface. On Photon OS, you install tcpdump and its accompanying package libpcap, a C/C++ library for capturing network traffic, by using tdnf, Photon's command-line package manager: 
975
+
976
+	tdnf install tcpdump
977
+
978
+Netcat, a tool for sending data over network connections with TCP or UDP, appears in neither the minimal nor the full version of Photon OS. But since netcat furnishes powerful options for analyzing, troubleshooting, and debugging network connections, you might want to install it. To do so, run the following command: 
979
+
980
+	tdnf install netcat
981
+
982
+### Checking Firewall Rules
983
+
984
+The design of Photon OS emphasizes security. On the minimal and full versions of Photon OS, the default security policy turns on the firewall and drops packets from external interfaces and  applications. As a result, you might need to add rules to iptables to permit forwarding, allow protocols like HTTP, and open ports. In other words, you must configure the firewall for your applications and requirements. 
985
+
986
+The default iptables settings on the full version look like this:
987
+
988
+	iptables --list
989
+	Chain INPUT (policy DROP)
990
+	target     prot opt source               destination
991
+	ACCEPT     all  --  anywhere             anywhere
992
+	ACCEPT     all  --  anywhere             anywhere             ctstate RELATED,ESTABLISHED
993
+	ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:ssh
994
+
995
+	Chain FORWARD (policy DROP)
996
+	target     prot opt source               destination
997
+
998
+	Chain OUTPUT (policy DROP)
999
+	target     prot opt source               destination
1000
+	ACCEPT     all  --  anywhere             anywhere
1001
+
1002
+
1003
+To find out how to adjust the settings, see the man page for iptables. 
1004
+
1005
+Although the default iptables policy accepts SSH connections, the `sshd` configuration file on the full version of Photon OS  is set to reject SSH connections. See [Permitting Root Login with SSH](#permitting-root-login-with-ssh).
1006
+
1007
+If you are unable to ping a Photon OS machine, one of the first things you should do is check the firewall rules. Do they allow connectivity for the port and protocol in question? You can supplement the `iptables` commands by using `lsof` to, for instance, see the processes listening on ports: 
1008
+
1009
+	lsof -i -P -n
1010
+
1011
+### Netmgr
1012
+
1013
+If you are running a VMware appliance on Photon OS and the VAMI module has problems or if there are networking issues, you can use the Photon OS `netmgr` utility to inspect the networking settings. Make sure, in particular, that the IP addresses for the DNS server and other infrastructure are correct. Use `tcpdump` to analyze the issues. 
1014
+
1015
+If you get an error code from netmgr, it is a standard Unix error code--enter it into a search engine to obtain more information.
1016
+
1017
+## File System
1018
+
1019
+This section covers troubleshooting the file system.
1020
+
1021
+### Checking Disk Space
1022
+
1023
+One of the first simple steps to take when you're troubleshooting is to check how much disk space is available by running the `df` command: 
1024
+
1025
+	df -h
1026
+
1027
+### Adding a Disk and Partitioning It
1028
+
1029
+If the `df` command shows that the file system is indeed nearing capacity, you can add a new disk on the fly and partition it to increase capacity. 
1030
+
1031
+First, add a new disk. You can, for example, add a new disk to a virtual machine by using the VMware vSphere Client. After adding a new disk, check for the new disk by using `fdisk`; see the section on `fdisk` below. In the following example, the new disk is named `/dev/sdb`:
1032
+
1033
+	fdisk -l
1034
+	Device        Start      End  Sectors Size Type
1035
+	/dev/sda1      2048 16771071 16769024   8G Linux filesystem
1036
+	/dev/sda2  16771072 16777182     6111   3M BIOS boot
1037
+	
1038
+	Disk /dev/sdb: 1 GiB, 1073741824 bytes, 2097152 sectors
1039
+	Units: sectors of 1 * 512 = 512 bytes
1040
+	Sector size (logical/physical): 512 bytes / 512 bytes
1041
+	I/O size (minimum/optimal): 512 bytes / 512 bytes
1042
+
1043
+After you confirm that Photon OS registers the new disk, you can partition it with the `parted` wizard. The command to partition the disk on Photon OS is as follows: 
1044
+
1045
+	parted /dev/sdb
1046
+
1047
+And then you use the parted wizard to create it (see the man page for `parted` for more information):
1048
+
1049
+	mklabel gpt
1050
+	mkpart ext3 1 1024
1051
+
1052
+Then you must create a file system on the partition:
1053
+
1054
+	mkfs -t ext3 /dev/sdb1
1055
+
1056
+Make a directory where you will mount the new file system: 
1057
+
1058
+	mkdir /newdata
1059
+
1060
+Finally, open `/etc/fstab` and add the new file system with the options that you want: 
1061
+
1062
+	#system mnt-pt  type    options dump    fsck
1063
+	/dev/sda1       /       ext4    defaults,barrier,noatime,noacl,data=ord$
1064
+	/dev/cdrom      /mnt/cdrom      iso9660 ro,noauto       0       0
1065
+	/dev/sdb1       /newdata        ext3    defaults        0		0
1066
+
1067
+Mount it for now: 
1068
+
1069
+	mount /newdata
1070
+
1071
+Check your work: 
1072
+
1073
+	df -h
1074
+	Filesystem      Size  Used Avail Use% Mounted on
1075
+	/dev/root       7.8G  4.4G  3.1G  59% /
1076
+	devtmpfs        172M     0  172M   0% /dev
1077
+	tmpfs           173M     0  173M   0% /dev/shm
1078
+	tmpfs           173M  664K  172M   1% /run
1079
+	tmpfs           173M     0  173M   0% /sys/fs/cgroup
1080
+	tmpfs           173M   36K  173M   1% /tmp
1081
+	tmpfs            35M     0   35M   0% /run/user/0
1082
+	/dev/sdb1       945M  1.3M  895M   1% /newdata
1083
+
1084
+### Expanding Disk Partition
1085
+
1086
+If you need more space, you can expand the last partition of your disk after resizing the disk. In the examples we are assuming `sda` as disk device.
1087
+
1088
+After the disk is resized in the virtual machine, it's necessary to tell the system to recognize the new disk ending boundary without rebooting:
1089
+
1090
+	echo 1 > /sys/class/block/sda/device/rescan
1091
+
1092
+You will need to install the parted package to resize the disk partition, which is not available by default. Just run the following command to install it: `tdnf install parted`.
1093
+
1094
+	# parted /dev/sda
1095
+	GNU Parted 3.2
1096
+	Using /dev/sda
1097
+	Welcome to GNU Parted! Type 'help' to view a list of commands.
1098
+
1099
+List all partitions available to fix the GPT and check the last partition number:
1100
+
1101
+	(parted) print
1102
+
1103
+	Warning: Not all of the space available to /dev/sda appears to be used, you can
1104
+	fix the GPT to use all of the space (an extra 4194304 blocks) or continue with
1105
+	the current setting? 
1106
+	Fix/Ignore?
1107
+
1108
+Press `f` to fix the GPT layout.
1109
+
1110
+	Model: VMware Virtual disk (scsi)
1111
+	Disk /dev/sda: 34.4GB
1112
+	Sector size (logical/physical): 512B/512B
1113
+	Partition Table: gpt
1114
+	Disk Flags: 
1115
+
1116
+	Number  Start   End     Size    File system  Name  Flags
1117
+	1      1049kB  3146kB  2097kB                     bios_grub
1118
+	2      3146kB  8590MB  8587MB  ext4
1119
+
1120
+In this case we have the partition `2` as last, then we extend the partition to 100% of the remaining size:
1121
+
1122
+	(parted) resizepart 2 100%
1123
+
1124
+Finally, expand the filesystem to the new size:
1125
+
1126
+	resize2fs /dev/sda2
1127
+	resize2fs 1.42.13 (17-May-2015)
1128
+	Filesystem at /dev/sda2 is mounted on /; on-line resizing required
1129
+	old_desc_blocks = 1, new_desc_blocks = 2
1130
+	The filesystem on /dev/sda2 is now 8387835 (4k) blocks long.
1131
+
1132
+The new space is already available in the system:
1133
+
1134
+	df -h
1135
+	Filesystem      Size  Used Avail Use% Mounted on
1136
+	/dev/root        32G  412M   30G   2% /
1137
+	devtmpfs       1001M     0 1001M   0% /dev
1138
+	tmpfs          1003M     0 1003M   0% /dev/shm
1139
+	tmpfs          1003M  252K 1003M   1% /run
1140
+	tmpfs          1003M     0 1003M   0% /sys/fs/cgroup
1141
+	tmpfs          1003M     0 1003M   0% /tmp
1142
+	tmpfs           201M     0  201M   0% /run/user/0
1143
+
1144
+### fdisk
1145
+
1146
+The `fdisk` command manipulates the disk partition table. You can, for example, use `fdisk` to list the disk partitions so that you can identify the root Linux file system. Here is an truncated example showing `/dev/sda1` to be the root Linux partition: 
1147
+
1148
+	fdisk -l
1149
+	Disk /dev/ram0: 4 MiB, 4194304 bytes, 8192 sectors
1150
+	Units: sectors of 1 * 512 = 512 bytes
1151
+	Sector size (logical/physical): 512 bytes / 4096 bytes
1152
+	I/O size (minimum/optimal): 4096 bytes / 4096 bytes
1153
+	...
1154
+	Disk /dev/sda: 8 GiB, 8589934592 bytes, 16777216 sectors
1155
+	Units: sectors of 1 * 512 = 512 bytes
1156
+	Sector size (logical/physical): 512 bytes / 512 bytes
1157
+	I/O size (minimum/optimal): 512 bytes / 512 bytes
1158
+	Disklabel type: gpt
1159
+	Disk identifier: 3CFA568B-2C89-4290-8B52-548732A3972D
1160
+
1161
+	Device        Start      End  Sectors Size Type
1162
+	/dev/sda1      2048 16771071 16769024   8G Linux filesystem
1163
+	/dev/sda2  16771072 16777182     6111   3M BIOS boot
1164
+
1165
+Remember the `fdisk -l` command--it will be used later in a section that demonstrates how to reset a lost root password. 
1166
+
1167
+### fsck
1168
+
1169
+The Photon OS file system includes btrfs and ext4. The default root file system is ext4, which you can see by looking at the file system configuration file, `/etc/fstab`: 
1170
+
1171
+	cat /etc/fstab
1172
+	#system mnt-pt  type    options dump    fsck
1173
+	/dev/sda1       /       ext4    defaults,barrier,noatime,noacl,data=ordered     1       1
1174
+	/dev/cdrom      /mnt/cdrom      iso9660 ro,noauto       0       0
1175
+
1176
+The `1` in the fifth column, under `fsck`, indicates that fsck checks the file system when the system boots.
1177
+
1178
+You can manually check the file system by using the file system consistency check tool, `fsck`, after you unmount the file system. You can also perform a read-only check without unmounting it:
1179
+
1180
+	fsck -nf /dev/sda1
1181
+	fsck from util-linux 2.27.1
1182
+	e2fsck 1.42.13 (17-May-2015)
1183
+	Warning!  /dev/sda1 is mounted.
1184
+	Warning: skipping journal recovery because doing a read-only filesystem check.
1185
+	Pass 1: Checking inodes, blocks, and sizes
1186
+	Pass 2: Checking directory structure
1187
+	Pass 3: Checking directory connectivity
1188
+	Pass 4: Checking reference counts
1189
+	Pass 5: Checking group summary information
1190
+	Free blocks count wrong (1439651, counted=1423942).
1191
+	Fix? no
1192
+	Free inodes count wrong (428404, counted=428397).
1193
+	Fix? no
1194
+	/dev/sda1: 95884/524288 files (0.3% non-contiguous), 656477/2096128 blocks
1195
+
1196
+The inodes count is probably off because the file system is mounted and in use. To fix problems, you must first unmount the file system and then run fsck again: 
1197
+
1198
+	umount /dev/sda1
1199
+	umount: /: target is busy
1200
+	        (In some cases useful info about processes that
1201
+	         use the device is found by lsof(8) or fuser(1).)
1202
+
1203
+So check it with `lsof`:
1204
+
1205
+	lsof | grep ^jbd2/sd
1206
+	jbd2/sda1   99                root  cwd       DIR                8,1     4096          2 /
1207
+	jbd2/sda1   99                root  rtd       DIR                8,1     4096          2 /
1208
+	jbd2/sda1   99                root  txt   unknown                                        /proc/99/exe
1209
+
1210
+The file system is indeed in use. What troubleshooting tool would you use next to further explore the applications or processes that are using the file system?  
1211
+
1212
+### Fixing File System Errors When fsck Fails
1213
+
1214
+A potential issue is that when `fsck` runs during startup, it finds a problem that prevents the system from fully booting until you fix the issue by running fsck manually. This kind of a problem can occur when Photon OS is the operating system for a VM running an appliance. 
1215
+
1216
+If fsck fails when the computer boots and an error message says to run fsck manually, you can troubleshoot by restarting the VM, altering the GRUB edit menu to enter emergency mode before Photon OS fully boots, and running fsck.
1217
+
1218
+1. Take a snapshot of the virtual machine. 
1219
+
1220
+1. Restart the virtual machine running Photon OS. 
1221
+
1222
+1. When the Photon OS splash screen appears as it restarts, type the letter `e` to go to the GNU GRUB edit menu. Be quick about it: Because Photon OS reboots so quickly, you won't have much time to type `e`. Remember that in VMware vSphere or VMware Workstation Pro, you might have to give the console focus by clicking in its window before it will register input from the keyboard. 
1223
+
1224
+1. In the GNU GRUB edit menu, go to the end of the line that starts with `linux`, add a space, and then add the following code exactly as it appears below:
1225
+
1226
+	`systemd.unit=emergency.target`
1227
+
1228
+1. Type `F10`.
1229
+
1230
+1. In the bash shell, run one of the following commands to fix the file system errors, depending on whether `sda1` or `sda2` represents the root file system: 
1231
+
1232
+	`e2fsck -y /dev/sda1`
1233
+
1234
+	or
1235
+
1236
+	`e2fsck -y /dev/sda2`
1237
+
1238
+1. Restart the virtual machine.
1239
+
1240
+
1241
+## Packages
1242
+
1243
+On Photon OS, tdnf is the default package manager. The standard syntax for `tdnf` commands is the same as that for DNF and Yum: 
1244
+
1245
+	tdnf [options] <command> [<arguments>...]
1246
+
1247
+The main configuration files reside in `/etc/tdnf/tdnf.conf`. The repositories appear in `/etc/yum.repos.d/` with `.repo` file extensions. For more information, see the [Photon OS Administration Guide](https://github.com/vmware/photon/blob/master/docs/photon-admin-guide.md).
1248
+
1249
+The cache files for data and metadata reside in `/var/cache/tdnf`. The local cache is populated with data from the repository: 
1250
+
1251
+	ls -l /var/cache/tdnf/photon
1252
+	total 8
1253
+	drwxr-xr-x 2 root root 4096 May 18 22:52 repodata
1254
+	d-wxr----t 3 root root 4096 May  3 22:51 rpms
1255
+
1256
+You can clear the cache to help troubleshoot a problem, but keep in mind that doing so might slow the performance of tdnf until the cache becomes repopulated with data. Cleaning the cache can remove stale information. Here is how to clear the cache: 
1257
+
1258
+	tdnf clean all
1259
+	Cleaning repos: photon photon-extras photon-updates lightwave
1260
+	Cleaning up everything
1261
+
1262
+Some tdnf commands can help you troubleshoot problems with packages:
1263
+
1264
+`makecache`: This command updates the cached binary metadata for all known repositories. You can run it after you clean the cache to make sure you are working with the latest repository data as you troubleshoot. Example:
1265
+
1266
+	tdnf makecache
1267
+	Refreshing metadata for: 'VMware Lightwave 1.0(x86_64)'
1268
+	Refreshing metadata for: 'VMware Photon Linux 1.0(x86_64)Updates'
1269
+	Refreshing metadata for: 'VMware Photon Extras 1.0(x86_64)'
1270
+	Refreshing metadata for: 'VMware Photon Linux 1.0(x86_64)'
1271
+	Metadata cache created.
1272
+
1273
+`tdnf check-local`: This command resolves dependencies by using the local RPMs to help check RPMs for quality assurance before publishing them. To check RPMs with this command, you must create a local directory and place your RPMs in it. The command, which includes no options, takes the path to the local directory containing the RPMs as its argument. The command does not, however, recursively parse directories; it checks the RPMs only in the directory that you specify. For example, after creating a directory named `/tmp/myrpms` and placing your RPMs in it, you can run the following command to check them:  
1274
+
1275
+	tdnf check-local /tmp/myrpms
1276
+	Checking all packages from: /tmp/myrpms
1277
+	Found 10 packages
1278
+	Check completed without issues
1279
+
1280
+`tdnf provides`: This command finds the packages that provide the package that you supply as an argument. If you are used to a package name for another system, you can use `tdnf provides` to find the corresponding name of the package on Photon OS. Example: 
1281
+
1282
+	tdnf provides docker
1283
+	docker-1.11.0-1.ph1.x86_64 : Docker
1284
+	Repo     : photon
1285
+	docker-1.11.0-1.ph1.x86_64 : Docker
1286
+	Repo     : @System
1287
+
1288
+For a file, you must provide the full path. Here's an example: 
1289
+
1290
+	tdnf provides /usr/include/stdio.h
1291
+	glibc-devel-2.22-8.ph1.x86_64 : Header files for glibc
1292
+	Repo     : photon
1293
+	glibc-devel-2.22-8.ph1.x86_64 : Header files for glibc
1294
+	Repo     : @System
1295
+
1296
+Here's an example that shows you how to find the package that provides a pluggable authentication module, which you might need to find if the system is mishandling passwords. 
1297
+
1298
+	tdnf provides /etc/pam.d/system-account
1299
+	shadow-4.2.1-7.ph1.x86_64 : Programs for handling passwords in a secure way
1300
+	Repo     : photon
1301
+	shadow-4.2.1-8.ph1.x86_64 : Programs for handling passwords in a secure way
1302
+	Repo     : photon-updates
1303
+
1304
+Additional commands appear in the [Photon OS Administration Guide](https://github.com/vmware/photon/blob/master/docs/photon-admin-guide.md).
1305
+
1306
+If you find a package that is installed but is not working, try re-installing it; example: 
1307
+
1308
+	tdnf reinstall shadow
1309
+	Reinstalling:
1310
+	shadow 	x86_64 	4.2.1-7.ph1   3.85 M
1311
+
1312
+## Kernel Problems and Boot and Login Problems
1313
+
1314
+### Kernel Overview
1315
+
1316
+Photon OS 1.0 uses Linux kernel version 4.4. Troubleshooting kernel problems starts with `dmesg`. The `dmesg` command prints messages from the kernel ring buffer. The following command, for example, presents kernel messages in a human-readable format: 
1317
+
1318
+	dmesg --human --kernel
1319
+
1320
+To examine kernel messages as you perform actions, such as reproducing a problem, in another terminal, you can run the command with the `--follow` option, which waits for new messages and prints them as they occur: 
1321
+
1322
+	dmesg --human --kernel --follow
1323
+
1324
+The kernel buffer is limited in memory size. As a result, the kernel cyclically overwrites the end of the information in the buffer from which dmesg pulls information. The systemd journal, however, saves the information from the buffer to a log file so that you can access older information. To view it, run the following command: 
1325
+
1326
+	journalctl -k
1327
+
1328
+If need be, you can check the modules that are loaded on your Photon OS machine by running the `lsmod` command; truncated example:  
1329
+
1330
+	lsmod
1331
+	Module                  Size  Used by
1332
+	vmw_vsock_vmci_transport    28672  1
1333
+	vsock                  36864  2 vmw_vsock_vmci_transport
1334
+	coretemp               16384  0
1335
+	hwmon                  16384  1 coretemp
1336
+	crc32c_intel           24576  0
1337
+	hid_generic            16384  0
1338
+	usbhid                 28672  0
1339
+	hid                   106496  2 hid_generic,usbhid
1340
+	xt_conntrack           16384  1
1341
+	iptable_nat            16384  0
1342
+	nf_conntrack_ipv4      16384  2
1343
+	nf_defrag_ipv4         16384  1 nf_conntrack_ipv4
1344
+	nf_nat_ipv4            16384  1 iptable_nat
1345
+	nf_nat                 24576  1 nf_nat_ipv4
1346
+	iptable_filter         16384  1
1347
+	ip_tables              24576  2 iptable_filter,iptable_nat
1348
+
1349
+
1350
+### Boot Process Overview
1351
+
1352
+When a Photon OS machine boots, the BIOS initializes the hardware and uses a boot loader to start the kernel. After the kernel starts, systemd takes over and boots the rest of the operating system. 
1353
+
1354
+More specifically, the BIOS checks the memory and initializes the keyboard, the screen, and other peripherals. When the BIOS finds the first hard disk, the boot loader--GNU GRUB 2.02--takes over. From the hard disk, GNU GRUB loads the master boot record (MBR) and initializes the root partition of the random-access memory by using initrd. The device manager, udev, provides initrd with the drivers it needs to access the device containing the root file system. Here's what the GNU GRUB edit menu looks like in Photon OS with its default commands to load the boot record and initialize the RAM disk: 
1355
+
1356
+![The GNU GRUB edit menu in the full and minimal versions of Photon OS](images/grub-edit-menu-orig.png)  
1357
+
1358
+At this point, the Linux kernel in Photon OS, which is kernel version 4.4.8, takes control. Systemd kicks in, initializes services in parallel, mounts the rest of the file system, and checks the file system for errors. 
1359
+
1360
+### Blank Screen on Reboot
1361
+
1362
+If the Photon OS kernel enters a state of panic during a reboot and all you see is a blank screen, note the name of the virtual machine running Photon OS and then power off the VM. 
1363
+
1364
+In the host, open the `vmware.log` file for the VM. When a kernel panics, the guest VM prints the entire kernel log in  `vmware.log` in the host's directory containing the VM. This log file contains the output of the `dmesg` command from the guest, and you can analyze it to help identify the cause of the boot problem. 
1365
+
1366
+Here's an example. After searching for `Guest:` in the following abridged `vmware.log`, this line appears, identifying the root cause of the reboot problem: 
1367
+
1368
+	2016-08-30T16:02:43.220-07:00| vcpu-0| I125: Guest: 
1369
+	<0>[1.125804] Kernel panic - not syncing: 
1370
+	VFS: Unable to mount root fs on unknown-block(0,0)
1371
+
1372
+Further inspection finds the following lines: 
1373
+
1374
+	2016-08-30T16:02:43.217-07:00| vcpu-0| I125: Guest: 
1375
+	<4>[    1.125782] VFS: Cannot open root device "sdc1" or unknown-block(0,0): error -6
1376
+	2016-08-30T16:02:43.217-07:00| vcpu-0| I125: Guest: 
1377
+	<4>[    1.125783] Please append a correct "root=" boot option; 
1378
+	here are the available partitions: 
1379
+	2016-08-30T16:02:43.217-07:00| vcpu-0| I125: Guest: 
1380
+	<4>[    1.125785] 0100            4096 ram0  (driver?)
1381
+	...
1382
+	0800         8388608 sda  driver: sd
1383
+	2016-08-30T16:02:43.220-07:00| vcpu-0| I125: Guest: 
1384
+	<4>[    1.125802]   0801         8384512 sda1 611e2d9a-a3da-4ac7-9eb9-8d09cb151a93
1385
+	2016-08-30T16:02:43.220-07:00| vcpu-0| I125: Guest: 
1386
+	<4>[    1.125803]   0802            3055 sda2 8159e59c-b382-40b9-9070-3c5586f3c7d6
1387
+
1388
+In this unlikely case, the GRUB configuration points to a root device named `sdc1` instead of the correct root device, `sda1`. You can fix the problem by restoring the GRUB GNU edit screen and the GRUB configuration file (`/boot/grub/grub.cfg`) to their original configurations. 
1389
+
1390
+### Investigating Strange Behavior
1391
+
1392
+If you rebooted to address strange behavior before the reboot of if you encountered strange behavior during the reboot but have reached the shell, you should analyze what happened since the previous boot. Start broad by running the following command to check the logs: 
1393
+
1394
+	journalctl
1395
+
1396
+Next, run the following command to look at what happened since the penultimate reboot: 
1397
+
1398
+	journalctl --boot=-1
1399
+
1400
+Then look at the log from the reboot: 
1401
+
1402
+	journalctl -b
1403
+
1404
+If need be, examine the logs for the kernel: 
1405
+
1406
+	journalctl -k
1407
+
1408
+Check which kernel is in use:
1409
+
1410
+	uname -r
1411
+
1412
+The kernel version of Photon OS in the full version is 4.4.8. The kernel version of in the OVA version is 4.4.8-esx. With the ESX version of the kernel, some services might not start. Run this command to check the overall status of services: 
1413
+
1414
+	systemctl status 
1415
+
1416
+If a service is in red, check it: 
1417
+
1418
+	systemctl status service-name
1419
+
1420
+Start it if need be: 
1421
+
1422
+	systemctl start service-name
1423
+
1424
+If looking at the journal and checking the status of services gets you nowhere, run the following `systemd-analyze` commands to examine the boot time and the speed with which services start.
1425
+
1426
+	systemd-analyze time
1427
+	systemd-analyze blame
1428
+	systemd-analyze critical-chain
1429
+ 
1430
+Keep in mind that the output of these commands might be misleading because one service might just be waiting for another service to finish initializing.
1431
+
1432
+### Investigating the Guest Kernel When You Cannot Log On
1433
+
1434
+If a VM running Photon OS and an application or virtual appliance is behaving so oddly that, for example, you cannot log on to the machine, you can still troubleshoot by extracting the kernel logs from the guest's memory and analyzing them with `gdb`. 
1435
+
1436
+This advanced troubleshooting method works when you are running Photon OS as the operating system for an application or appliance on VMware Workstation, Fusion, or ESXi. This approach assumes that the virtual machine running Photon OS is functioning normally. 
1437
+
1438
+This troubleshooting method has the following requirements: 
1439
+
1440
+* Root access to a Linux machine other than the one you are troubleshooting. It can be another Photon OS machine, Ubuntu, or another Linux variant. 
1441
+* The `vmss2core` utility from VMware. It is installed by default in VMware Workstation and some other VMware products. If your system doesn't already contain it, you can download it for free from https://labs.vmware.com/flings/vmss2core.
1442
+* A local copy of the Photon OS ISO of the exact same version and release number as the Photon OS machine that you are troubleshooting. 
1443
+
1444
+The process to use this troubleshooting method varies by environment. The examples in this section assume that the troublesome Photon OS virtual machine is running in VMware Workstation 12 Pro on a Microsoft Windows 8 Enterprise host. The examples also use an additional, fully functional Photon OS virtual machine running in Workstation.
1445
+
1446
+You can, however, use other hosts, hypervisors, and operating systems--but you will have to adapt the example process below to them. Directory paths, file names, and other aspects might be different on other systems. 
1447
+
1448
+**Overview**   
1449
+
1450
+The process to apply this troubleshooting method goes like this: On a local computer, you open a file on the Photon OS ISO that contains Linux debugging information. Then you suspend the troublesome Photon OS VM and extract the kernel memory logs from the VMware hypervisor running Photon OS. 
1451
+
1452
+Next, you use the vmss2core tool to convert the memory logs into core dump files. The vmss2core utility converts VMware checkpoint state files into formats that third-party debugging tools understand. It can handle both suspend (.vmss) and snapshot (.vmsn) checkpoint state files (hereafter referred to as a _vmss file_) as well as monolithic and non-monolithic (separate .vmem file) encapsulation of checkpoint state data. See [Debugging Virtual Machines with the Checkpoint to Core Tool](http://www.vmware.com/pdf/snapshot2core_technote.pdf).
1453
+
1454
+Finally, you prepare to run the gdb tool by using the debug info file from the ISO to create a `.gdbinit` file, which you can then analyze with the gdb shell on your local Linux machine.
1455
+
1456
+All three components must be in the same directory on a Linux machine.  
1457
+
1458
+**Process**
1459
+
1460
+First, obtain a local copy of the Photon OS ISO of the exact same version and release number as the Photon OS machine that you are troubleshooting and mount the ISO on a Linux machine (or open it on a Windows machine):
1461
+
1462
+	mount /mnt/cdrom
1463
+
1464
+Second, locate the following file. (If you opened the Photon OS ISO on a Windows computer, copy the following file to the root folder of a Linux machine.)
1465
+
1466
+	/RPMS/x86_64/linux-debuginfo-4.4.8-6.ph1.x86_64.rpm
1467
+
1468
+Third, on a Linux machine, run the following `rpm2cpio` command to convert the RPM file to a cpio file and to extract the contents of the RPM to the current directory:
1469
+
1470
+	rpm2cpio /mnt/cdrom/RPMS/x86_64/linux-debuginfo-4.4.8-6.ph1.x86_64.rpm | cpio -idmv
1471
+
1472
+From the extracted files, copy the following file to your current directory: 
1473
+
1474
+	cp usr/lib/debug/lib/modules/4.4.8/vmlinux-4.4.8.debug .
1475
+
1476
+Run the following command to download the dmesg functions that will help extract the kernel log from the coredump: <!--	wget https://www.kernel.org/doc/Documentation/kdump/gdbmacros.txt
1477
+-->
1478
+
1479
+	wget https://github.com/vmware/photon/blob/master/tools/scripts/gdbmacros-for-linux.txt
1480
+
1481
+Move the file as follows: 
1482
+
1483
+	mv gdbmacros-for-linux.txt .gdbinit
1484
+
1485
+Next, switch to your host machine so you can get the kernel memory files from the VM. Suspend the troublesome VM and locate the `.vmss` and `.vmem` files in the virtual machine's directory on the host. Example: 
1486
+
1487
+	C:\Users\tester\Documents\Virtual Machines\VMware Photon 64-bit (7)>dir
1488
+	 Volume in drive C is Windows
1489
+	 Directory of C:\Users\tester\Documents\Virtual Machines\VMware Photon 64-bit
1490
+	 (7)
1491
+	09/20/2016  12:22 PM    <DIR>          .
1492
+	09/20/2016  12:22 PM    <DIR>          ..
1493
+	09/19/2016  03:39 PM       402,653,184 VMware Photon 64-bit (7)-f6b070cd.vmem
1494
+	09/20/2016  12:11 PM         5,586,907 VMware Photon 64-bit (7)-f6b070cd.vmss
1495
+	09/20/2016  12:11 PM     1,561,001,984 VMware Photon 64-bit (7)-s001.vmdk
1496
+	...
1497
+	09/20/2016  12:11 PM           300,430 vmware.log
1498
+	...
1499
+
1500
+Now that you have located the `.vmss` and `.vmem` files, convert them to one or more core dump files by using the vmss2core tool that comes with Workstation. Here is an example of how to run the command. Be careful with your pathing, escaping, file names, and so forth--all of which might be different from this example on your Windows machine. 
1501
+
1502
+	C:\Users\shoenisch\Documents\Virtual Machines\VMware Photon 64-bit (7)>C:\"Program Files (x86)\VMware\VMware Workstation"\vmss2core.exe "VMware Photon 64-bit (7)-f6b070cd.vmss" "VMware Photon 64-bit (7)-f6b070cd.vmem"
1503
+
1504
+The result of this command is one or more files with a `.core` extension plus a digit. Truncated example: 
1505
+
1506
+	C:\Users\tester\Documents\Virtual Machines\VMware Photon 64-bit (7)>dir
1507
+	 Directory of C:\Users\tester\Documents\Virtual Machines\VMware Photon 64-bit(7)
1508
+	09/20/2016  12:22 PM       729,706,496 vmss.core0
1509
+
1510
+Copy the `.core` file or files to the your current directory on the Linux machine where you so that you can analyze it with gdb. 
1511
+
1512
+Run the following `gdb` command to enter the gdb shell attached to the memory core dump file. You might have to change the name of the `vmss.core` file in the example to match your `.core` file:
1513
+
1514
+	gdb vmlinux-4.4.8.debug vmss.core0
1515
+
1516
+	GNU gdb (GDB) 7.8.2
1517
+	Copyright (C) 2014 Free Software Foundation, Inc.
1518
+	License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
1519
+	This is free software: you are free to change and redistribute it. 
1520
+	There is NO WARRANTY, to the extent permitted by law. ...
1521
+	Type "show configuration" for configuration details.
1522
+	For bug reporting instructions, please see:
1523
+	<http://www.gnu.org/software/gdb/bugs/>.
1524
+	Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>.
1525
+	For help, type "help".
1526
+	Type "apropos word" to search for commands related to "word"...
1527
+	Reading symbols from vmlinux-4.4.8.debug...done.
1528
+	warning: core file may not match specified executable file.
1529
+	[New LWP 12345]
1530
+	Core was generated by `GuestVM'.
1531
+	Program terminated with signal SIGSEGV, Segmentation fault.
1532
+	#0  0xffffffff813df39a in insb (count=0, addr=0xffffc90000144000, port=<optimized out>)
1533
+	    at arch/x86/include/asm/io.h:316
1534
+	316     arch/x86/include/asm/io.h: No such file or directory.
1535
+	(gdb)
1536
+
1537
+In the results above, the _(gdb)_ of the last line is the prompt of the gdb shell. You can now analyze the core dump by using commands like `bt` (to perform a backtrace) and `dmesg` (to view the Photon OS kernel log and see Photon OS kernel error messages). 
1538
+
1539
+### Kernel Log Replication with VProbes
1540
+
1541
+Replicating the Photon OS kernel logs on the VMware ESXi host is an advanced but powerful method of troubleshooting a kernel problem. This method is applicable when the virtual machine running Photon OS is hanging or inaccessible because, for instance, the hard disk has failed.
1542
+
1543
+There is a prerequisite, however: You must have preemptively enabled the VMware VProbes facility on the VM before a problem rendered it inaccessible. You must also create a VProbes script on the ESXi host, but you can do that after the fact. 
1544
+
1545
+Although the foresight to implement these prerequisites might limit the application of this troubleshooting method for production systems, the method can be particularly useful in analyzing kernel issues when testing an application or appliance that is running on Photon OS.   
1546
+
1547
+There are two similar ways in which you can replicate the Photon OS kernel logs on ESXi by using VProbes. The first modifies the VProbes script so that it works only for the VM that you set; it uses a hard-coded address. The second uses an abstraction instead of a hard-coded address so that the same VProbes script can be used for any VM on an ESXi host that you have enabled for VProbe and copied its kernel symbol table (kallsyms) to ESXi.
1548
+
1549
+For more information on VMware VProbes, see [VProbes: Deep Observability Into the ESXi Hypervisor](https://labs.vmware.com/vmtj/vprobes-deep-observability-into-the-esxi-hypervisor) and the [VProbes Programming Reference](http://www.vmware.com/pdf/ws7_f3_vprobes_reference.pdf).
1550
+
1551
+**Using VProbes Script with a Hard-Coded Address**
1552
+
1553
+Here's how to set a VProbe for an individual VM: 
1554
+
1555
+First, power off the VM so that you can turn on the VProbe facility. Edit the `.vmx` configuration file for the VM. The file resides in the directory that contains the VM in the ESXi data store. Add the following line of code to the `.vmx` file and then power the VM on: 
1556
+
1557
+	vprobe.enable = "TRUE"
1558
+
1559
+When you edit the `.vmx` file to add the above line of code, you must first turn off the VM--otherwise, your changes will not persist. 
1560
+
1561
+Second, obtain the kernel log_store function address by connecting to the VM with SSH and running the following commands as root. (Photon OS uses the `kptr_restrict` setting to place restrictions on the kernel addresses exposed through `/proc` and other interfaces. This setting hides exposed kernel pointers to prevent attackers from exploiting kernel write vulnerabilities. When you are done using VProbes, you should return `kptr_restrict` to the original setting of `2` by rebooting.)
1562
+
1563
+	echo 0 > /proc/sys/kernel/kptr_restrict
1564
+	grep log_store /proc/kallsyms
1565
+
1566
+The output of the `grep` command will look similar to the following string. The first set of characters (without the `t`) is the log_store function address:
1567
+
1568
+	ffffffff810bb680 t log_store
1569
+
1570
+Third, connect to the ESXi host with SSH so that you can create a VProbes script. Here's the template for the script; `log_store` in the first line is a placeholder for the VM's log_store function address: 
1571
+
1572
+	GUEST:ENTER:log_store {
1573
+	   string dst;
1574
+	   getgueststr(dst, getguest(RSP+16) & 0xff, getguest(RSP+8));
1575
+	   printf("%s\n", dst);
1576
+	}
1577
+
1578
+On the ESXi host, create a new file, add the template to it, and then change `log_store` to the function address that was the output from the grep command on the VM. 
1579
+
1580
+You must add a `0x` prefix to the function address. In this example, the modified template looks like this: 
1581
+
1582
+	GUEST:ENTER:0xffffffff810bb680 {
1583
+	   string dst;
1584
+	   getgueststr(dst, getguest(RSP+16) & 0xff, getguest(RSP+8));
1585
+	   printf("%s\n", dst);
1586
+	}
1587
+
1588
+Save your VProbes script as `console.emt` in the `/tmp` directory. (The file extension for VProbe scripts is `.emt`.) 
1589
+
1590
+While still connected to the ESXi host with SSH, run the following command to obtain the ID of the virtual machine that you want to troubleshoot: 
1591
+
1592
+	vim-cmd vmsvc/getallvms
1593
+
1594
+This command lists all the VMs running on the ESXi host. Find the VM you want to troubleshoot in the list and make a note of its ID. 
1595
+
1596
+Finally, run the following command to print all the kernel messages from Photon OS in your SSH console; replace `<VM ID>` with the ID of your VM:  
1597
+
1598
+	vprobe -m <VM ID> /tmp/console.emt
1599
+
1600
+When you're done, type `Ctrl-C` to stop the loop. 
1601
+
1602
+**A Reusable VProbe Script Using the kallsyms File**
1603
+
1604
+Here's how to create one VProbe script and use for all the VMs on your ESXi host. 
1605
+
1606
+First, power off the VM and turn on the VProbe facility on each VM that you want to be able to analyze. Add `vprobe.enable = "TRUE"` to the VM's `.vmx` configuration file. See the instructions above. 
1607
+
1608
+Second, power on the VM, connect to it with SSH, and run the following command as root: 
1609
+
1610
+	echo 0 > /proc/sys/kernel/kptr_restrict
1611
+
1612
+Third, connect to the ESXi host with SSH to create the following VProbes script and save it as `/tmp/console.emt`:
1613
+
1614
+	GUEST:ENTER:log_store {
1615
+	   string dst;
1616
+	   getgueststr(dst, getguest(RSP+16) & 0xff, getguest(RSP+8));
1617
+	   printf("%s\n", dst);
1618
+	}
1619
+
1620
+Fourth, from the ESXi host, run the following command to copy the VM's `kallysms` file to the `tmp` directory on the ESXi host: 
1621
+
1622
+	scp root@<vm ip address>:/proc/kallsyms /tmp
1623
+
1624
+While still connected to the ESXi host with SSH, run the following command to obtain the ID of the virtual machine that you want to troubleshoot: 
1625
+
1626
+	vim-cmd vmsvc/getallvms
1627
+
1628
+This command lists all the VMs running on the ESXi host. Find the VM you want to troubleshoot in the list and make a note of its ID. 
1629
+
1630
+Finally, run the following command to print all the kernel messages from Photon OS in your SSH console; replace `<VM ID>` with the ID of your VM. When you're done, type `Ctrl-C` to stop the loop.  
1631
+
1632
+	vprobe -m <VM ID> -k /tmp/kallysyms /tmp/console.emt
1633
+
1634
+You can use a directory other than `tmp` if you want.
1635
+
1636
+<!--
1637
+### Deep Kernel Analysis with the Crash Utility
1638
+
1639
+-->
1640
+
1641
+<!-- 
1642
+
1643
+### Go to the Debug Shell
1644
+
1645
+‘ panic=1 init=/bin/bash’
1646
+mount –o rw,remount /
1647
+cd /lib/systemd/system/multi-user.target.wants
1648
+ln –s ../debug-shell.service
1649
+umount /
1650
+sync
1651
+exit
1652
+
1653
+After reboot debug-shell will be available on tty9. No password required.
1654
+
1655
+-->
1656
+
1657
+
1658
+## Performance Issues
1659
+
1660
+Performance issues can be difficult to troubleshoot because so many variables play a role in overall system performance. Interpreting performance data often depends on the context and the situation. To better identify and isolate variables and to gain insight into performance data, you can use the troubleshooting tools on Photon OS to diagnose the system.  
1661
+
1662
+If you have no indication what the cause of a performance degradation might be, start by getting a broad picture of the system's state. Then look for clues in the data that might point to a cause. The systemd journal is a useful place to start. 
1663
+
1664
+The `top` tool can unmask problems caused by processes or applications overconsuming CPUs, time, or RAM. If the percent of CPU utilization is consistently high with little idle time, for example, there might be a runaway process. Restart it. 
1665
+
1666
+The `netstat --statistics` command can identify bottlenecks causing performance issues. It lists interface statistics for different protocols. 
1667
+
1668
+If `top` and `netstat` reveal no clues, run the `strace ls -al` to view every system call.
1669
+
1670
+The following `watch` command can help dynamically monitor a command to help troubleshoot performance issues:
1671
+
1672
+	watch -n0 --differences <command>
1673
+
1674
+You can, for example, combine `watch` with the `vmstat` command to dig deeper into statistics about virtual memory, processes, block input-output, disks, and CPU activity. Are there any bottlenecks? 
1675
+
1676
+Another option is to use the `dstat` utility. It shows a live, running list of statistics about system resources. 
1677
+
1678
+In addition, `systemd-analyze`, which reveals performance statistics for boot times, can help troubleshoot slow system boots and incorrect unit files.
1679
+
1680
+The additional tools that you select depend on the clues that your initial investigation reveals. The following tools can also help troubleshoot performance: `sysstat`, `sar`, `systemtap`, and `crash`. 
1681
+
1682
+
0 1683
new file mode 100644
... ...
@@ -0,0 +1,97 @@
0
+# Network PXE Boot
1
+
2
+Photon OS supports the Preboot Execution Environment, or PXE, over a network connection. This document describes how to set up a PXE boot server to install Photon OS.
3
+
4
+# Server Setup
5
+
6
+To set up a PXE server, you will need to have the following:
7
+
8
+* A DHCP server to allow hosts to get an IP address.
9
+* A TFTP server, which is a file transfer protocol similar to FTP with no authentication.
10
+* Optionally, an HTTP server. The HTTP server will serve the RPMs yum repo, or you can use the official Photon OS repo on Bintray. Also, this HTTP server can be used if you want to provide a kickstart config for unattended installation.
11
+
12
+The instructions to set up the servers assume you have an Ubuntu 14.04 machine with a static IP address of `172.16.78.134`.
13
+
14
+## DHCP Setup
15
+* Install the DHCP server:
16
+```
17
+  sudo apt-get install isc-dhcp-server
18
+```
19
+* Edit the Ethernet interface in `/etc/default/isc-dhcp-server` to `INTERFACES="eth0"`
20
+* Edit the DHCP configuration in `/etc/dhcp/dhcpd.conf` to allow machines to boot and get an IP address via DHCP in the range `172.16.78.230 - 172.16.78.250`
21
+```
22
+  subnet 172.16.78.0 netmask 255.255.255.0 {
23
+    range 172.16.78.230 172.16.78.250;
24
+    option subnet-mask 255.255.255.0;
25
+    option routers 172.16.78.134;
26
+    option broadcast-address 172.16.78.255;
27
+    filename "pxelinux.0";
28
+    next-server 172.16.78.134;
29
+  }
30
+
31
+```
32
+* Restart the DHCP server: 
33
+```
34
+  sudo service isc-dhcp-server restart
35
+```
36
+
37
+## TFTP Setup
38
+* Install the TFTP server:
39
+```
40
+  sudo apt-get install tftpd-hpa
41
+```
42
+* Enable the boot service and restart the service:
43
+```
44
+  sudo update-inetd --enable BOOT
45
+  sudo service tftpd-hpa restart
46
+```
47
+
48
+## Optional: HTTP server setup
49
+
50
+This step is only needed if you are planning to serve the ks (kickstart) config file through this server; refer to [Kickstart support](kickstart.md) for details.
51
+* Serving your local yum repo.
52
+You can install apache http web server
53
+```
54
+sudo apt-get install apache2
55
+```
56
+Mount the Photon iso to get the RPMS repo and sample ks config file.
57
+```
58
+mkdir /mnt/photon-iso
59
+sudo mount <photon_iso> /mnt/photon-iso/
60
+```
61
+Copy the RPMS repo.
62
+```
63
+cp -r /mnt/photon-iso/RPMS /var/www/html/
64
+```
65
+To support ks, you can copy the sample config file from the iso and edit it; refer to [Kickstart support](kickstart.md) for details.
66
+```
67
+cp /mnt/photon-iso/isolinux/sample_ks.cfg /var/www/html/my_ks.cfg
68
+```
69
+
70
+## PXE boot files setup
71
+* Mount photon.iso to get Linux and initrd images:
72
+```
73
+mkdir /mnt/photon-iso
74
+sudo mount <photon_iso> /mnt/photon-iso/
75
+```
76
+* Setting the PXE boot files:
77
+```
78
+wget https://www.kernel.org/pub/linux/utils/boot/syslinux/syslinux-6.03.tar.gz
79
+tar -xvf syslinux-6.03.tar.gz
80
+pushd /var/lib/tftpboot
81
+cp -r /mnt/photon-iso/isolinux/* .
82
+cp ~/syslinux-6.03/bios/com32/elflink/ldlinux/ldlinux.c32 .
83
+cp ~/syslinux-6.03/bios/com32/lib/libcom32.c32 .
84
+cp ~/syslinux-6.03/bios/com32/libutil/libutil.c32 .
85
+cp ~/syslinux-6.03/bios/com32/menu/vesamenu.c32 .
86
+cp ~/syslinux-6.03/bios/core/pxelinux.0 .
87
+mkdir pxelinux.cfg
88
+mv isolinux.cfg pxelinux.cfg/default
89
+```
90
+* Update repo param to point to http yum repo; you may pass official photon bintray repo.
91
+```
92
+sed -i "s/append/append repo=http:\/\/172.16.78.134\/RPMS/g" menu.cfg
93
+popd
94
+```
95
+* Optionally, you can add your ks config file; see [Kickstart support](kickstart.md) for details.
96
+
0 97
new file mode 100644
... ...
@@ -0,0 +1,23 @@
0
+# User Guide
1
+
2
+The Photon OS *User Guide* provides information about how to use Photon OS as a developer. 
3
+
4
+The *User Guide* covers the basics of setting up a Network PXE Boot Server, working with Kickstart and Kubernetes, mounting remote file systems, and installing and using Lightwave. 
5
+
6
+**Product version: 3.0**
7
+
8
+This documentation applies to all 3.0.x releases.
9
+
10
+## Intended Audiences
11
+
12
+This information is intended for Photon OS developers who use Photon OS.
13
+
14
+----------
15
+
16
+Copyright &copy; 2016-2018 VMware, Inc. All rights reserved. [Copyright and trademark information](http://pubs.vmware.com/copyright-trademark.html). Any feedback you provide to VMware is subject to the terms at [www.vmware.com/community_terms.html](http://www.vmware.com/community_terms.html).
17
+
18
+**VMware, Inc.**<br>
19
+3401 Hillview Ave.<br>
20
+Palo Alto, CA 94304
21
+
22
+[www.vmware.com](http://www.vmware.com)
0 23
new file mode 100644
... ...
@@ -0,0 +1,14 @@
0
+# User Guide
1
+
2
+- [User Guide](README.md)
3
+    - [Setting Up a Network PXE Boot Server](PXE-boot.md)
4
+    - [Working with Kickstart](kickstart.md)
5
+    - [Kubernetes on Photon OS](kubernetes_intro.md)
6
+        -  [Prerequisites](prerequisites.md)
7
+        - [Running Kubernetes on Photon OS](running_kubernetes.md)
8
+            - [System Information](system_information.md)
9
+            - [Prepare the Hosts](prepare_the_hosts.md)
10
+            - [Configure Kubernetes Services on Master](configure_kubernetes_on_master.md)
11
+            - [Configure Kubernetes Services on Node](configure_kubernetes_on_node.md)
12
+    - [Mounting Remote File Systems](nfs-utils.md)
13
+    
0 14
\ No newline at end of file
1 15
new file mode 100644
... ...
@@ -0,0 +1,57 @@
0
+# Configure Kubernetes Services on the Master
1
+
2
+Perform the following steps to configure Kubernetes services on the master:
3
+
4
+1. Edit `/etc/kubernetes/apiserver` to appear as such.  The `service_cluster_ip_range` IP addresses must be an unused block of addresses, not used anywhere else.  They do not need to be routed or assigned to anything.
5
+
6
+    ```
7
+    # The address on the local server to listen to.
8
+    KUBE_API_ADDRESS="--address=0.0.0.0"
9
+    
10
+    # Comma separated list of nodes in the etcd cluster
11
+    KUBE_ETCD_SERVERS="--etcd_servers=http://127.0.0.1:4001"
12
+    
13
+    # Address range to use for services
14
+    KUBE_SERVICE_ADDRESSES="--service-cluster-ip-range=10.254.0.0/16"
15
+    
16
+    # Add your own
17
+    KUBE_API_ARGS=""
18
+    ```
19
+
20
+1. Start the appropriate services on master:
21
+
22
+    ```
23
+    for SERVICES in etcd kube-apiserver kube-controller-manager kube-scheduler; do
24
+    	systemctl restart $SERVICES
25
+    	systemctl enable $SERVICES
26
+    	systemctl status $SERVICES
27
+    done
28
+    ```
29
+
30
+1. To add the other node, create the following `node.json` file on the Kubernetes master node:
31
+
32
+    ```json
33
+    {
34
+        "apiVersion": "v1",
35
+        "kind": "Node",
36
+        "metadata": {
37
+            "name": "photon-node",
38
+            "labels":{ "name": "photon-node-label"}
39
+        },
40
+        "spec": {
41
+            "externalID": "photon-node"
42
+        }
43
+    }
44
+    ```
45
+    
46
+1. Create a node object internally in your Kubernetes cluster by running the following command:
47
+    
48
+    ```console
49
+    $ kubectl create -f ./node.json
50
+    
51
+    $ kubectl get nodes
52
+    NAME                LABELS              STATUS
53
+    photon-node         name=photon-node-label     Unknown
54
+    ```
55
+
56
+**Note**: The above example only creates a representation for the node `photon-node` internally. It does not provision the actual `photon-node`. Also, it is assumed that `photon-node` (as specified in `name`) can be resolved and is reachable from the Kubernetes master node. 
0 57
\ No newline at end of file
1 58
new file mode 100644
... ...
@@ -0,0 +1,55 @@
0
+#  Configure the Kubernetes services on Node
1
+
2
+Perform the following steps to configure the kubelet on the node: 
3
+
4
+1. Edit /etc/kubernetes/kubelet to appear like this:
5
+
6
+    ```
7
+    ###
8
+    # Kubernetes kubelet (node) config
9
+    
10
+    # The address for the info server to serve on (set to 0.0.0.0 or "" for all interfaces)
11
+    KUBELET_ADDRESS="--address=0.0.0.0"
12
+    
13
+    # You may leave this blank to use the actual hostname
14
+    KUBELET_HOSTNAME="--hostname_override=photon-node"
15
+    
16
+    # location of the api-server
17
+    KUBELET_API_SERVER="--api_servers=http://photon-master:8080"
18
+    
19
+    # Add your own
20
+    #KUBELET_ARGS=""
21
+    ```
22
+
23
+1. Start the appropriate services on the node (photon-node):
24
+
25
+    ```sh
26
+    for SERVICES in kube-proxy kubelet docker; do 
27
+        systemctl restart $SERVICES
28
+        systemctl enable $SERVICES
29
+        systemctl status $SERVICES 
30
+    done
31
+    ```
32
+
33
+1. Check to make sure that the cluster can now see the photon-node on photon-master and that its status changes to _Ready_.
34
+
35
+   ```console
36
+   kubectl get nodes
37
+   NAME                LABELS              STATUS
38
+   photon-node          name=photon-node-label     Ready
39
+   ```
40
+   
41
+   If the node status is `NotReady`, verify that the firewall rules are permissive for Kubernetes.  
42
+   
43
+   * Deletion of nodes: To delete _photon-node_ from your Kubernetes cluster, one should run the following on photon-master (please do not do it, it is just for information):
44
+   
45
+   ```sh
46
+   kubectl delete -f ./node.json
47
+   ```
48
+
49
+## Result
50
+
51
+You should have a functional cluster. You can now launch a test pod. For an introduction to working with Kubernetes, see [Kubernetes 101](http://kubernetes.io/docs/user-guide/walkthrough/).
52
+
53
+
54
+
0 55
new file mode 100644
... ...
@@ -0,0 +1,92 @@
0
+# Kickstart Support in Photon OS
1
+
2
+Photon OS works with kickstart for unattended, automated installations. The kickstart configuration file can either reside in the CD-ROM attached to the host or be served through an HTTP server.
3
+
4
+## Kickstart Capabilities
5
+
6
+Photon OS supports the following configurations with kickstart:
7
+
8
+* Setting the hostname
9
+* Setting the password
10
+* Setting the disk to install
11
+* Selecting whether to install the full or the minimal version of Photon OS 
12
+* Applying a post-installation script
13
+* Adding public keys to allow the root account to log in through SSH
14
+
15
+Here is a sample kickstart configuration file:
16
+
17
+```
18
+{
19
+    "hostname": "<hostname>",
20
+    "password": 
21
+        {
22
+            "crypted": <true|false>,
23
+            "text": "<password, either plain text or encrypted>"
24
+        },
25
+    "disk": "/dev/sda",
26
+    "type": "minimal",
27
+    "postinstall": [
28
+                    "#!/bin/sh",
29
+                    "echo \"Hello World\" > /etc/postinstall"
30
+                   ],
31
+    "public_key": "<public_key>"
32
+}
33
+```
34
+
35
+## Unattended Installation Through Kickstart
36
+
37
+For an unattended installation, you pass the `ks=<config_file>` parameter to the kernel command. To pass the config file, there are two options: by providing it on the ISO or by serving it from an HTTP server. 
38
+
39
+The syntax to pass the config-file to the kernel through the ISO takes the following form: 
40
+
41
+    ks=cdrom:/<config_file_path>
42
+
43
+Here is an example: 
44
+
45
+    ks=cdrom:/isolinux/my_ks.cfg
46
+
47
+The syntax to serve the config-file to the kernel from an HTTP server (NOTE: DO NOT use https:// here) takes the following form: 
48
+
49
+    ks=http://<server>/<config_file_path>
50
+
51
+## Building an ISO with a Kickstart Config File
52
+
53
+Here's an example of how to add a kickstart config file to the Photon OS ISO by mounting the ISO on an Ubuntu machine and then rebuilding the ISO. The following example assumes you can adapt the sample kickstart configuration file that comes with the Photon OS ISO to your needs. You can obtain the Photon OS ISO for free from Bintray at the following URL: 
54
+
55
+[https://bintray.com/vmware/photon](https://bintray.com/vmware/photon)
56
+
57
+Once you have the ISO, mount it. 
58
+
59
+    mkdir /tmp/photon-iso
60
+    sudo mount photon.iso /tmp/photon-iso
61
+
62
+Then copy the content of the ISO to a writable directory and push it into the directory stack: 
63
+
64
+    mkdir /tmp/photon-ks-iso
65
+    cp -r /tmp/photon-iso/* /tmp/photon-ks-iso/
66
+    pushd /tmp/photon-ks-iso/
67
+
68
+Next, copy the sample kickstart configuration file that comes with the Photon OS ISO and modify it to suit your needs. In the ISO, the sample kickstart config file appears in the `isolinux` directory and is named `sample_ks.cfg.` The name of the directory and the name of the file might be in all uppercase letters. 
69
+
70
+    cp isolinux/sample_ks.cfg isolinux/my_ks.cfg
71
+    nano isolinux/my_ks.cfg
72
+
73
+With a copy of the sample kickstart config file open in nano, make the changes that you want. 
74
+
75
+Now add a new item to the installation menu by modifying `isolinux/menu.cfg`:
76
+
77
+    cat >> isolinux/menu.cfg << EOF
78
+    label my_unattended
79
+    	menu label ^My Unattended Install
80
+    	kernel vmlinuz
81
+    	append initrd=initrd.img root=/dev/ram0 ks=cdrom:/isolinux/my_ks.cfg loglevel=3
82
+    EOF
83
+
84
+Finally, rebuild the ISO so that it includes your kickstart config file: 
85
+
86
+    mkisofs -R -l -L -D -b isolinux/isolinux.bin -c isolinux/boot.cat \
87
+    		-no-emul-boot -boot-load-size 4 -boot-info-table -V "PHOTON_$(date +%Y%m%d)" \
88
+    		. > <new_iso_path>.iso
89
+
90
+    popd
91
+
0 92
new file mode 100644
... ...
@@ -0,0 +1,16 @@
0
+# Kubernetes on Photon OS
1
+-----------------------------------------------------
2
+
3
+You can use Kubernetes with Photon OS. The instructions in this section present a manual configuration that gets one worker node running to help you understand the underlying packages, services, ports, and so forth. 
4
+
5
+The Kubernetes package provides several services: kube-apiserver, kube-scheduler, kube-controller-manager, kubelet, kube-proxy.  These services are managed by systemd. Their configuration resides in a central location: /etc/kubernetes.  
6
+
7
+
8
+- [Prerequisites](prerequisites.md)
9
+- [Running Kubernetes on Photon OS](running_kubernetes.md)
10
+    - [System Information](system_information.md)
11
+    - [Prepare the Hosts](prepare_the_hosts.md)
12
+    - [Configure Kubernetes Services on Master](configure_kubernetes_on_master.md)
13
+    - [Configure Kubernetes Services on Node](configure_kubernetes_on_node.md)
14
+
15
+
0 16
new file mode 100644
... ...
@@ -0,0 +1,47 @@
0
+# Photon NFS Utilities for Mounting Remote File Systems
1
+
2
+This document describes how to mount a remote file system on Photon OS by using nfs-utils, a commonly used package that contains tools to work with the Network File System protocol (NFS).
3
+
4
+## Check a Remote Server
5
+
6
+```
7
+showmount  -e nfs-servername or ip
8
+```
9
+
10
+Example:  
11
+
12
+```
13
+showmount -e eastern-filer.eng.vmware.com
14
+showmount -e 10.109.87.129
15
+```
16
+
17
+## Mount a Remote File System in Photon Full
18
+
19
+The nfs-utils package is installed by default in the full version of Photon OS. Here is how to mount a directory through NFS on Photon OS:  
20
+
21
+```
22
+mount -t nfs nfs-ServernameOrIp:/exportfolder /mnt/folder
23
+```
24
+
25
+Example:  
26
+
27
+```
28
+mount -t nfs eastern-filer.eng.vmware.com:/export/filer /mnt/filer
29
+mount -t nfs 10.109.87.129:/export /mnt/export
30
+```
31
+
32
+## Mount a Remote File System in Photon Minimal
33
+
34
+The nfs-utils package is not installed in the minimal version of Photon OS. You install it by running the following command: 
35
+
36
+	tdnf install nfs-utils
37
+
38
+For more information on installing packages with the tdnf command, see the [Photon OS Administration Guide](https://github.com/vmware/photon/blob/master/docs/photon-admin-guide.md).
39
+
40
+Once nfs-utils is installed, you can mount a file system by running the following commands, replacing the placeholders with the path of the directory that you want to mount: 
41
+
42
+```
43
+mount nfs
44
+```
45
+mount -t nfs nfs-ServernameOrIp:/exportfolder /mnt/folder
46
+```
0 47
new file mode 100644
... ...
@@ -0,0 +1,57 @@
0
+# Prepare the Hosts
1
+
2
+The following packages should already be installed on the full version of Photon OS, but you might have to install them on the minimal version of Photon OS. If the `tdnf` command returns "Nothing to do," the package is already installed.
3
+    
4
+* Install Kubernetes on all hosts--both `photon-master` and `photon-node`.
5
+
6
+```
7
+tdnf install kubernetes
8
+``` 
9
+
10
+* Install iptables on photon-master and photon-node:
11
+
12
+```
13
+tdnf install iptables
14
+```
15
+
16
+* Open the tcp port 8080 (api service) on the photon-master in the firewall
17
+
18
+```
19
+iptables -A INPUT -p tcp --dport 8080 -j ACCEPT
20
+```
21
+
22
+* Open the tcp port 10250 (api service) on the photon-node in the firewall
23
+
24
+```
25
+iptables -A INPUT -p tcp --dport 10250 -j ACCEPT
26
+```
27
+
28
+
29
+* Install Docker on photon-node:
30
+
31
+```
32
+tdnf install docker
33
+```
34
+
35
+* Add master and node to /etc/hosts on all machines (not needed if the hostnames are already in DNS). Make sure that communication works between photon-master and photon-node by using a utility such as ping.
36
+
37
+```sh
38
+echo "192.168.121.9	photon-master
39
+192.168.121.65	photon-node" >> /etc/hosts
40
+```
41
+
42
+* Edit /etc/kubernetes/config, which will be the same on all the hosts (master and node), so that it contains the following lines:
43
+
44
+```
45
+# Comma separated list of nodes in the etcd cluster
46
+KUBE_MASTER="--master=http://photon-master:8080"
47
+
48
+# logging to stderr routes it to the systemd journal
49
+KUBE_LOGTOSTDERR="--logtostderr=true"
50
+
51
+# journal message level, 0 is debug
52
+KUBE_LOG_LEVEL="--v=0"
53
+
54
+# Should this cluster be allowed to run privileged docker containers
55
+KUBE_ALLOW_PRIV="--allow_privileged=false"
56
+```
0 57
new file mode 100644
... ...
@@ -0,0 +1,3 @@
0
+# Prerequisites
1
+
2
+You need two or more machines with the 3.0 general availability or later version of Photon OS installed.
0 3
\ No newline at end of file
1 4
new file mode 100644
... ...
@@ -0,0 +1,6 @@
0
+# Running Kubernetes on Photon OS
1
+
2
+The procedure describes how to break the services up between the hosts.  
3
+
4
+The first host, `photon-master`, is the Kubernetes master.  This host runs the `kube-apiserver`, `kube-controller-manager`, and `kube-scheduler`.  In addition, the master also runs `etcd`. Although `etcd` is not needed on the master if `etcd` runs on a different host, this guide assumes that `etcd` and the Kubernetes master run on the same host. The remaining host, `photon-node`, is the node and runs `kubelet`, `proxy`, and `docker`.
5
+
0 6
new file mode 100644
... ...
@@ -0,0 +1,8 @@
0
+# System Information
1
+
2
+Hosts:
3
+
4
+```
5
+photon-master = 192.168.121.9
6
+photon-node = 192.168.121.65
7
+```
0 8
\ No newline at end of file
1 9
deleted file mode 100644
... ...
@@ -1,56 +0,0 @@
1
-# Using the Photon Management Daemon
2
-
3
-The Photon Management Daemon (PMD) that ships with Photon OS 2.0 provides the remote management of a Photon instance via several APIs: a command line client (pmd-cli), a REST API, and a Python API. The PMD provides the ability to manage network interfaces, packages, firewalls, users, and user groups.
4
-
5
-## Installing the pmd Package
6
-
7
-The pmd package is included with your Photon OS 2.0 distribution. To make sure that you have the latest version, you can run:
8
-~~~~
9
-# tdnf install pmd
10
-# systemctl start pmd
11
-~~~~
12
-## Available APIs
13
-
14
-### pmd-cli
15
-
16
-The pmd-cli utility enables Photon customers to invoke API requests securely on local and remote servers. For details, see [Photon Management Daemon Command-line Interface (pmd-cli)](pmd-cli.md).
17
-
18
-### PMD REST API
19
-
20
-The PMD REST API is an openapi 2.0 specification. Once the pmd package is installed, you can use a Swagger UI tool to browse the REST API specifications (/etc/pmd/restapispec.json).
21
-You can also browse it using the copenapi_cli tool that comes with the pmd package:
22
-~~~~
23
-# copenapi_cli --apispec /etc/pmd/restapispec.json
24
-~~~~
25
-For more information about the copenapi_cli tool, refer to [github.com/vmware/copenapi](https://github.com/vmware/copenapi).
26
-
27
-### PMD Python API
28
-
29
-Python3 is included with your Photon OS 2.0 distribution. PMD Python interfaces are available for python3 (pmd-python3) and python2 (pmd-python2). You can use tdnf to ensure that the latest version is installed:
30
-~~~~
31
-# tdnf install pmd-python3
32
-# systemctl start pmd
33
-~~~~
34
-To navigate the help documentation for the pmd Python packages:
35
-~~~~
36
-# python3
37
->>> import pmd
38
->>> net = pmd.server().net
39
->>> help(pmd)
40
-~~~~
41
-To show help text for individual interfaces:
42
-~~~~
43
->>> help(pmd.server().net)
44
->>> help(pmd.server().pkg)
45
->>> help(pmd.server().firewall)
46
->>> help(pmd.server().user)
47
-~~~~
48
-For details about the network commands, see also the [Network Configuration Manager - Python API](netmgr.python.md).
49
-
50
-### PMD C Documentation
51
-
52
-PMD C APIs are defined in the header files (pmd_fwmgmt.h, pmd_netmgr.h, pmd_pkgmgmt.h, pmd_usermgmt.h) that are stored in the following location:  
53
-~~~~
54
-[https://github.com/vmware/pmd/tree/master/include](https://github.com/vmware/pmd/tree/master/include)
55
-~~~~
56
-For details about the network commands, see also the [Network Configuration Manager - C API](netmgr.c.md).