I'm in the process of installing MS4H on a Debian on a VM. I know this is not common and may not even be supported, but I wanted to post my progress; that is why I use the showcase forum rather than the general forum. The main point of the thread is to help me to remember the steps I did but at the same time it may help other people.
The situation: I have a Windows machine which doubles as HTPC and media server. It is configured to work with wakeonlan, and currently is my LMS to serve my 4 (original) Squeezeboxes. I did not want to have an always on computer with Debian for MS4H, but would like some of the functionality it offers (mainly the Loxone integration). As I have Squeezeboxes, I do not need the extensive MS4H functionality with soundcards, but I would like to use the music server gateway and to have MS4H switch on when I power on a squeezebox.
The idea: Run MS4H on a Debian-VM on the Windows computer, on an external switch (hyper-v terminology).
The problem: The use of an external switch (hyper-v terminology) makes the VM part of my LAN and thus reachable, but then the squeezeboxes would connect directly its IP, which makes them lose the ability to wake the server on lan (they would try to wake the guest OS, but not the host).
The workaround: Run MS4H on a Debian-VM that is connected via a private nat network (hyper-v terminology), forward all the necessary ports from the host to that VM.
I'm using Hyper-V, as my Windows computer also runs Docker, which prevents me from using VirtualBox. But I assume the concepts to be similar. In Hyper-V there is no possibility for soundcards; as I gather, VirtualBox has that possibility but honestly don't know as I don't need it.
Setting up a NAT network on Hyper-V:
https://docs.microsoft.com/en-us/vir...up-nat-network
Important issue: you can only have one NAT address range, and there is no DHCP server (so the guests will need fixed IP addresses)
Powershell commands: New-VMSwitch , Get-NetAdapter , New-NetIPAddress , New-NetNat
The virtual network is classified in the network and sharing center as "unidentified" and "public". The public aspect is problematic, as the Windows firewall blocks DNS lookups. While it is possible to allow this through the firewall, I preferred to set the virtual network as private (I prefer to keep the public firewall settings as tight as possible, and I trust my own private network). This change is easily done with PowerShell:
Powershell command: Set-NetConnectionProfile
Setting up a fixed IP on Debian:
https://www.snel.com/support/how-to-...-on-debian-10/
(for some reason, MS4H changed /etc/network/interfaces, so I used manually changed the network configuration)
(this change is possible from the MS4H web interface, if you first connect the VM to an external switch, install MS4H, reconfigure its network and then connect the VM to the nat swtich)
Port forwarding in Hyper-V:
https://tewarid.github.io/2019/06/26...n-hyper-v.html
Second link with more examples
https://petri.com/create-nat-rules-h...virtual-switch
Powershell command: Add-NetNatStaticMapping
So far, I have access to MS4H through a port-forwarded webinterface. I haven't yet configured either LMS or Loxone and I'm unable to continue in the next few days due to renovations (my patchpanel is disconnected, half my devices don't have network ), but will post progress here.
Jörg
Kommentar