none
How to Register MOF file of Hyper-V Extensible Switch extension RRS feed

  • Question

  • I have deployed the Hyper-V Extensible Switch extension successfully on Hyper-v Extensible Switch ,which is a sample provide by Windows Dev Center Website:

    NDIS forwarding extension sample.

    I registered two MOF file named MSForwardExtPolicyStatus.mof and MSForwardExtPolicy.mof using the commands as follow:

    net stop vmms
    mofcomp -N:root\virtualization\v2 .\MSForwardExtPolicy.mof
    mofcomp -N:root\virtualization\v2 .\MSForwardExtPolicyStatus.mof
    net start vmms

    MSForwardExtPolicy.mof

    //
    // Copyright (c) Microsoft Corporation. All Rights Reserved.
    //
    // Custom property for MsForwardExt
    // MAC Address Allow Policy
    //
    #pragma namespace("\\\\.\\root\\virtualization\\v2")
    [ Dynamic, 
     UUID("EB29F0F2-F5DC-45C6-81BB-3CD9F219BBBB"),
     ExtensionId("37d9eae6-5bae-48c5-bff1-63a7cdd7e4f4"), 
     Provider("VmmsWmiInstanceAndMethodProvider"),
     Locale(0x409),
     InterfaceVersion("1"),
     InterfaceRevision("0"),
    DisplayName("MSForwardExt MAC Address Policy") : Amended,
    Description("Source MAC Addresses to allow sends on MSForwardExt.") : Amended]
    class MSForwardExt_MacAddressRule : Msvm_EthernetSwitchFeatureSettingData {
       
        //
        // MAC Address set on switch to allow sends from.
        //
        [ Read,
          Write,
          WmiDataId(1),
          Max(6),
          InterfaceVersion(1),
          InterfaceRevision(0),
          Description (
             "Mac Address") : Amended]
        uint8 MacAddress[] = {};
    };     

    and the result of executing these commands was OK.

    But when I tried to get vSwitch feature Information on powershell through two commands:

    Get-VMSwitchExtensionSwitchData and Get-VMSwitchExtensionSwitchFeature. but I got nothing about the vSwitch   feature :"MSForwardExt MAC Address Policy" in the mof file.

    Can anyone tell me how to check out whether my mof file is registered successfully or not? And if the registration is not successful, what shoud do to make it successful? 

    Any advices will be appreciated!!

    Sunday, November 25, 2012 10:48 AM

Answers

All replies

  • Hi,

    You'd use Get-VMSystemSwitchExtensionSwitchFeature to retrieve the configuration object. You can then modify it and add it to a particular switch. Only when the property is configured on a switch will Get-VmSwitchExtensionSwitchFeature return the corresponding configuration.

    If you haven't already, the documentation here http://msdn.microsoft.com/en-us/library/windows/hardware/hh598140(v=vs.85).aspx explains this area a bit. Hope this helps! 

    Thanks,
    Luis

    Friday, November 30, 2012 7:08 PM
  • Luis,   I have done all the things appear in the documentation you provided,  it didn't work.  But your advice is still very helpful to me. Hoping for your next advice.

    Thanks,

    Gandhi

    Wednesday, December 5, 2012 10:34 AM