If you have a server that hosts your ISO images. Let us assume it’s a Centos 8 server and your ISOs are sitting in a directory /root/webroot/ISO and some tools in /root/webroot/tools.

This guide will show you how to expose these directories via SMB and HTTP. These can then be used by IDRAC / IPMI using virtual media to boot from the ISOs.

At minimum to get going the requirements are: Internet access, docker installed, and network connectivity
However, you will also need network connectivity to your servers, if you plan to mount them using virtual media.

First lets starts the HTTP web directory:

docker run –restart=always -d –name apache-server -v /root/webroot:/usr/local/apache2/htdocs/ -p 80:80 httpd:2.4

Next lets start the SMB web directory:

docker run –restart=always -d –name samba -p 139:139 -p 445:445 -v /root/webroot/ISO:/iso -v /root/webroot/tools/:/tools -d dperson/samba -p -u “user1;pass1” -s “iso;/iso” -s “tools;/tools” -g ‘client ipc min protocol = NT1’ -g ‘client min protocol = NT1’ -g ‘server min protocol = NT1’ -g ‘ntlm auth = ntlmv1-permitted’

Note: because we have the option “–restart=always“, these containers start on boot. Option “-d” detaches the terminal. If you want to just start it once you can replace option “–restart=always -d” with “–it

Note: by default this dperson/samba container allows minimum samba protocols of SMB2. However, we lower it to NT1. Additionally it only allows ntlm authentication of ntlmv2-only; however, we allow ntlmv1 using option above. Without this older SuperMicro IDRACs will not mount. With this they will mount the ISOs

You can now access this via the following links:

http://ip/ISO or http://ip/tools

Tip: Create file index.html in /root/webroot with this data so HTTPs visitors can see how to use

# cat /root/webroot/index.html
<h1>ISO and tool Repo</h1>
<p>Access via http://my-ip/ISO</p>
<p>Access via http://my-ip/tools</p>
<p>Also can access via SMB smb://my-ip/ or \\my-ip\</p>
<p>SMB credentials username: user1</p>
<p>SMB credentials password: pass1</p>

Troubleshooting the Samba Container:

– You can view the status of the container: docker ps
– If the container didn’t load it will not show up as its exited but can still see with: docker ps -a
– You can stop the container like so: docker kill samba
– Basic docker logs for the container: docker logs samba
– You can then remove the container like so: docker rm samba
– You can enter the containers shell like so (only when its running): docker exec -it samba /bin/bash
– You can view smb connections with: smbstatus
– You can see the running samba config with: testparm
– You can see the running samba config plus all default options with: testparm -v
– You can study the entrypoint script which is /usr/bin/samba.sh
Note: All of the provided orange and red parameters of the above “docker run” command get appended to /usr/bin/samba.sh

One thought on “Samba and HTTP Container To Provide ISOs to IDRAC / IPMI Virtual Media

Leave a Reply

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