Cannot validate arg...
 
Notifications
Clear all

Cannot validate argument on parameter 'SwitchName'.

5 Posts
2 Users
0 Reactions
1,978 Views
Posts: 15
Topic starter
(@vidur)
Active Member
Joined: 6 years ago

I have an issue with SolidCP 1.4.2 with HyperV service provider configured. I am getting this error when I try to create a new VM: 

OS Template: Windows 2012 R2 DC

00:00:00 Setup external network
00:00:00 Assigning external IP addresses
00:00:00 Setting external primary IP address
00:00:00 Setup management network
00:00:00 Management network setup - Skipped
00:00:00 Setup private network
00:00:00 Private network setup - Skipped
00:00:00 OS Template Generation: 2
00:00:00 SecureBoot: Enabled
00:00:00 OS Template: Win2012R2DC
00:00:00 Start Converting template VHD
00:00:00 Template VHD path: C:Hyper-VSCPTemplatesWin2012R2DC.vhdx
00:00:00 Converting to 'C:Hyper-VSCPCustomerscust4cust4-6Virtual Hard Diskscust4-6.vhdx'
00:03:16 Template VHD size: 80 GB
00:03:16 Expanding to 60 GB
00:03:16 Expand VHD - Skipped
00:03:23 Skip expanding VHD - no volumes found
00:03:23 Sysprep file: WindowsSystem32sysprepunattend.xml
00:03:23 Error processing sysprep file: Index was outside the bounds of the array.
00:03:24 CPU cores: 1
00:03:24 RAM: 1048 MB
00:03:24 Creating Virtual Machine object
00:03:30 Error creating Virtual Machine object: System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.Management.Automation.ParameterBindingValidationException: Cannot validate argument on parameter 'SwitchName'. The argument is null or empty. Provide an argument that is not null or empty, and then try the command again. ---> System.Management.Automation.ValidationMetadataException: The argument is null or empty. Provide an argument that is not null or empty, and then try the command again. at System.Management.Automation.ValidateNotNullOrEmptyAttribute.Validate(Object arguments, EngineIntrinsics engineIntrinsics) at System.Management.Automation.ParameterBinderBase.BindParameter(CommandParameterInternal parameter, CompiledCommandParameter parameterMetadata, ParameterBindingFlags flags) --- End of inner exception stack trace --- at System.Management.Automation.Runspaces.PipelineBase.Invoke(IEnumerable input) at SolidCP.Providers.Virtualization.PowerShellManager.ExecuteInternal(Command cmd, Boolean addComputerNameParameter, Boolean withExceptions) at SolidCP.Providers.Virtualization.NetworkAdapterHelper.Update(PowerShellManager powerShell, VirtualMachine vm) at SolidCP.Providers.Virtualization.HyperV2012R2.UpdateVirtualMachine(VirtualMachine vm) at SolidCP.Providers.Virtualization.HyperV2012R2.CreateVirtualMachine(VirtualMachine vm) at SolidCP.Server.VirtualizationServer2012.CreateVirtualMachine(VirtualMachine vm) --- End of inner exception stack trace ---
System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.Management.Automation.ParameterBindingValidationException: Cannot validate argument on parameter 'SwitchName'. The argument is null or empty. Provide an argument that is not null or empty, and then try the command again. ---> System.Management.Automation.ValidationMetadataException: The argument is null or empty. Provide an argument that is not null or empty, and then try the command again.
at System.Management.Automation.ValidateNotNullOrEmptyAttribute.Validate(Object arguments, EngineIntrinsics engineIntrinsics)
at System.Management.Automation.ParameterBinderBase.BindParameter(CommandParameterInternal parameter, CompiledCommandParameter parameterMetadata, ParameterBindingFlags flags)
--- End of inner exception stack trace ---
at System.Management.Automation.Runspaces.PipelineBase.Invoke(IEnumerable input)
at SolidCP.Providers.Virtualization.PowerShellManager.ExecuteInternal(Command cmd, Boolean addComputerNameParameter, Boolean withExceptions)
at SolidCP.Providers.Virtualization.NetworkAdapterHelper.Update(PowerShellManager powerShell, VirtualMachine vm)
at SolidCP.Providers.Virtualization.HyperV2012R2.UpdateVirtualMachine(VirtualMachine vm)
at SolidCP.Providers.Virtualization.HyperV2012R2.CreateVirtualMachine(VirtualMachine vm)
at SolidCP.Server.VirtualizationServer2012.CreateVirtualMachine(VirtualMachine vm)
--- End of inner exception stack trace ---
at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
at SolidCP.Providers.Virtualization2012.VirtualizationServer2012.CreateVirtualMachine(VirtualMachine vm)
at SolidCP.EnterpriseServer.VirtualizationServerController2012.CreateVirtualMachineInternal(String taskId, VirtualMachine vm, LibraryItem osTemplate, Int32 externalAddressesNumber, Boolean randomExternalAddresses, Int32[] externalAddresses, Int32 privateAddressesNumber, Boolean randomPrivateAddresses, String[] privateAddresses, String summaryLetterEmail)
00:03:31 VPS was not created

Please advise, what could be the issue here?

4 Replies
Posts: 110
(@berkut)
Estimable Member
Joined: 7 years ago

You need to select an Ethernet interface in the HyperV provider settings. If it is empty, then first create it in HyperV server.

Reply
Posts: 15
Topic starter
(@vidur)
Active Member
Joined: 6 years ago

Thanks Genadij. I am able to create the VM now without selecting the "External Network enabled" option.

I've one more question. My HyperV provider setting is showing no option in "Connect to Network" dropdown. Please look at this screenshot. 

Could you please advise what is missing so I can see the options in dropdown?

Thanks in advance.

Reply
Posts: 110
(@berkut)
Estimable Member
Joined: 7 years ago
Reply
Posts: 15
Topic starter
(@vidur)
Active Member
Joined: 6 years ago

Thanks. It has solved my problem. I really appreciate your help!

Reply
Share: