abhijitm00
asked on
Reducing size of page file on Hyper-V 2012 core
Hi Experts, need to reduce page file size on Hyper-V hosts in a cluster. Have moved all VMs to one host and trying to run the following which completes successfully:
PS C:\> wmic computersystem set AutomaticManagedPagefile=f alse
Updating property(s) of '\\VMHOST\ROOT\CIMV2:Win32 _ComputerS ystem.Name ="VMHOST"'
Property(s) update successful.
But when I try to run the following I get the error message below:
PS C:\> wmic pagefileset where name=”C:\\pagefile.sys” set InitialSize=1024,MaximumSi ze=3096
Invalid format.
Hint: <assignlist> = <propertyname>=<propertyva lue> [, <assignlist>].
Am running in powershell from console as Administrator. Thanks
PS C:\> wmic computersystem set AutomaticManagedPagefile=f
Updating property(s) of '\\VMHOST\ROOT\CIMV2:Win32
Property(s) update successful.
But when I try to run the following I get the error message below:
PS C:\> wmic pagefileset where name=”C:\\pagefile.sys” set InitialSize=1024,MaximumSi
Invalid format.
Hint: <assignlist> = <propertyname>=<propertyva
Am running in powershell from console as Administrator. Thanks
On Hyper-V Server, you should leave the pagefile set to system managed.
Reference: http://www.aidanfinn.com/?p=15659
That said, you should also review the Technet blog on the subject of Pagefile size for Hyper-V guests and hosts:
http://blogs.technet.com/b/mghazai/archive/2011/05/26/what-s-the-story-of-pagefile-size-on-hyper-v-servers.aspx
Finally, if you still want to set it manually, try running the WMIC in a command prompt and NOT in a POWERSHELL prompt.
Reference: http://www.aidanfinn.com/?p=15659
That said, you should also review the Technet blog on the subject of Pagefile size for Hyper-V guests and hosts:
http://blogs.technet.com/b/mghazai/archive/2011/05/26/what-s-the-story-of-pagefile-size-on-hyper-v-servers.aspx
Finally, if you still want to set it manually, try running the WMIC in a command prompt and NOT in a POWERSHELL prompt.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks for replying.
Philip, on trying your commands the first command worked. Running the second I get:
ERROR:
Description = Value out of range
I have tried changing values for initial and maximum size but still get the same error
Philip, on trying your commands the first command worked. Running the second I get:
ERROR:
Description = Value out of range
I have tried changing values for initial and maximum size but still get the same error
Could you post a snip of the two commands being run including the error please?
ASKER
C:\Users\>wmic.exe computersystem where name="SERVERNAME" set Automat
icManagedPagefile=False
Updating property(s) of '\\VMHOST\ROOT\CIMV2:Win32 _ComputerS ystem.Name ="VMHOST"
Property(s) update successful.
C:\Users\>wmic.exe pagefileset where name="c:\\pagefile.sys" set InitialSize=4192,MaximumSi ze=8092
Updating property(s) of '\\VMHOST\ROOT\CIMV2:Win32 _PageFileS etting.Nam e="C:\\pag efile.sys" '
ERROR:
Description = Value out of range
icManagedPagefile=False
Updating property(s) of '\\VMHOST\ROOT\CIMV2:Win32
Property(s) update successful.
C:\Users\>wmic.exe pagefileset where name="c:\\pagefile.sys" set InitialSize=4192,MaximumSi
Updating property(s) of '\\VMHOST\ROOT\CIMV2:Win32
ERROR:
Description = Value out of range
Change SERVERNAME to your server's name. Sorry if that wasn't clear. :(
ASKER
Sorry you were quite clear and that command did work as below:
C:\Users\>wmic.exe computersystem where name="VMHOST" set AutomaticManagedPagefile=F alse
Updating property(s) of '\\VMHOST\ROOT\CIMV2:Win32 _ComputerS ystem.Name ="VMHOST"'
Property(s) update successful.
C:\Users\>wmic.exe computersystem where name="VMHOST" set AutomaticManagedPagefile=F
Updating property(s) of '\\VMHOST\ROOT\CIMV2:Win32
Property(s) update successful.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Something just tweaked in the grey matter. The "C:\\Pagefile.sys" may need caps as I have it here or just one or the other capitalized.
ASKER
No had it correct the first time "C:\pagefile.sys"
Open in new window