EHerzog76 commented on issue #4072:
URL: https://github.com/apache/cloudstack/issues/4072#issuecomment-1471639036

   No, it dose not work.
   
   The problem is here:
       
https://github.com/apache/cloudstack/blob/main/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/WmiCallsV2.cs
        =>  public ComputerSystem AddUserData(ComputerSystem vm, string 
userData)
      Line-nr.: 93
      vmMgmtSvc.AddKvpItems  => 
WmiWrappers\ROOT.virtualization.v2.Msvm_VirtualSystemManagementService.cs
                    public uint AddKvpItems(string[] DataItems, 
System.Management.ManagementPath TargetSystem, out 
System.Management.ManagementPath Job)
                    => System.Management.ManagementBaseObject outParams = 
PrivateLateBoundObject.InvokeMethod("AddKvpItems", inParams, null);
                    The current Hyper-V version come back with the error code:  
Invalid parameter (32773)
                    (Documentations of this function is here:   
https://learn.microsoft.com/en-us/windows/win32/hyperv_v2/addkvpitems-msvm-virtualsystemmanagementservice
 )
                  
   Currently I found no work-a-round for this error !
   I will fork your project and rewrite the function:
      public ComputerSystem AddUserData(ComputerSystem vm, string userData)
      
   in this way:   Create a config.iso  disk with the needed data for cloud-init.
   See here for more details:
     => https://cloudinit.readthedocs.io/en/19.3/topics/datasources/nocloud.html
     => https://cloudinit.readthedocs.io/en/19.3/topics/examples.html
     => 
https://cloudinit.readthedocs.io/en/19.3/topics/network-config-format-v2.html#network-config-v2
   
   (The Openstack implementation is working. See here for the implementation 
details:  
https://github.com/openstack/nova/blob/master/nova/virt/configdrive.py )
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to