Hyper-V unable to set IP-addresses + URL

Chris Gårdenberg's Avatar

Chris Gårdenberg

12 Aug, 2019 08:50 AM

Error message: Error sending 'AppVeyorUrl' and NIC parameters KVP item to worker VM

It creates the VM, but for some reason cannot set the IP address configured.

  1. 1 Posted by Chris Gårdenber... on 12 Aug, 2019 08:53 AM

    Chris Gårdenberg's Avatar
    [worker-2-002] System.TypeInitializationException: The type initializer for 'System.Management.WmiNetUtilsHelper' threw an exception. ---> System.ArgumentNullException: Value cannot be null.
    Parameter name: ptr  
       at System.Runtime.InteropServices.Marshal.GetDelegateForFunctionPointer(IntPtr ptr, Type t)
       at System.Runtime.InteropServices.Marshal.GetDelegateForFunctionPointer[TDelegate](IntPtr ptr)
       at System.Management.WmiNetUtilsHelper.LoadDelegate[TDelegate](TDelegate& delegate_f, IntPtr hModule, String procName)
       at System.Management.WmiNetUtilsHelper..cctor()
       --- End of inner exception stack trace ---
       at System.Management.MTAHelper.IsNoContextMTA()
       at System.Management.MTAHelper.CreateInMTA(Type type)
       at System.Management.ManagementPath.CreateWbemPath(String path)
       at Appveyor.HostAgent.HyperV.HyperVUtility.AddKVPItems(String vmName, Dictionary`2 itemsToAdd)
       at Appveyor.HostAgent.HyperV.Worker.CreateWorker()
  2. Support Staff 2 Posted by Ilya Finkelshte... on 12 Aug, 2019 05:54 PM

    Ilya Finkelshteyn's Avatar

    Hi Chris,

    Can you please send us a screenshot of your Hyper-V build cloud settings? You can find it under Account > Build Environment.


  3. 3 Posted by Chris Gårdenber... on 13 Aug, 2019 05:57 AM

    Chris Gårdenberg's Avatar


    Note that "Disabled" wasn't checked in when I tried to use it. :) It's just to stop the machines from stop trying to provision.

  4. Support Staff 4 Posted by Ilya Finkelshte... on 15 Aug, 2019 03:52 AM

    Ilya Finkelshteyn's Avatar

    Hi Chris,

    Sorry for delay with answer. Did it happened before you installed new host agent (which I see in the another email thread)? Do you still need to troubleshoot it as long as you migrating to the new AppVeyor Server? If still Yes, please run this in PowerShell and share the results (feel free to delete/obfuscate authorization token). My suspicion (looking into call stack) that it cannot read AppVeyor URL from the old Agent settings registry path.

    if (Test-Path "HKLM:\SOFTWARE\Appveyor\Host Agent\Settings\") {Get-ItemProperty "HKLM:\SOFTWARE\Appveyor\Host Agent\Settings\"}
    if (Test-Path "HKLM:\SOFTWARE\Appveyor\HostAgent\") {Get-ItemProperty "HKLM:\SOFTWARE\Appveyor\HostAgent\"}


  5. 5 Posted by Chris Gårdenber... on 15 Aug, 2019 04:32 AM

    Chris Gårdenberg's Avatar

    Yeah, that might be it. Oh well. ^^ Remote processes are working at least. I can look into Hyper V later :)


    Chris Gårdenberg
    MultiNet Interactive AB

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


? 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