IMD SolutionComputing LibraryShop main store

Troubleshooting

Why a Linux RT VM stalls on Hyper-V at /initrd

Remote access and virtualization Published 7 min read

Short answer

A Generation 1 Hyper-V VM that stops after the initrd-loaded message has loaded its RAM disk but never mounted a root filesystem; a Generation 2 invalid-VM report is a host-side rejection that happens before the guest kernel runs. Match the VM generation to the image's documented boot method, apply the UEFI CA Secure Boot template for a Generation 2 Linux guest, and capture the full failure text before changing processors, memory or the Windows install.

On this page
  1. Where each failure actually stops
  2. Match the generation to the image's documented boot method
  3. A controlled Hyper-V boot diagnostic sequence
  4. The WSL coexistence question
  5. Worked example: reading the Gen 1 stall and Gen 2 rejection for one image
  6. After it boots: real time is a second acceptance test
  7. Questions asked

A Generation 1 Hyper-V VM that prints the initrd-loaded message and then goes quiet has loaded its initial RAM disk but never mounted a root filesystem. A Generation 2 VM reported as invalid is rejected by the host side before the guest kernel runs at all. Those are two different failure points in the same image, and neither is fixed by adding processors, adding memory or reinstalling Windows. The decision tree is short: match the VM generation to the boot method the image documents, apply the UEFI CA Secure Boot template for a Generation 2 Linux guest, and capture the complete failure text before you change anything else.

Where each failure actually stops #

A Linux boot runs through ordered stages: the firmware loads a bootloader, the bootloader loads the kernel and the initial RAM disk, the kernel unpacks that disk and its drivers, the kernel mounts the root filesystem, and userspace starts. Each symptom in your two attempts lands on a different stage boundary.

  • The message /initrd... ok, then nothing. The kernel is running: it decompressed itself and loaded the RAM disk. The stall is the next stage. Either the kernel has no driver for the attached virtual storage controller, the root-device reference does not match what the guest sees, or boot continued with console output sent somewhere your viewer is not showing.
  • The Generation 2 invalid-VM report. This is a configuration rejection, not a kernel fault. It happens at the host or firmware level, so guest kernel diagnostics are irrelevant until it is resolved. Save the complete wording and find its source in the Hyper-V event details before touching the image.

Match the generation to the image's documented boot method #

A VM generation is a virtual hardware and firmware environment, not a compatibility dial that gets more permissive as its number rises. Generation 1 boots through a legacy BIOS environment; Generation 2 boots through UEFI with Secure Boot active by default. An image prepared for one of those environments may simply lack the boot components the other requires.

For a Generation 2 Linux guest, Microsoft's guidance is to choose the UEFI CA Secure Boot template when you create the VM, because Hyper-V cannot be configured to simultaneously trust both the Windows root and the UEFI CA root. A Linux bootloader signed through the UEFI CA chain is refused on a VM left on the Windows template, and that refusal lands before the kernel, which is exactly the class of report your Generation 2 attempt produced.

One more identification step belongs here. The label Linux RT names a kernel class, not a distribution, a build or a supported deployment package. Read the exact product name, release, architecture and intended deployment environment from the publisher's documentation, and check whether a hypervisor is a supported target at all before you invest more attempts.

A controlled Hyper-V boot diagnostic sequence #

  1. Identify the image. Record its release, architecture, media type and publisher. Distinguish an installer ISO from an installed virtual disk or a hardware-specific recovery image; they need different handling.
  2. Check the supported deployment target. Read the publisher's virtualization instructions. If they name a different hypervisor, decide deliberately whether you are building a supported installation or an experiment.
  3. Preserve a baseline. Record the Windows build, Hyper-V and WSL feature state, VM generation, boot order, attached disks, storage controllers, network adapters and resource allocations. Keep the original image file unchanged.
  4. Match firmware to the image. Select the generation the documented boot method requires. For a UEFI image, set the Secure Boot template the publisher's instructions call for rather than changing security settings blindly.
  5. Capture the complete failure. Save the console output and the full rejection text. Check the Hyper-V event details for a configuration rejection. If the kernel starts, use the image's documented verbose-boot or console options to expose the next failing stage.
  6. Check storage in two stages. First confirm the firmware can see the boot media; then read the kernel output for access to the root device. A bootloader that finds a RAM disk proves nothing about whether the kernel supports the attached disk controller.
  7. Change one variable and repeat. Same image, same baseline settings, one documented correction at a time. Record the last completed stage after each attempt.
  8. Use boot parameters only as documented for the identified image. An unrelated kernel command line can hide the original fault or add a second one.

The WSL coexistence question #

Your reason for staying on Hyper-V is sound: WSL depends on the Windows hypervisor, and fighting that dependency costs more than it saves. Two facts keep the decision clean.

First, coexistence is no longer forbidden. One workstation-class hypervisor added a documented mode that runs alongside the Windows hypervisor as of its version 15.5.5, so returning to it is possible if you verify the combination in that vendor's current documentation for your releases. Second, coexistence is not free: at least one reported case with that combination lost all host networking and recovered only with a clean Windows reinstall. Treat host networking as its own acceptance test: adapter status, address assignment, routes and connectivity checked independently of the VM. If host networking fails, stop changing guest boot settings and repair or roll back the host first.

Worked example: reading the Gen 1 stall and Gen 2 rejection for one image #

The inputs. From your two attempts on the same Linux RT image: attempt A, Generation 1, output ends after /initrd... ok; attempt B, Generation 2, ends with an invalid-VM report. From Microsoft's documentation: a Generation 2 Linux VM needs the UEFI CA Secure Boot template at creation. Unknown until you check the publisher's release notes: whether the image is built for BIOS or UEFI boot.

The rule. Count boot stages from zero: stage 0 is host configuration validation, stage 1 is the firmware loading the bootloader, stage 2 is the kernel and RAM disk loaded, stage 3 is the root filesystem mounted, stage 4 is userspace. Each symptom maps to one stage boundary.

The arithmetic. Attempt A printed the stage 2 completion message and died entering stage 3, so it reached stage 2. Attempt B was rejected at stage 0. Difference: 2 − 0 = 2 stages. Attempt A is two stages further along, which proves the image's bootloader and kernel load correctly in a BIOS environment and the media is readable.

The result and the decision. Two cases, one branch each:

  • If the release notes document UEFI boot: keep Generation 2, recreate the VM with the UEFI CA Secure Boot template, and retry. If the rejection text changes, capture it again; disabling Secure Boot for that single VM in its Hyper-V settings is a diagnostic step to isolate the signature path, not the configuration to run.
  • If the release notes document BIOS boot: keep Generation 1 and work stage 3 only. Correct the root-device reference and add the storage driver the image documents for the attached virtual controller, then boot once with the documented verbose console so the mount attempt is visible.

The threshold to remember: any stall at or above the initrd message is a storage or root-reference fault; any report below it is a configuration or firmware fault. Resources never enter either branch.

After it boots: real time is a second acceptance test #

A successful boot proves compatibility, not deterministic timing. A real-time kernel reduces scheduling delay inside the guest, but the hypervisor still decides when each virtual processor executes, and host contention delays the entire guest. Measure worst-case scheduling latency in the booted guest under representative host load and compare it with your application's deadline before trusting it with anything time-critical. A real-time runtime that refuses to initialize on a VM fails for the same underlying reason, which the article why a WinLC real-time runtime fails RTSS initialization on a VM works through; for running Windows-based control software in a Hyper-V guest instead, see running TwinCAT 3 in a Hyper-V VM on Windows 11.

One safety note where it belongs: no VM, real-time kernel or not, runs a machine safety function. That stays on certified safety hardware; the guest handles control, logging and edge tasks whose deadlines you have measured and accepted.

Questions asked

Does adding virtual processors or memory help the stalled boot?

No. More virtual processors or memory help only when resource exhaustion is the limiting condition. They cannot supply a missing bootloader, add a storage driver the kernel lacks, or make a rejected VM configuration valid. Check the image publisher's resource requirements, meet them once, and leave the allocation alone until the boot reaches userspace.

Can I keep WSL and a third-party hypervisor on the same laptop?

Yes, when the hypervisor release documents a coexistence mode with the Windows hypervisor; one workstation hypervisor added that mode in version 15.5.5. Before enabling it, export your VMs and record adapter and virtual-switch settings, because at least one reported case lost all host networking with that combination and recovered only with a Windows reinstall.

Does the initrd-loaded message mean the kernel is running?

Yes. By the time that message appears, the firmware found the boot device, the bootloader loaded the kernel and the kernel unpacked the initial RAM disk. What has not happened is the root mount. The fault is a missing driver for the attached virtual storage controller, a wrong root-device reference, or console output that moved to another device while boot continued.

Which Secure Boot setting does a Generation 2 Linux guest need?

Choose the UEFI CA Secure Boot template when you create the VM. Hyper-V cannot be configured to trust both the Windows root and the UEFI CA root at the same time, so a VM left on the Windows template rejects a Linux bootloader signed through the UEFI CA chain. Disabling Secure Boot for that one VM in its Hyper-V settings is a diagnostic step, not the configuration to run.

Once the Linux RT guest boots, is it deterministic enough for control?

No. The hypervisor decides when each virtual processor runs, so host contention delays the whole guest no matter how the kernel is patched. A successful boot proves compatibility, not timing. Measure worst-case scheduling latency in the guest under representative host load and compare it with your application's deadline, and keep machine safety functions on certified safety hardware, never in a VM.

Keep reading

  • Troubleshooting

    Mounting a VMware shared folder in a Linux automation VM

    The error means the guest has no vmhgfs kernel filesystem — the share is not missing, because vmware-hgfsclient already proves discovery works. On a guest using packaged open-vm-tools, run sudo vmhgfs-fuse .host:/ /mnt/hgfs instead. If /usr/bin/vmhgfs-fuse does not exist, repair open-vm-tools first and change no network settings.

    Remote access and virtualization

  • How-to

    Running Studio 5000 in a VM with licensing and PLC access

    Yes. Give each programming suite its own guest, serve FactoryTalk Activation from the host or a dedicated license VM so a rebuilt guest needs no rehost, and bind the guest to the physical NIC that carries the engineering network before touching USB passthrough. A guest that opens Logix Designer but cannot acquire a license or reach the controller has only passed installation.

    Remote access and virtualization

  • Troubleshooting

    Using a USB programming cable inside a Hyper-V VM

    Hyper-V gives Generation 1 guests no USB passthrough, so a Siemens USB PPI or MPI cable cannot appear inside the VM. Redirect the cable's host COM port over RDP, or move to an Ethernet-to-PPI adapter with an emulation driver on an isolated subnet; fix host-to-guest networking with an internal virtual switch and static IP addresses.

    Remote access and virtualization