I haven’t been able to find any way to do this in XCP-ng yet. Has anyone been able to get this working?
I have not done any testing, but it should work the same way.
The commands for Xen don’t appear to have an XCP equivalent. Could I use the 7.2 Xen plugin in XCP-ng 7.6?
BTW, thanks for personally responding. Your YouTube videos are always extremely informative.
I’ve made some progress with these instructions:
I did a fresh install of XCP-ng 7.5 and installed xscontainer using yum:
yum install xscontainer
Downloaded the latest CoreOS iso from http://stable.release.core-os.net/amd64-usr/current/coreos_production_iso_image.iso and copied to my local ISO SR.
However, I haven’t gotten the containers to show up properly in Xen Orchestra. I’ll post updates as I progress.
Finally having some time to revisit this, but not completely working.
The following needs to be run in the Docker VM (I’m using Ubuntu, haven’t moved to CoreOS yet):
apt-get install nmap
Then run this command in Dom0 of XCP-ng host:
xscontainer-prepare-vm -v UUID -u DOCKERUSER
Xen and XCP-ng Center see the Docker integration now, but won’t list the Containers.
I don’t know why it worked, but it worked! I removed Portainer from the VM and just added the Portainer agent. For some reason the containers magically started showing up in XCP-ng Center and Xen Orchestra.
I’m trying to get this working as well, I’ve jumped straight to CoreOS but am not having any luck. Did you get it working with CoreOS? I followed your instructions to install xscontainer. I also tried the xscontainer-prepare-vm but I get an error related to login, I believe it’s related to creating an SSH key for the CoreOS VM. In creating a CoreOS VM, I never see the Cloud Config panel as described in https://xen-orchestra.com/blog/docker-support-in-xenserver-the-ultimate-guide/
Thanks for any help.
I hadn’t tried with CoreOS again. It gave me so much trouble that I went back to the old familiar Ubuntu setup.
Something I definitely found useful was the
docker-machine command in combination with the Docker Machine XCP Adapter found on GitHub. This allows you to use a single command to spin up VMs running docker in XCP with security out of the box for auto-provisioned machines for SSH Private Key Authentication and options for provisioning the VM with specific specs for size, Ram, CPU count etc. You don’t have the monitoring (yet) for XCP to see that its docker and show the containers, but its also using a distro from Docker not CoreOS (btw CroreOS is EOL but is now partnered with RedHat so I don’t know whats going on with it).
Realllly cool, Didn’t find it until I just googled for just about anything and found that and this thread, figured I’d signup and leave a note for any other person seeking a stable method of doing this.
Edit: This also will upload the VDIs and spawn all of the required interfaces and other points to get it up and running.
This video might help. Using docker containers on XCP-ng with Xen Orchestra CE step by step - YouTube
I tried with Debian, and I haven’t found a way to install xe-guest-utilities, but Ubuntu, which Christophe from HomeTinyLab used in the video worked.
PS: The video was posted in 2021
Hope this helps.