WilliamLam.com

  • About
    • About
    • Privacy
  • VMware Cloud Foundation
  • VKS
  • Homelab
    • Resources
    • Nested Virtualization
  • VMware Nostalgia
  • Apple
You are here: Home / Automation / How to run a Docker Container on the vCenter Server Appliance (VCSA) 6.5?

How to run a Docker Container on the vCenter Server Appliance (VCSA) 6.5?

10.24.2016 by William Lam // 8 Comments

One of the most notable changes in the vCenter Server Appliance (VCSA) in vSphere 6.5 is a switch of the underlying OS from SLES to VMware's very own Photon OS. With this change, VMware will now own the entire software stack within the VCSA (OS + Application). This will allow VMware to quickly respond and deliver OS and security updates to customers at a much quicker rate than it was possible before.

During my testing of the VCSA, I had a need to spin up a Docker Container. Given that the VCSA is now Photon OS based, this should be a pretty trivial thing to enable as it is with a standalone installation of Photon OS. After a bit of trial/error, I found what was needed to get this working on the VCSA. Before jumping into the solution, I should say that this is really for lab and educational purposes. In general, I would NOT recommend installing additional software on the VCSA, not only is this NOT supported by VMware but you may also potentially be impacting your vCenter Server by taking resources away from the main application. It is possible to constrain the amount of resources (CPU/Memory) allocated to the Docker Container, please refer to this resource for more information.

For smaller customers, the argument is that I can just run everything on a single system but in reality there are many benefits to having a separate management VM which can be Photon OS or any other OS that your organization supports. You can install additional management tools/scripts and you would not be artificially limited by the VCSA's environment which is really locked down to what is absolutely needed to run the vCenter Server application and its services.

Disclaimer: This is not officially supported by VMware, please use at your own risk.

Given that PowerCLI Core (Linux and Mac OS X) was just recently released, which also includes a Docker Container, I figure this would be a nice example to start with as I know a few of you have asked about this possibility 🙂

Step 1 - Install Docker by running the following command (you will need access to the internet either direct or proxy access from the VCSA)

tdnf -y install docker

Step 2 - Load the following kernel module which will allow us to start the Docker client by running the following command:

insmod /usr/lib/modules/$(uname -r)/kernel/net/bridge/bridge.ko

Note: The above command does not persist across reboots. If you would like to persist this configuration, please refer to the instructions at the very bottom.

Step 3 - Enable and start the Docker Client by running the following command:

systemctl enable docker
systemctl start docker

Step 4 - Pull down the PowerCLI Core Docker Image from Docker Hub by running the following command:

docker pull vmware/powerclicore

docker-container-on-vcsa-6-5-3
Step 5 - Start the PowerCLI Core Docker Container by running the following command:

docker run --rm -it --entrypoint='/usr/bin/powershell' vmware/powerclicore

docker-container-on-vcsa-6-5-4
As you can see from the screenshot above, you now have PowerShell and the PowerCLI module loaded running as a Docker Container on the VCSA 🙂 You can apply this to any Docker Container that you have created or pulling it directly from Docker Hub. If you prefer to build the PowerCLI Core Docker Container from the Dockerfile, you simply just need to download and extract the PowerCLI Core zip file onto the VCSA and then run the following command:

docker build -t vmware/powercli .

docker-container-on-vcsa-6-5-0

How to persist bridge module load across reboots:

Step 1 - Edit /etc/modprobe.d/modprobe.conf and remove the "install bridge /bin/false" entry.

Step 2 - Create a new file called /etc/modules-load.d/bridge.conf which contains the word "bridge" (no quotes). When the system boots up, it will iterate through all the module configuration file and load the respective modules. The bridge module is what is needed to start the Docker Daemon.

More from my site

  • Docker Container for the Ruby vSphere Console (RVC)
  • vCenter Server High Availability (VCHA) PowerCLI 6.5 community module
  • vCommunity "shorts" on their experiences w/the VCSA Migration
  • VCSA 6.5 CLI Installer now supports new ovftool argument pass-through feature
  • Updates to VMDK partitions & disk resizing in VCSA 6.5

Categories // Automation, Docker, Not Supported, PowerCLI, VCSA, vSphere 6.5 Tags // Docker, Photon, vcenter server appliance, VCSA, vcva, vSphere 6.5

Comments

  1. *protectedmaazaru says

    10/24/2016 at 10:40 am

    Hey,

    Great information here!
    I thought docker was already installed in PhotonOS, but maybe the vcsa team completely removed the client to keep it as neat as possible.
    Are you able to see the other docker instances running after that? 🙂

    I wouldn't be surprised if PowerCLI core get integrated in one of the core appliances in the near future. vCSA or vRO?
    Wait and see 🙂

    Reply
  2. *protectedFP says

    10/24/2016 at 10:44 am

    One quick question: would the newly to be released v6.5 of vCSA support dual-homed configurations with two external PSCs (in replication) ?

    Reply
  3. *protectedJay Rogers says

    12/12/2016 at 6:49 am

    I am getting error "unknown symbol in module" on step 2. Anyone else hit this? It as reboot of the 6.5 VCSA required after docker install? I am new to docker....

    root@vlab65 [ ~ ]# insmod /usr/lib/modules/$(uname -r)/kernel/net/bridge/bridge.ko
    insmod: ERROR: could not insert module /usr/lib/modules/4.4.8/kernel/net/bridge/bridge.ko: Unknown symbol in module
    root@vlab65 [ ~ ]# cd /usr/lib/modules
    root@vlab65 [ /usr/lib/modules ]# ls
    4.4.8
    root@vlab65 [ /usr/lib/modules ]# cd 4.4.8/
    root@vlab65 [ /usr/lib/modules/4.4.8 ]# ls
    kernel modules.alias.bin modules.builtin.bin modules.dep.bin modules.order modules.symbols
    modules.alias modules.builtin modules.dep modules.devname modules.softdep modules.symbols.bin
    root@vlab65 [ /usr/lib/modules/4.4.8 ]# insmod /usr/lib/modules/4.4.8/$(uname -r)/kernel/net/bridge/bridge.ko
    insmod: ERROR: could not load module /usr/lib/modules/4.4.8/4.4.8/kernel/net/bridge/bridge.ko: No such file or directory
    root@vlab65 [ /usr/lib/modules/4.4.8 ]# ls
    kernel modules.alias.bin modules.builtin.bin modules.dep.bin modules.order modules.symbols
    modules.alias modules.builtin modules.dep modules.devname modules.softdep modules.symbols.bin
    root@vlab65 [ /usr/lib/modules/4.4.8 ]# cd kernel
    root@vlab65 [ /usr/lib/modules/4.4.8/kernel ]# ls
    arch crypto drivers fs lib net security virt
    root@vlab65 [ /usr/lib/modules/4.4.8/kernel ]# cd net
    root@vlab65 [ /usr/lib/modules/4.4.8/kernel/net ]# ls
    802 9p ceph dccp ipv4 key mpls netlink packet sched sunrpc vmw_vsock
    8021q bridge core dns_resolver ipv6 llc netfilter openvswitch rds sctp unix xfrm
    root@vlab65 [ /usr/lib/modules/4.4.8/kernel/net ]# cd bridge
    root@vlab65 [ /usr/lib/modules/4.4.8/kernel/net/bridge ]# ls
    bridge.ko br_netfilter.ko netfilter
    root@vlab65 [ /usr/lib/modules/4.4.8/kernel/net/bridge ]#

    Reply
    • *protectedJay Rogers says

      12/13/2016 at 4:31 pm

      I got this to work...must of had a typo.

      Reply
    • *protectedDanielS says

      01/11/2017 at 11:03 am

      HI all i got also an error. Problem is that the symlinks aren't there you have to run Step 3 before Step 2 there will be an error too but now the links have been added. So you will able to do Step 2.

      Thank's William for the great article!

      Reply
  4. *protectedSebastian says

    02/27/2018 at 12:57 pm

    Interesting that vCenter appliance is on Photon, but vCenter itself doesn't seem to be containerized. I wonder if that's the next step?

    Reply
  5. *protectedNapalmZ says

    07/18/2022 at 2:09 am

    Hello,

    if I try to do this:
    insmod /usr/lib/modules/4.19.247-7.ph3/kernel/net/bridge/bridge.ko.xz

    I got these errors:
    bridge: Unknown symbol llc_mac_hdr_init (err -2)
    bridge: Unknown symbol stp_proto_register (err -2)
    bridge: Unknown symbol stp_proto_unregister (err -2)

    Also tried to UNXZ the bridge file but same errors.
    I'm on VMware vCenter Server 7.0.3.00700

    Thank you

    Reply
    • William Lam says

      07/18/2022 at 10:31 am

      To be honest, if you have a need to run a container ... you should consider looking at something like VMware Event Broker Appliance (VEBA) which will be more scalable for such use cases

      Reply

Thanks for the comment!Cancel reply

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

Search

Thank Author

Author

William is Distinguished Platform Engineering Architect in the VMware Cloud Foundation (VCF) Division at Broadcom. His primary focus is helping customers and partners build, run and operate a modern Private Cloud using the VMware Cloud Foundation (VCF) platform.

Connect

  • Bluesky
  • Email
  • GitHub
  • LinkedIn
  • Mastodon
  • Reddit
  • RSS
  • Twitter
  • Vimeo

Recent

  • VMware Flings is now available in Free Downloads of Broadcom Support Portal (BSP) 05/19/2025
  • VMUG Connect 2025 - Minimal VMware Cloud Foundation (VCF) 5.x in a Box  05/15/2025
  • Programmatically accessing the Broadcom Compatibility Guide (BCG) 05/06/2025
  • Quick Tip - Validating Broadcom Download Token  05/01/2025
  • Supported chipsets for the USB Network Native Driver for ESXi Fling 04/23/2025

Advertisment

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy

Copyright WilliamLam.com © 2025

 

Loading Comments...