Configure a complete Raspberry Pi Virtualhere installation - dcasota/photonos-scripts GitHub Wiki
Hosted shared CAD software is very common in engineering companies. Howevery, it often has some basic configuration culprits to deal with. License configuration is very important, and a good setup plan avoids unnecessary user issues. Virtualhere on VMware Photon OS on a Raspberry Pi is quite a good setup for an usb license dongle redirection server because it allows to host centrally usb license dongles, and to redirect each of it through a license server or directly to the users' desktop. Here's a short how-to.
Assembled 1x RPi4 8GB, 1x 32GB microSD, 1x 32GB usb stick.
On your client (eg. laptop) plugged-in microSD and usb stick.
Download RPi4_UEFI_Firmware_{release}.zip from https://github.com/pftf/RPi4/releases
Download RPi Imager from https://www.raspberrypi.org/software/
Start RPi Imager > own image > select RPi4_UEFI_Firmware_{release}.zip, write on 32GB microSD
Download Photon OS Raspberry Pi image https://github.com/vmware/photon/wiki/Downloading-Photon-OS, and unpack the tar.xz, result is a file photon-rpi-4.0-{hex value}.raw
Download a tool to write the raw file to the usb stick, eg. Etcher
Start Etcher > File >select photon-rpi-4.0-{hex value}.raw, write on 32GB usb stick
In RPi4, plugin microSD, and plugin usb stick on an USB2 Port. Power on.
Configure BIOS: Remove boot options boot from any network. Configure to boot from USB stick, and boot.
Photon OS 4.0 aarch64: minimal installation
cat > /etc/systemd/network/10-static-en.network << "EOF"
[Match]
Name=eth0
[Network]
DHCP=no
Address=<your IP>/24
Gateway=<your Gateway IP>
DNS=<your DNS IP>
EOF
tdnf update -y
mkinitrd -q /boot/initrd.img-$(uname -r) $(uname -r)
iptables -A OUTPUT -p icmp -j ACCEPT
iptables -A INPUT -p icmp -j ACCEPT
iptables -A INPUT -i eth0 -p tcp --dport 22 -j ACCEPT
iptables -A INPUT -i eth0 -p tcp --dport 7575 -j ACCEPT
iptables-save >/etc/systemd/scripts/ip4save
tdnf install -y glibc-lang kbd glibc-i18n
echo de_CH ISO-8859-1 >>/etc/locale-gen.conf
echo de_CH.UTF-8 UTF-8 >>/etc/locale-gen.conf
locale-gen.sh
localectl set-locale LANG="de_CH.UTF-8" LC_CTYPE="de_CH.UTF-8"
To switch between maps, this might be useful as well.
localectl set-keymap de_CH-latin1
loadkeys de_CH-latin1
tdnf install -y ntp
Add server entries (Here in Switzerland eg. server ntp11.metas.ch, ntp12.metas.ch, ntp13.metas.ch) vi /etc/ntp.conf
tinker panic 0
restrict default kod nomodify notrap nopeer noquery
restrict 127.0.0.1
restrict -6 ::1
driftfile /var/lib/ntp/drift/ntp.drift
server <your ntp server 1>
server <your ntp server 2>
server <your ntp server 3>
iptables -A INPUT -i eth0 -p udp --dport 123 -j ACCEPT
iptables-save >/etc/systemd/scripts/ip4save
ip6tables-save >/etc/systemd/scripts/ip6save
systemctl enable ntpd
systemctl start ntpd
It is also necessary to configure the timezone.
set Europe/Zurich timezone
ln -sf /usr/share/zoneinfo/Europe/Zurich /etc/localtime
Sync now and sync the RTC clock to system clock:
systemctl stop ntpd
ntpdate -s <your ntp server>
systemctl start ntpd
hwclock --systohc --localtime
tdnf install -y wget usbutils
mkdir /usr/local/sbin
curl https://raw.githubusercontent.com/virtualhere/script/main/install_server | sudo sh
CAD software which are using a Microsoft Windows license server, install the Microsoft Windows virtualhere client as a service on that license server.
On the client start the virtualhere client, and add the virtualhere server. You may need to install additional drivers (Sentinel, etc.).
After that, the plugged-in usb license dongles are displayed. Simply attach/detach an usb license dongle, and it should be recognized from the license server and in your CAD software.