How to create a Photon Blueprint in vRA/vCAC

Updated 6/16/16. Photon OS 1.0 now works out of the box –> https://vmware.github.io/photon/ This guide is to help you create a blueprint in vRA/vCAC for VMware’s new Photon operating system. Note that Photon is currently a technical preview so there is still quite a bit of development yet to happen. As you may have discovered already, one thing missing is the ability to use vCenter guest customization. This is planned for future releases. Luckily Photon does support the openVMtools package. This allows you to use vRealize Orchestrator (vRO) to run scripts in the guest. In this guide I am using vRO to extend vRealize Automation to customize the Photon guest using custom properties.

Pre-Reqs

  • at least a minimal installation of vRalize Automation 6.x see my guide here
  • A static network profile and reservation that you have already tested other OS blueprints and and know it works.
  • You will need to use Photon TP1- Download the ISO here
  • Full installation of a Photon VM installed in vCenter with openvmtools installed see guide here
  • vRA to vRO extensibility installed and configured see my guide here
  • A quite place where you will not be interrupted

Version

1.0 First release

1.2 Added link to Photon TP1 as this guide has known issues with TP2

1.3 Updated workflows to wait for tools to start as there was a reported timing issue.

Installation

First we will need to create a script in the Photon guest that we will call from vRO with inputs. Power on your Photon VM and login. Then change directory to / and enter the command vi customizeos.sh and press enter

Now press i to change to insert mode and enter the following:

Screen Shot 2015-05-21 at 3.34.13 PM
rm /etc/hostname
echo $1 >> /etc/hostname
rm /etc/systemd/network/10-dhcp-eth0.network
echo [Match] >> /etc/systemd/network/10-static-eth0.network
echo Name=eth0 >> /etc/systemd/network/10-static-eth0.network
echo [Network] >> /etc/systemd/network/10-static-eth0.network
echo Address=$2 >> /etc/systemd/network/10-static-eth0.network
echo Gateway=$3 >> /etc/systemd/network/10-static-eth0.network
echo DNS=$5 >> /etc/systemd/network/10-static-eth0.network
echo Domains=$4 >> /etc/systemd/network/10-static-eth0.network
rm /etc/systemd/resolved.conf
rm /etc/docker/key.json
echo DNS=$5 >> /etc/systemd/resolved.conf
echo LLMNR=yes >> /etc/systemd/resolved.conf

Now press esc and hold Shift and press ZZ to save it.

Now shutdown your Photon VM and take a snap shot and name it Base.

Now login to vRA as an administrator and go to the infrastructure tab, then computer resources, compute resources then hover over your vCenter Cluster and click

Click to request an inventory scan

Now download the vRO package I created. It contains the workflow that will customize Photon as part of the build process. Remember it is in a ZIP file, you will need to unzip it before the next step.

Now login to vRO and change to Administer and install the package you just downloaded.

Now change to Run and navigate to the PhotonvRACustomizeGuest workflow and right click and select edit

Go to the general Tab and change the vmUsername and vmPassword to whatever you set it when you deployed you Photon VM

Save and close the workflow and locate the ID of the workflow and copy it to the clipboard.

Login to vRA as cloudadmin and click the infrastructure tab, navigate to Blueprints then build profiles and create the following new build profile

Now go to blueprints and create a new vSphere Blueprint

Enter the Blueprint information as shown

Go to the Build information Tab and Enter information as shown, navigating to your Photon VM and the snapshot we created earlier.

Notice that the Customization spec is blank. This is because Photon does not yet support vCenter Guest customization.

Now go to Properties Tab and enter the following

Photon networking requires the subnet type as a /24 you will need to enter this to match the subnet mask in your network profile.

Now publish your blueprint to the catalog

Navigate to the Administration Tab and then to catalog items and edit the new Photon Catalog item

You can get the new Photon Icon here -> vmware-photon_square140

After you entitle your new catalog item fire off a new request.

Once complete go to the items tab, select your new Photon VM and go to the network Tab to get the IP address, open an SSH session to it.

 Enjoy!
Remember sharing is caring!

5 Replies to “How to create a Photon Blueprint in vRA/vCAC”

  1. Pingback: Container as a service with vRA/vCAC and Project Photon | VMtoCloud.com

  2. Pingback: Apple Time Capsule as a Service with vRA/vCAC and VMware Photon | VMtoCloud.com

  3. Ryan,

    Have you sen any issues with using vRO to authenticate to Photon in TP2? With TP2 I can’t seem to get any of the Guest Operations to authenticate to the guest.

    -Sid

    • Yes, there is known issue with TP2. I would continue to use TP1. If you need newer version of Docker just type yum update docker at command line. Be sure your Photon VM is connected to internet.

Leave a Reply

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

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.