WgServerforWindows
WgServerforWindows copied to clipboard
Windows VM Azure - wg_server issue
Hi,
I have a windows data center 2019 VM running on Msft Azure, after the initial setup all went smoothly. I stop the VM when I do not use it to save $, by doing this from the azure portal, the VM enters a "Stopped (deallocated)" state which relieves the VM of tying down resources and releases them to the pool for other customers to use, which is different from shutting down the VM from inside the VM i.e normal shutdown, this just enters a "Stopped" state, different from "Stopped (deallocated)" state. If I shutdown the VM from inside the VM, then the VM still holds onto the resources and WS4W works as expected, I imagine this would work fine for a normally shutdown VM/PC etc, all resources are retained on start up but not the case for Azure VM.
I'm using a Standard B2s (2 vcpus, 4 GiB memory)
When I need the VM back up and running, I start the VM from azure portal and since azure released the resources back to the shared pool, a new ethernet v-switch is created and a new ethernet adapter is also created, and wg_server tunnel has been removed.
To get this resolved, I need to manually install the tunnel service by opening WS4W gui in admin mode and pressing install tunnel service, during this process WS4W gui freezes and I need to manually restart the VM 2-3 times before wg_server is installed. After which all works fine, until I repeat the steps above. Is there something that I can do to persist wg_server interface and not have to do this on each VM start up?

Hey @MxD-js, this is an interesting one! The application does perform some actions on startup. However, creating the WireGuard adapter is not one of those, as on most systems, that would be persistent over a reboot.
I am new to Azure, and I was trying to set up a VM to reproduce this issue. I am supposedly able to get some free hours with the Standard B1S VM size, but it doesn't seem to be available in my region (nor does Standard B2S). My I ask what region you created your Standard B2S? Or any other advice you'd have for setting up an Azure VM?
@micahmo I'm using West US 3 region with all defaults, nothing special, default networking etc. Operating System: Windows (Windows Server 2019 Datacenter) Plan: 2019-datacenter-smalldisk-g2 Size: Standard B2s (2 vcpus, 4 GiB memory)
Hi @MxD-js, apologies that I never followed up on this issue. I was not able to access a free Azure tier to test this use case. Are you still using WS4W and is this feature still something you would want? If not, I will close this issue.
Issue can be closed, I'm not using Azure at the moment.