How to Set Up a VM on a Remote, Headless Hyper-V Host
This article contains an affiliate link — if you sign up through it, I may earn a commission at no extra cost to you.
What This Guide Covers
Setting up a VM on Hyper-V is easy when you're sat in front of the host with a GUI and a normal network. It stops being easy the moment you're doing it on a remote, headless box — a dedicated server you only reach through a browser-based console, a provider that hands you one public IP and no DHCP, a disk image you need to get onto the box before anything else can happen, no monitor to plug in and no local network to fall back on. That's the situation this guide is for.
Budget dedicated servers sold specifically as Hyper-V hosts are a common way to end up here — BACloud is one supplier I've used myself, dedicated boxes with Hyper-V Server pre-installed at a price that makes a lot more sense than running your own hardware for a handful of VMs. Wherever the box comes from, if it's remote and headless, everything below applies the same way.
This covers the whole path: getting console access to a box with no screen, setting up remote management, getting a disk image onto the host without it taking three days, and the networking gotchas that only show up once you're working with a single public IP and no DHCP. There are two ways you'll end up building a VM — uploading an ISO to install a guest OS from scratch, and uploading an existing VHDX to bring an already-built disk across — and since the file and the traps that come with it are genuinely different, both get covered separately below.
Step 1: Get Console Access
This step only exists because the host is remote and headless — no screen, no keyboard, and until this is sorted, no way in at all.
IPMI — short for Intelligent Platform Management Interface — is the usual route in: the standard protocol for talking to a server's BMC (Baseboard Management Controller), a small independent chip on the motherboard that runs whether or not the main OS is installed, crashed, or powered off entirely. It's branded iLO on HPE, iDRAC on Dell, or just "IPMI" on Supermicro-based boxes, which is what most budget dedicated servers (including BACloud's) run on. I've written a proper explainer on what's actually on the other end of that connection, and why it's a bigger deal from a security angle than people tend to assume, if you want the fuller picture.
For getting into a box, it gives you three things: remote power control, a virtual KVM console (Keyboard, Video, Mouse — a screen and keyboard for a machine that has neither, not to be confused with the Linux KVM hypervisor), and virtual media, which mounts a file — almost always an ISO — over the network as if it were a physical CD or USB drive plugged into the machine. It has no concept of "virtual machine" and can't hand a disk image straight to a hypervisor as a VM's disk — it's purely for managing the physical box: installing an OS, recovering something that won't boot, watching BIOS (Basic Input/Output System — the firmware that runs before any OS loads) or POST output you'd otherwise need to be stood in front of the machine for.
If the host needs a hypervisor installed from scratch, this is where you do it: mount a Windows Server ISO through the console's virtual media, boot from it, install Windows, enable the Hyper-V role.
If it's a box sold specifically as a Hyper-V host, there's a good chance it's already running Hyper-V Server
Standalone — a free, headless edition with no desktop shell, just a blue sconfig menu at the console. Open the KVM
console first and check what's actually there before assuming you're starting from nothing — reinstalling a hypervisor
that was already sitting there is an hour you don't get back.
Either way, before leaving the console, confirm networking is up. You'll need it for both remote management and the file transfer in the next step.
Step 2: Set Up Remote Management
Hyper-V Server Standalone has no local GUI for creating VMs, so everything from here happens from another machine. There are a few ways to do that — Hyper-V Manager, plain PowerShell remoting — but the one that's actually worth using is Windows Admin Center (WAC), Microsoft's free, browser-based management tool. It sidesteps most of the pain the other two routes involve on a workgroup box (Hyper-V Manager in particular gets tangled up in DCOM/WinRM trust issues that take a fair bit of fiddling to work through), and it gives you a proper PowerShell console right there in the browser tab alongside a GUI for the server itself. Everything in the rest of this guide that says "run this on the host" means the WAC PowerShell console, unless it says otherwise.
Install WAC on your own PC (not the server) — download it from aka.ms/WACDownload and
run it as a local gateway. The installer asks for a port during setup; 443 is the default and fine to keep unless
something else on your PC is already using it. Once it's done, open https://localhost in a browser.
Add the server as a connection: click + Add, choose Server, and enter its hostname or IP. Since this is a workgroup box, WAC will prompt for credentials — give it the server's local admin username and password (you can choose to save them or be asked each time). The first connection attempt will throw up a certificate warning, because the server's WinRM listener uses a self-signed cert out of the box; click through it.
Once connected, the server's overview page loads with a set of tools down the left — CPU, memory and disk at a
glance, and a PowerShell entry in that list that opens a full, genuine PowerShell console running directly on the
server, no separate remoting setup needed beyond what's already above. That's the console every "run this on the host"
instruction in this guide refers to. There's also a Virtual Machines extension in there if you'd rather click
through a VM creation wizard than type New-VM — either way gets you to the same place, and the rest of this guide
sticks to the PowerShell commands since they work identically wherever you type them.
If you'd rather use Hyper-V Manager directly, or Enter-PSSession from your own machine's PowerShell, both still work —
they just involve sorting out TrustedHosts and WinRM trust between two workgroup machines by hand, which is exactly
what WAC exists to avoid.
Step 3: Pick Your Path — ISO or VHDX
Two different starting points from here:
- Building from scratch — you have (or need) an installer ISO, and you're installing a guest OS into a brand new, empty VM.
- Importing an existing VM — you already have a VHDX from somewhere (an old host, a backup, a P2V — Physical-to-Virtual — export), and you want Hyper-V to boot that disk as-is.
The file's different, where it needs to end up is different, and the traps are different too, so they're covered separately below.
Path A: Uploading an ISO to Build a VM From Scratch
An installer ISO can get onto the host two ways, depending on what it's for.
Mounting it through virtual media is the right call if it's the ISO you're using to install the hypervisor's own OS — i.e. you're still on Step 1, installing Windows onto the bare-metal box itself. The BMC's virtual media presents the file to the physical machine as a mounted CD/DVD, no copying required, no disk space used on the host beyond what the OS install itself needs.
Downloading it directly onto the host is the better route once the host already has a hypervisor running and you're installing an ISO as a guest OS inside a new VM — you want the file sitting on the host's own storage so you can attach it to the VM's virtual DVD drive, rather than re-mounting it through the BMC every time. From a PowerShell session on the host:
Invoke-WebRequest -Uri "https://example.com/windows-server.iso" -OutFile "C:\ISOs\windows-server.iso"
Here's a nasty one: PowerShell's default progress-bar rendering can throttle a fast connection down to a crawl — tens of
MB/min instead of tens of MB/s, even on a host sitting on a near-gigabit line. It's a real, well-documented quirk of
Invoke-WebRequest, not a flaky connection or a slow source server. Check the host's actual line speed with a proper
speed test first (Ookla's CLI or similar), then suppress the progress bar entirely:
$ProgressPreference = 'SilentlyContinue'
Invoke-WebRequest -Uri "https://example.com/windows-server.iso" -OutFile "C:\ISOs\windows-server.iso" -UseBasicParsing
On a fast connection this is the difference between a multi-hour download and one that finishes before you've made a cup of tea. If you're mid-download on something you can't afford to restart, run a second, disposable download in a separate session with the flag set and compare first — cheaper than cancelling a large in-progress download on a hunch that turns out wrong.
Creating the VM once the ISO's in place:
New-VM -Name "MyVM" -MemoryStartupBytes 4GB -Generation 2 -NewVHDPath "D:\VMs\MyVM.vhdx" -NewVHDSizeBytes 80GB -SwitchName "YourSwitch"
Set-VMDvdDrive -VMName "MyVM" -Path "C:\ISOs\windows-server.iso"
Set-VMFirmware -VMName "MyVM" -FirstBootDevice (Get-VMDvdDrive -VMName "MyVM")
Or in Hyper-V Manager: New → Virtual Machine, create the new disk as prompted, and on the "Installation Options" page point it at the ISO directly — the wizard handles attaching it and setting boot order for you.
Path B: Uploading a VHDX to Import an Existing VM
If you already have a built VHDX — migrated from another host, pulled from a backup — the job's simpler in principle (no OS install, no guest setup) but the transfer is what catches people out, because these files are usually a lot bigger than an ISO and the trap is about time, not throughput tricks.
Do the maths before you start. Your own connection's upload speed is the ceiling here, not the host's — and if you're moving the file from somewhere with an asymmetric or inconsistent connection (most residential broadband, Starlink especially), that number can be a lot lower than you'd assume. A 130GB VHDX over a connection genuinely delivering a few MB/s isn't an evening's job — work it out (file size in GB × 8 ÷ your real upload Mbps ÷ 3600 for hours) before you commit to it. If the answer's measured in days, it's usually faster to build the VM fresh on the host from an ISO (Path A) and restore just the data that matters — databases, file shares — onto it, rather than move the whole disk image byte for byte.
Once the maths works, copy the VHDX onto the host over SMB (Server Message Block — the Windows file-sharing protocol
behind network drives and \\server\share paths), robocopy, or a direct copy through an active Hyper-V
Manager/PowerShell session:
robocopy "\\source-machine\share\VMs" "D:\VMs" disk.vhdx /Z /J
(/Z for restartable mode on a long copy, /J for unbuffered I/O — both help on a transfer that's going to run for a
while.)
Creating the VM by pointing it at the file you just copied, instead of creating a new disk:
New-VM -Name "MyVM" -MemoryStartupBytes 4GB -Generation 1 -VHDPath "D:\VMs\disk.vhdx" -SwitchName "YourSwitch"
Or, in Hyper-V Manager: New → Virtual Machine, skip disk creation, and browse to use an existing virtual hard disk instead.
Generation 1 vs Generation 2
This applies to both paths, and it's the single most common reason a VM won't boot — new or imported. Older, BIOS-boot builds and most straightforward new installs need Generation 1; UEFI-based builds (Unified Extensible Firmware Interface — BIOS's modern replacement) need Generation 2. Get this wrong on an import and you'll see the VM boot into firmware, cycle through boot devices, and fail with a generic "boot loader failed" — which looks like a corrupt disk or a bad attach, but usually isn't either. If you're troubleshooting a boot failure on a Generation 2 VM, check these before assuming the disk or ISO itself is bad:
# Confirm the DVD/disk is actually attached where you think it is
Get-VMDvdDrive -VMName "MyVM"
# Generation 2 defaults to Secure Boot with a Microsoft-only template —
# a mismatch here also presents as "boot loader failed"
Get-VMFirmware -VMName "MyVM" | Select-Object SecureBoot, SecureBootTemplate
If none of that turns anything up and the VM genuinely won't boot on Generation 2, just try Generation 1 before spending longer chasing firmware settings — it's the faster diagnostic in practice, even if it's not the "correct" order to debug it in.
Step 4: Networking on a Single Public IP
This is the part almost nobody's tutorial covers, because most guides assume DHCP (Dynamic Host Configuration Protocol — the service that automatically hands out IP addresses on most networks) exists somewhere. Dedicated servers usually don't offer it — you get one public IP, bound to the host's physical NIC (Network Interface Card), and nothing else. Create a VM, attach it to an "External" switch expecting it to pick up an address the way it would on a home network, and it just sits there with an APIPA address (Automatic Private IP Addressing — the self-assigned 169.254.x.x range Windows falls back to when nothing hands out a proper one) and no gateway.
Even once you solve that — say, by manually configuring the VM with a static IP in the host's own subnet — there's a second wall you won't see coming: most dedicated-server providers filter traffic at the switch port by MAC address (Media Access Control — the hardware address baked into a network adapter), allowing only the host's registered NIC through and silently dropping anything from a VM's different virtual MAC. It looks identical to a routing problem from inside the VM, and it's easy to burn an hour on it thinking the fix is still networking config rather than a provider-side filter you can't argue your way around.
The reliable fix is NAT (Network Address Translation) through the host, which sidesteps the MAC filter entirely — outbound traffic still leaves under the host's own legitimate MAC address.
On the host:
New-VMSwitch -Name "NAT-Switch" -SwitchType Internal
New-NetIPAddress -IPAddress 192.168.50.1 -PrefixLength 24 -InterfaceAlias "vEthernet (NAT-Switch)"
New-NetNat -Name "MyNAT" -InternalIPInterfaceAddressPrefix 192.168.50.0/24
Connect-VMNetworkAdapter -VMName "MyVM" -SwitchName "NAT-Switch"
Inside the VM, set a static IP in that same range (console or RDP — Remote Desktop Protocol — since there's no network yet to do it remotely):
netsh interface ip set address "Ethernet" static 192.168.50.10 255.255.255.0 192.168.50.1
netsh interface ip set dns "Ethernet" static 8.8.8.8
That gets the VM outbound internet access — enough to install a VPN agent (see below), pull updates, or reach anything else it needs to phone home to.
If you also need the VM reachable from outside — a web server, an admin panel — add static port mappings on the NAT rather than trying to expose the VM directly:
Add-NetNatStaticMapping -NatName "MyNAT" -Protocol TCP -ExternalIPAddress 0.0.0.0 -ExternalPort 443 -InternalIPAddress 192.168.50.10 -InternalPort 443
New-NetFirewallRule -DisplayName "Allow HTTPS Inbound" -Direction Inbound -Protocol TCP -LocalPort 443 -Action Allow
That firewall rule only does anything if Windows Firewall on the host is actually enabled and running — the NAT mapping alone won't open anything up if the firewall's off, and a rule added while it's off just sits there doing nothing until someone turns it back on. Check before assuming a port's open just because you've run the command:
Get-NetFirewallProfile | Select-Object Name, Enabled
A Better Way to Handle Ongoing Access
If the VM needs ongoing remote access — RDP, SSH (Secure Shell), an admin interface — rather than a one-off port forward, install a mesh VPN (Virtual Private Network) agent inside the VM instead of opening more inbound ports on a box that's already sitting on the open internet. I've written before about self-hosting NetBird for exactly this — the VM joins the same private mesh as everything else you manage, reachable over its mesh IP without another public-facing attack surface to maintain. For a VM you've just spent time standing up, it's a much easier way to get back into it than remembering which ports you opened and why.
Closing Thoughts
None of this is complicated once it's laid out in order — it's just that each step lives in a different tool's documentation, and the failure modes (a throttled download that looks like a slow line, a boot loader error that looks like a bad disk, a routing problem that's actually a MAC filter) all present as something other than what they are. Console access gets you to a login prompt. Everything after that — the hypervisor, the file transfer, the VM, the networking — is ordinary Windows and Hyper-V admin that just happens to be running on a box you can only reach through a browser-based console window.
If there's one thing to take away: an ISO and a VHDX are not the same kind of upload, and treating them the same is where most of the wasted time comes from. An ISO's small enough that a throttled download is just an annoyance; a VHDX is big enough that the same mistake — or just not doing the maths first — turns an evening's job into a three-day one. Work out which file you're actually moving, and how long it'll genuinely take, before you start.
Have thoughts on this? Get in touch.

