Skip to content

Guide to Install Photon in VMware Workstation and Deploy a Container

photon-logoOn April 20th, 2015, VMware announced Photon, its own container-friendly Linux distribution. Photon is a technology preview of a small footprint Linux container host. It has been released as open source software and is available at GitHub.

This post explains how to install Photon in VMware Workstation, do some basic configuration and implement the first container.

  1. Download the latest pre-built ISO image from GitHub (photon-1.0-TP1.iso)
  2. Open VMware Workstation and create a New Virtual Machine
  3. Select Typical
    vmware-photon-workstation-typical
  4. Select Installer disc image file (iso), hit Browse... and open the Photon ISO file
    vmware-photon-workstation-installer-iso
  5. Set Other Linux 3.x kernel 64-bit as Guest Operating System
    vmware-photon-workstation-other-linux3-x64
  6. Set a name for the Virtual Machine
    vmware-photon-workstation-vm-name
  7. Hit Next. You do not have to change anything here.vmware-photon-workstation-capacity
  8. Click on Customize Hardware...
    vmware-photon-workstation-customize-hardware
  9. Remove USB Controller, Sound Card and Printer  
    vmware-photon-workstation-remove-unnecessary-devicevmware-photon-workstation-hardware-settings
  10. Press Close and Finish virtual Machine creation
  11. Power on the Photon Virtual Machine
    vmware-photon-power-on
  12. Select Install
    vmware-photon-workstation-install
  13. Accept License Agreement
  14. Confirm the disk to be automatically partitioned
    vmware-photon-workstation-disk-partitioning
  15. Confirm to erase the disk
  16. Select the deployment model. For testing purposes we are going to install Photon Full OS
    vmware-photon-workstation-full-os
    Photon OS (Micro): Completely stripped down version of Photon that can serve as an application container.
    Photon Container OS (Minimum): Very lightweight version of the container host that is best suited for container management and hosting.
    Photon Full OS (All): Several additional packages to enhance the authoring and packaging of containerized applications and/or system customization.
    Photon Custom OS: Provides complete flexibility and control for how you want to create a specific container runtime environment.
  17. Enter a hostname
    vmware-photon-workstation-hostname
  18. Set the root password vmware-photon-workstation-password
  19. Press any key to reboot the Virtual Machinevmware-photon-workstation-installation-finished

That's it. Your small footprint Photon will now boot and you can login as root with the password set during installation. vmware-photon-resources

Installing the first Container Application
Now that you have Photon up and running, you might want to do something. Start Docker and make it to start automatically with the system:

root [ ~ ]# systemctl start docker
root [ ~ ]# systemctl enable docker

vmware-photon-start-docker

As I don't like working with the console, I activate SSH:

root [ ~ ]# nano /etc/ssh/sshd_config

Change PermitRootLogin no to PermitRootLogin yes
vmware-photon-permit-root-login-sshd
Restart sshd and login with a SSH client like putty.

root [ ~ ]# systemctl restart sshd

Now it's time to run the first container. There is a huge marketplace for containers at hub.docker.com. To test the installation, you can use the hallo-world container.

root [ ~ ]# docker run hello-world

vmware-photon-hallo-world

VMware has also a small web-based container for testing:

root [ ~ ]# docker run -d -p 80:80 vmwarecna/nginx

vmware-photon-nginx

5 thoughts on “Guide to Install Photon in VMware Workstation and Deploy a Container”

  1. vi is not available when you choose to install "Photon Container OS". either nano or

    sed -i 's/PermitRootLogin no/PermitRootLogin yes/g' /etc/ssh/sshd_config

    are your friends there

    1. The network configuration is stored in /etc/systemd/network/10-dhcp-eth0.network
      You can simply edit this file as explained here. It's reboot safe of course.

  2. Pingback: Basic Commands for VMware Photon and Docker | Virten.net

Leave a Reply to fgrehl Cancel reply

Your email address will not be published. Required fields are marked *