Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xVMSwitch - Add support for EmbeddedTeaming #95

Closed
BrianFarnhill opened this issue May 30, 2017 · 5 comments
Closed

xVMSwitch - Add support for EmbeddedTeaming #95

BrianFarnhill opened this issue May 30, 2017 · 5 comments

Comments

@BrianFarnhill
Copy link
Contributor

I'm new to the party here so forgive anything that sounds way off base here :)

Basically I'm looking at deploying Hyper-V on a server 2016 cluster and want to take advantage of the embedded teaming that got added there. Having a quick look over the resource it seems like all that needs to be done is the following:

  • Add EmbeddedTeaming property to the resource
  • Change the NetAdaptorName property to take an array of strings (with a version check on the OS to throw an error if you try to use more than one on something that's not server 2016)
  • Update the logic in the get/set/test methods to account for the addition of that property and the string array that is now the netadaptername property

Assuming I've interpreted that right, I'll make a start on the changes for this one now, but if anyone has any input or thoughts on this one let me know.

@iainbrighton
Copy link
Contributor

@BrianFarnhill There is a resource from @rchaganti that includes Hyper-V SET support. I thought that was going to be merged in at some point, but it's probably worth talking to Ravi to ensure that efforts aren't wasted/duplicated?!

@techthoughts2
Copy link

@BrianFarnhill - also keen to have this feature and had started using your #96 PR
It is creating the embedded team fine. This code for example is working great:

xVMSwitch NewSET {
	Name = "NewSET"
	Type = "External"
	EnableEmbeddedTeaming = $true
	AllowManagementOS = $false
	NetAdapterName = "Public1", "Public2"
	Ensure = "Present"
} #newSET

However, now when I use xVMSwitch to build a single adapter switch - it still works - but I'm getting errors on the local device when running Get-DSCConfiguration.
Rolling back to the currently published branch allows Get-DSCConfiguration to run without issue.
I haven't pinned it down just yet but based off the log info below it may have something to do with this change:

Change the NetAdaptorName property to take an array of strings

Relevant config:

xVMSwitch SVirtualSwitch {
	Name = "NotTeamVSwitch"
	Type = 'External'
	EnableEmbeddedTeaming = $false
	AllowManagementOS = $true
	NetAdapterName = 'ServiceNet'
	Ensure = 'Present'
} #sVirtualSw

Error output:

PS C:\Windows\system32> Get-DscConfiguration
Get-DscConfiguration : GetConfiguration did not succeed.
At line:1 char:1
+ Get-DscConfiguration
+ ~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (MSFT_DSCLocalConfigurationManager:root/Microsoft/...gurationManager) [Get-DscConfiguration], CimException
    + FullyQualifiedErrorId : MI RESULT 1,Get-DscConfiguration

DSC Logs:

Log Name:      Microsoft-Windows-DSC/Operational
Source:        Microsoft-Windows-DSC
Date:          6/12/2017 4:14:04 PM
Event ID:      4250
Task Category: None
Level:         Error
Keywords:      
User:          SYSTEM
Computer:      *******-******
Description:
Job {0D13A14C-4FB4-11E7-A957-ECF4BBD93BF3} : 
Message Unable to cast object of type 'System.String' to type 'System.Collections.IList'.
Parameter name: value 
HResult -2147024809 
StackTrack    at Microsoft.Management.Infrastructure.Internal.Data.CimPropertyOfInstance.set_Value(Object value)
   at Microsoft.PowerShell.DesiredStateConfiguration.Internal.ResourceProviderAdapter.GetTargetResource(IntPtr resourceConfigurationInstanceHandle, IntPtr nonResourcePropetiesHandle, IntPtr metaConfigHandle, IntPtr regInstanceHandle, IStreamsHandler plugInStreamsHandler, IntPtr& outputInstanceHandle, IntPtr& errorInstanceHandle)
   at Microsoft.PowerShell.DesiredStateConfiguration.Internal.DscPluginManagedEntryWrapper.Get(IntPtr provContext, IntPtr instance, IntPtr nonResourcePropeties, IntPtr metaConfig, IntPtr regInstance, IntPtr outputInstance, IntPtr extendedError)



Log Name:      Microsoft-Windows-DSC/Operational
Source:        Microsoft-Windows-DSC
Date:          6/12/2017 4:14:04 PM
Event ID:      4097
Task Category: Send configuration scenario for Local configuration manager
Level:         Error
Keywords:      
User:          SYSTEM
Computer:      *******-******
Description:
Job {0D13A14C-4FB4-11E7-A957-ECF4BBD93BF3} : 
This event indicates that failure happens when LCM is processing the configuration. Error Id is 0x1. Error Detail is The SendConfigurationApply function did not succeed.. Resource Id is [xVMSwitch]SVirtualSwitch and Source Info is ::129::3::xVMSwitch. Error Message is NULL.


Log Name:      Microsoft-Windows-DSC/Operational
Source:        Microsoft-Windows-DSC
Date:          6/12/2017 4:14:04 PM
Event ID:      4252
Task Category: None
Level:         Error
Keywords:      
User:          SYSTEM
Computer:      *******-******
Description:
Job {0D13A14C-4FB4-11E7-A957-ECF4BBD93BF3} : 
MIResult: 1
Error Message: GetConfiguration did not succeed.
Message ID: MI RESULT 1
Error Category: 0
Error Code: 1
Error Type: MI

@BrianFarnhill
Copy link
Contributor Author

@techthoughts2 Thanks for the feedback - I think I know what's happening here. I'll make a fix and do some testing then update this branch. Will post when I have time to make the update.

@bgelens bgelens changed the title Add support for EmbeddedTeaming on xVMSwitch xVMSwitch - Add support for EmbeddedTeaming Jun 14, 2017
@techthoughts2
Copy link

@BrianFarnhill - I tested again today with all the recent changes to #96 (nice work btw) and just wanted to give you a heads up that the Get-DSCConfiguration error with single adapter switch error is still present.

@bgelens
Copy link
Contributor

bgelens commented Jun 26, 2017

@BrianFarnhill I'll address the fix for this in the review. Thanks @techthoughts2 for reporting

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants