Unanswered WinRM : quotas setting ignored since KB2506143

  • Friday, December 14, 2012 4:26 PM
     
      Has Code

    Hello,

    Since the installation of the update KB2506143 two days ago, which contains WinRM 3.0, it seems that the quotas, in particular MaxMemoryPerShellMB, are ignored.

    On a Windows 7 SP1 x64 host, I have set the quota MaxMemoryPerShellMB to 1 Go:

    C:\WINDOWS\system32>winrm set winrm/config/winrs @{MaxMemoryPerShellMB="1024"}
    Winrs
        AllowRemoteShellAccess = true
        IdleTimeout = 7200000
        MaxConcurrentUsers = 10
        MaxShellRunTime = 2147483647
        MaxProcessesPerShell = 25
        MaxMemoryPerShellMB = 1024
        MaxShellsPerUser = 30

    After this setting, I launch a remote command (on my local host) which starts a JVM to try to allow 115Mb:

    C:\WINDOWS\system32>winrs -r:localhost -unencrypted -u:.\admin -p:xxxxxx java -Xms115m  -version
    Error occurred during initialization of VM
    Cannot create VM thread. Out of system resources.

    This remote command failed, because the JVM cannot obtain the requested memory ...

    If I try with 114Mb the command works:

    C:\WINDOWS\system32>winrs -r:localhost -unencrypted -u:.\admin -p:xxxxxx java -Xms114m  -version
    java version "1.6.0_25"
    Java(TM) SE Runtime Environment (build 1.6.0_25-b06)
    Java HotSpot(TM) 64-Bit Server VM (build 20.0-b11, mixed mode)

    Because the default value for this quota is 150Mb I think that the custom setting is no more used.

    This issue occurs since 2 days for me, before this worked fine.

    I think the issue is related to the upgrade of WinRMin version 3.0  by the update KB2506143.

    Do you have experimented a similar issue ? Do you know a workaround ? Uninstall the update is not an option for me.

    Thank you for your opinion.

All Replies

  • Friday, December 14, 2012 7:45 PM
     
      Has Code

    Hello,

    Since the installation of the update KB2506143 two days ago, which contains WinRM 3.0, it seems that the quotas, in particular MaxMemoryPerShellMB, are ignored.

    On a Windows 7 SP1 x64 host, I have set the quota MaxMemoryPerShellMB to 1 Go:

    C:\WINDOWS\system32>winrm set winrm/config/winrs @{MaxMemoryPerShellMB="1024"}
    Winrs
        AllowRemoteShellAccess = true
        IdleTimeout = 7200000
        MaxConcurrentUsers = 10
        MaxShellRunTime = 2147483647
        MaxProcessesPerShell = 25
        MaxMemoryPerShellMB = 1024
        MaxShellsPerUser = 30

    After this setting, I launch a remote command (on my local host) which starts a JVM to try to allow 115Mb:

    C:\WINDOWS\system32>winrs -r:localhost -unencrypted -u:.\admin -p:xxxxxx java -Xms115m  -version
    Error occurred during initialization of VM
    Cannot create VM thread. Out of system resources.

    This remote command failed, because the JVM cannot obtain the requested memory ...

    If I try with 114Mb the command works:

    C:\WINDOWS\system32>winrs -r:localhost -unencrypted -u:.\admin -p:xxxxxx java -Xms114m  -version
    java version "1.6.0_25"
    Java(TM) SE Runtime Environment (build 1.6.0_25-b06)
    Java HotSpot(TM) 64-Bit Server VM (build 20.0-b11, mixed mode)

    Because the default value for this quota is 150Mb I think that the custom setting is no more used.

    This issue occurs since 2 days for me, before this worked fine.

    I think the issue is related to the upgrade of WinRMin version 3.0  by the update KB2506143.

    Do you have experimented a similar issue ? Do you know a workaround ? Uninstall the update is not an option for me.

    Thank you for your opinion.


  • Tuesday, December 18, 2012 10:47 AM
    Moderator
     
     

    Hi,

    Please try the hotfix and see if it helps:

    You cannot enable Server Manager remote management after you install Windows Management Framework 3.0 update on a computer that is running Windows 7 or Windows Server 2008 R2

    http://support.microsoft.com/kb/2749615

    Thanks.

    Nicholas Li
    TechNet Community Support

  • Wednesday, December 19, 2012 8:26 AM
     
      Has Code

    Hi Nicholas,

    Thank you for your reply.

    Unfortunately the hotfix KB2749615 changes nothing for me.

    The hotfix has been installed:

    C:\Windows\system32>wmic qfe list
    Caption                                        CSName      Description      FixComments  HotFixID   InstallDate  InstalledBy                InstalledOn
    http://support.microsoft.com/                  SEVEN-PC    Update                        KB2506143               SEVEN-PC\zerikv            12/16/2012
    http://support.microsoft.com/?kbid=2749615     SEVEN-PC    Hotfix                        KB2749615               SEVEN-PC\zerikv            12/18/2012

    The quota is set to 1Go (the default value for WinRM 3.0):

    C:\Windows\system32>winrm get winrm/config/winrs
    Winrs
        MaxMemoryPerShellMB = 1024

    This value is also applied for the powershell session:

    C:\Windows\system32>winrs -r:localhost -unencrypted -u:.\admin -p:xxxxx powershell -command "Get-PSSessionConfiguration  | Format-List -Property * | findstr MaxMemoryPerShellMB"
    MaxMemoryPerShellMB           : 1024
    MaxMemoryPerShellMB             : 1024
    MaxMemoryPerShellMB           : 1024
    

    But I'm still unable to allocate memory for a command launched by WinRM:

    C:\Windows\system32>winrs -r:localhost -unencrypted -u:.\admin -p:xxxxx java -Xms128m -version
    Error occurred during initialization of VM
    Could not reserve enough space for object heap

    Any other idea will be welcomed.

    Thanks.

  • Wednesday, December 26, 2012 11:30 PM
     
     
    I got the same problem. Did you find a workaround yet?
  • Wednesday, January 02, 2013 11:50 AM
     
     

    Hello Keno,

    Unfortunatly, no workaround.

    We opened a ticket on the MS Support about this issue, and the only solution for this moment is to uninstall the update KB2506143.

    As you can read here 

    http:// blogs.msdn.com /b/powershell/archive/2012/12/20/windows-management-framework-3-0-compatibility-update.aspx


    this update has been removed from WU.

    Regards,

  • Wednesday, January 02, 2013 2:42 PM
     
     

    That is unfortunate. This bug is really messing me up (and uninstalling is unfortunately not an option for me). Do let me know if you come across a solution.

    Thanks,

    -Keno