BYOC Hyper-V host system failing to create VM, “Error running PowerShell command”

nbrink's Avatar

nbrink

29 Jan, 2026 05:23 AM

After finally getting a build image (see this discussion), the AppVeyor host agent appears to have installed itself and be running. However, when I send jobs to it, it fails to start any of them. I see various logs from AppVeyor host agent including these errors:

First error:

Category: Appveyor.HostAgent.HyperV.WorkerCloud
EventId: 0


[worker-2306-002] Cannot create worker VM

Second error:

Category: Appveyor.HostAgent.HyperV.WorkerCloud
EventId: 0


[worker-2306-002] System.Exception: Error running PowerShell command at Appveyor.BuildWorkers.HyperV.HyperVUtility.ExecutePowerShell(String args) at Appveyor.BuildWorkers.HyperV.HyperVUtility.CreateVirtualMachine(String vmName, Int32 generation, Int32 ramMB, Int32 cpuCount, Boolean nestedVirtualizationEnabled, String imagePath, Int32 diskSizeGB, Boolean vmqEnabled, Int32 networkVlan, String networkSwitchName, Boolean macAddressSpoofingEnabled, String hardDiskDirectory, Int32 maxIOPS, Int32 maxRamMB, CancellationToken cancellationToken) at Appveyor.HostAgent.HyperV.Worker.CreateWorker()

The host system is Windows 11 25H2 (build 26200.7623).

I wanted to see BYOC function before investing time in creating a packer image appropriate for my software..

Is this a known issue? Is there anything I can do to work around it or any other information you need?

Thanks.

  1. Support Staff 1 Posted by Owen McDonnell on 04 Feb, 2026 11:15 PM

    Owen McDonnell's Avatar

    I'm on a Windows 11 24H2 machine but can't recreate this problem.
    Can you share your build cloud settings? Double check that the path to your build image is correct.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac