none
Hyper-V Core Server 2019 ignoring power plan thresholds RRS feed

  • Question

  • I am attempting to tweak Hyper-V Core Server 2019 (host) power thresholds, however my attempts have failed so far.

    Scenario

    The newly created Hyper-V 2019 Server (part of Workgroup, not yet a Domain) has been attached to an external UPS. Battery status is provided through a USB cable. The UPS is listed in the device list and battery status can be queried through Powershell gwmi win32_battery command.

    My goal is to shutdown the machine when Low level threshold (30%) is reached, to allow graceful shutdown of both VMs and host.

    As the HV machine has no GUI, power plan settings must be tweaked by other means.

    My first attempt was to change settings through Group Policy Editor snap-in in MMC from a remote computer: Computer configuration > Administrative Templates > System > Power Management > Notification Settings > Low battery notification Level (& action). Forced GPUPDATE on HV machine, settings ignored!

    I have then attempted to change setting through powercfg:

    powercfg -setdcvalueindex SCHEME_CURRENT SUB_BATTERY BATLEVELLOW 30
    powercfg -setdcvalueindex SCHEME_CURRENT SUB_BATTERY BATACTIONLOW 3
    

    However also these settings are ignored, although they appear as correctly set when querying power plans:

    Power Scheme GUID: 381b4222-f694-41f0-9685-ff5bb260df2e  (Balanced)
      GUID Alias: SCHEME_BALANCED
      Subgroup GUID: fea3413e-7e05-4911-9a71-700331f1c294  (Settings belonging to no subgroup)
        GUID Alias: SUB_NONE
      Subgroup GUID: 0012ee47-9041-4b5d-9b77-535fba8b1442  (Hard disk)
        GUID Alias: SUB_DISK
        Power Setting GUID: 6738e2c4-e8a5-4a42-b16a-e040e769756e  (Turn off hard disk after)
          GUID Alias: DISKIDLE
          Minimum Possible Setting: 0x00000000
          Maximum Possible Setting: 0xffffffff
          Possible Settings increment: 0x00000001
          Possible Settings units: Seconds
        Current AC Power Setting Index: 0x00000000
        Current DC Power Setting Index: 0x00000000

      Subgroup GUID: 238c9fa8-0aad-41ed-83f4-97be242c8f20  (Sleep)
        GUID Alias: SUB_SLEEP
        Power Setting GUID: 29f6c1db-86da-48c5-9fdb-f2b67b1f44da  (Sleep after)
          GUID Alias: STANDBYIDLE
          Minimum Possible Setting: 0x00000000
          Maximum Possible Setting: 0xffffffff
          Possible Settings increment: 0x00000001
          Possible Settings units: Seconds
        Current AC Power Setting Index: 0x00000000
        Current DC Power Setting Index: 0x00000000

        Power Setting GUID: 94ac6d29-73ce-41a6-809f-6363ba21b47e  (Allow hybrid sleep)
          GUID Alias: HYBRIDSLEEP
          Possible Setting Index: 000
          Possible Setting Friendly Name: Off
          Possible Setting Index: 001
          Possible Setting Friendly Name: On
        Current AC Power Setting Index: 0x00000001
        Current DC Power Setting Index: 0x00000001

        Power Setting GUID: 9d7815a6-7ee4-497e-8888-515a05f02364  (Hibernate after)
          GUID Alias: HIBERNATEIDLE
          Minimum Possible Setting: 0x00000000
          Maximum Possible Setting: 0xffffffff
          Possible Settings increment: 0x00000001
          Possible Settings units: Seconds
        Current AC Power Setting Index: 0x00000000
        Current DC Power Setting Index: 0x00000000

        Power Setting GUID: bd3b718a-0680-4d9d-8ab2-e1d2b4ac806d  (Allow wake timers)
          GUID Alias: RTCWAKE
          Possible Setting Index: 000
          Possible Setting Friendly Name: Disable
          Possible Setting Index: 001
          Possible Setting Friendly Name: Enable
          Possible Setting Index: 002
          Possible Setting Friendly Name: Important Wake Timers Only
        Current AC Power Setting Index: 0x00000001
        Current DC Power Setting Index: 0x00000001

      Subgroup GUID: 2a737441-1930-4402-8d77-b2bebba308a3
        Power Setting GUID: 48e6b7a6-50f5-4782-a5d4-53bb8f07e226
        Current AC Power Setting Index: 0x00000001
        Current DC Power Setting Index: 0x00000001

      Subgroup GUID: 2e601130-5351-4d9d-8e04-252966bad054  (Idle Resiliency)
        GUID Alias: SUB_IR
      Subgroup GUID: 48672f38-7a9a-4bb2-8bf8-3d85be19de4e  (Interrupt Steering Settings)
        GUID Alias: SUB_INTSTEER
      Subgroup GUID: 4f971e89-eebd-4455-a8de-9e59040e7347  (Power buttons and lid)
        GUID Alias: SUB_BUTTONS
        Power Setting GUID: 5ca83367-6e45-459f-a27b-476b1d01c936  (Lid close action)
          GUID Alias: LIDACTION
          Possible Setting Index: 000
          Possible Setting Friendly Name: Do nothing
          Possible Setting Index: 001
          Possible Setting Friendly Name: Sleep
          Possible Setting Index: 002
          Possible Setting Friendly Name: Hibernate
          Possible Setting Index: 003
          Possible Setting Friendly Name: Shut down
        Current AC Power Setting Index: 0x00000001
        Current DC Power Setting Index: 0x00000001

        Power Setting GUID: 7648efa3-dd9c-4e3e-b566-50f929386280  (Power button action)
          GUID Alias: PBUTTONACTION
          Possible Setting Index: 000
          Possible Setting Friendly Name: Do nothing
          Possible Setting Index: 001
          Possible Setting Friendly Name: Sleep
          Possible Setting Index: 002
          Possible Setting Friendly Name: Hibernate
          Possible Setting Index: 003
          Possible Setting Friendly Name: Shut down
          Possible Setting Index: 004
          Possible Setting Friendly Name: Turn off the display
        Current AC Power Setting Index: 0x00000003
        Current DC Power Setting Index: 0x00000003

        Power Setting GUID: 96996bc0-ad50-47ec-923b-6f41874dd9eb  (Sleep button action)
          GUID Alias: SBUTTONACTION
          Possible Setting Index: 000
          Possible Setting Friendly Name: Do nothing
          Possible Setting Index: 001
          Possible Setting Friendly Name: Sleep
          Possible Setting Index: 002
          Possible Setting Friendly Name: Hibernate
          Possible Setting Index: 003
          Possible Setting Friendly Name: Shut down
          Possible Setting Index: 004
          Possible Setting Friendly Name: Turn off the display
        Current AC Power Setting Index: 0x00000000
        Current DC Power Setting Index: 0x00000000

        Power Setting GUID: a7066653-8d6c-40a8-910e-a1f54b84c7e5  (Start menu power button)
          GUID Alias: UIBUTTON_ACTION
          Possible Setting Index: 000
          Possible Setting Friendly Name: Sleep
          Possible Setting Index: 001
          Possible Setting Friendly Name: Hibernate
          Possible Setting Index: 002
          Possible Setting Friendly Name: Shut down
        Current AC Power Setting Index: 0x00000002
        Current DC Power Setting Index: 0x00000002

      Subgroup GUID: 501a4d13-42af-4429-9fd1-a8218c268e20  (PCI Express)
        GUID Alias: SUB_PCIEXPRESS
        Power Setting GUID: ee12f906-d277-404b-b6da-e5fa1a576df5  (Link State Power Management)
          GUID Alias: ASPM
          Possible Setting Index: 000
          Possible Setting Friendly Name: Off
          Possible Setting Index: 001
          Possible Setting Friendly Name: Moderate power savings
          Possible Setting Index: 002
          Possible Setting Friendly Name: Maximum power savings
        Current AC Power Setting Index: 0x00000001
        Current DC Power Setting Index: 0x00000002

      Subgroup GUID: 54533251-82be-4824-96c1-47b60b740d00  (Processor power management)
        GUID Alias: SUB_PROCESSOR
        Power Setting GUID: 893dee8e-2bef-41e0-89c6-b55d0929964c  (Minimum processor state)
          GUID Alias: PROCTHROTTLEMIN
          Minimum Possible Setting: 0x00000000
          Maximum Possible Setting: 0x00000064
          Possible Settings increment: 0x00000001
          Possible Settings units: %
        Current AC Power Setting Index: 0x00000005
        Current DC Power Setting Index: 0x00000005

        Power Setting GUID: 94d3a615-a899-4ac5-ae2b-e4d8f634367f  (System cooling policy)
          GUID Alias: SYSCOOLPOL
          Possible Setting Index: 000
          Possible Setting Friendly Name: Passive
          Possible Setting Index: 001
          Possible Setting Friendly Name: Active
        Current AC Power Setting Index: 0x00000001
        Current DC Power Setting Index: 0x00000000

        Power Setting GUID: bc5038f7-23e0-4960-96da-33abaf5935ec  (Maximum processor state)
          GUID Alias: PROCTHROTTLEMAX
          Minimum Possible Setting: 0x00000000
          Maximum Possible Setting: 0x00000064
          Possible Settings increment: 0x00000001
          Possible Settings units: %
        Current AC Power Setting Index: 0x00000064
        Current DC Power Setting Index: 0x00000064

      Subgroup GUID: 7516b95f-f776-4464-8c53-06167f40cc99  (Display)
        GUID Alias: SUB_VIDEO
        Power Setting GUID: 3c0bc021-c8a8-4e07-a973-6b14cbcb2b7e  (Turn off display after)
          GUID Alias: VIDEOIDLE
          Minimum Possible Setting: 0x00000000
          Maximum Possible Setting: 0xffffffff
          Possible Settings increment: 0x00000001
          Possible Settings units: Seconds
        Current AC Power Setting Index: 0x00000258
        Current DC Power Setting Index: 0x0000012c

        Power Setting GUID: aded5e82-b909-4619-9949-f5d71dac0bcb  (Display brightness)
          Minimum Possible Setting: 0x00000000
          Maximum Possible Setting: 0x00000064
          Possible Settings increment: 0x00000001
          Possible Settings units: %
        Current AC Power Setting Index: 0x00000064
        Current DC Power Setting Index: 0x00000028

        Power Setting GUID: f1fbfde2-a960-4165-9f88-50667911ce96  (Dimmed display brightness)
          Minimum Possible Setting: 0x00000000
          Maximum Possible Setting: 0x00000064
          Possible Settings increment: 0x00000001
          Possible Settings units: %
        Current AC Power Setting Index: 0x00000032
        Current DC Power Setting Index: 0x00000032

        Power Setting GUID: fbd9aa66-9553-4097-ba44-ed6e9d65eab8  (Enable adaptive brightness)
          GUID Alias: ADAPTBRIGHT
          Possible Setting Index: 000
          Possible Setting Friendly Name: Off
          Possible Setting Index: 001
          Possible Setting Friendly Name: On
        Current AC Power Setting Index: 0x00000000
        Current DC Power Setting Index: 0x00000000

      Subgroup GUID: 8619b916-e004-4dd8-9b66-dae86f806698  (Presence Aware Power Behavior)
        GUID Alias: SUB_PRESENCE
      Subgroup GUID: e73a048d-bf27-4f12-9731-8b2076e8891f  (Battery)
        GUID Alias: SUB_BATTERY
        Power Setting GUID: 637ea02f-bbcb-4015-8e2c-a1c7b9c0b546  (Critical battery action)
          GUID Alias: BATACTIONCRIT
          Possible Setting Index: 000
          Possible Setting Friendly Name: Do nothing
          Possible Setting Index: 001
          Possible Setting Friendly Name: Sleep
          Possible Setting Index: 002
          Possible Setting Friendly Name: Hibernate
          Possible Setting Index: 003
          Possible Setting Friendly Name: Shut down
        Current AC Power Setting Index: 0x00000000
        Current DC Power Setting Index: 0x00000003

        Power Setting GUID: 8183ba9a-e910-48da-8769-14ae6dc1170a  (Low battery level)
          GUID Alias: BATLEVELLOW
          Minimum Possible Setting: 0x00000000
          Maximum Possible Setting: 0x00000064
          Possible Settings increment: 0x00000001
          Possible Settings units: %
        Current AC Power Setting Index: 0x0000000a
        Current DC Power Setting Index: 0x0000001e

        Power Setting GUID: 9a66d8d7-4ff7-4ef9-b5a2-5a326ca2a469  (Critical battery level)
          GUID Alias: BATLEVELCRIT
          Minimum Possible Setting: 0x00000000
          Maximum Possible Setting: 0x00000064
          Possible Settings increment: 0x00000001
          Possible Settings units: %
        Current AC Power Setting Index: 0x00000005
        Current DC Power Setting Index: 0x00000014

        Power Setting GUID: bcded951-187b-4d05-bccc-f7e51960c258  (Low battery notification)
          GUID Alias: BATFLAGSLOW
          Possible Setting Index: 000
          Possible Setting Friendly Name: Off
          Possible Setting Index: 001
          Possible Setting Friendly Name: On
        Current AC Power Setting Index: 0x00000001
        Current DC Power Setting Index: 0x00000001

        Power Setting GUID: d8742dcb-3e6a-4b3c-b3fe-374623cdcf06  (Low battery action)
          GUID Alias: BATACTIONLOW
          Possible Setting Index: 000
          Possible Setting Friendly Name: Do nothing
          Possible Setting Index: 001
          Possible Setting Friendly Name: Sleep
          Possible Setting Index: 002
          Possible Setting Friendly Name: Hibernate
          Possible Setting Index: 003
          Possible Setting Friendly Name: Shut down
        Current AC Power Setting Index: 0x00000003
        Current DC Power Setting Index: 0x00000003

    Regardless my attempts, the Hyper-V host will shutdown at 10% battery level.

    What am I missing?

    • Edited by IdolR Monday, June 10, 2019 9:50 AM
    Monday, June 10, 2019 9:46 AM

All replies

  • Hi ,

    This is a quick note to let you know that I am currently performing research on this issue and will get back to you as soon as possible. I appreciate your patience.

    If you have any updates during this process, please feel free to let me know.

    Best Regards,

    Candy


    Please remember to mark the replies as an answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com   


    Tuesday, June 11, 2019 8:46 AM
    Moderator