Skip to content

Instantly share code, notes, and snippets.

@Pyromaniaxxx
Created March 22, 2017 14:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Pyromaniaxxx/1ecc594abbad4805a2a98100eea04451 to your computer and use it in GitHub Desktop.
Save Pyromaniaxxx/1ecc594abbad4805a2a98100eea04451 to your computer and use it in GitHub Desktop.
Remove MASTP3 Core / RAM / Disk limitation  InstallAzureStackPOC.ps1 を実行する前に別ウインドウで実行しておくだけ。
$i = 0
do
{
$MountVHDMessage = "Mounting Nested Azure Stack HOST VHDX"
if (Test-Path "c:\CloudDeployment\Configuration\Roles\Infrastructure\BareMetal\OneNodeRole.xml")
{
Write-Progress $MountVHDMessage -Status " updating C:\CloudDeployment\Configuration\Roles\Infrastructure\BareMetal\OneNodeRole.xml" -PercentComplete 40
$BareMetalRole = Get-Content "c:\CloudDeployment\Configuration\Roles\Infrastructure\BareMetal\OneNodeRole.xml"
$BareMetalRole = $BareMetalRole.Replace("<MinimumNumberOfCoresPerMachine>12</MinimumNumberOfCoresPerMachine>","<MinimumNumberOfCoresPerMachine>0</MinimumNumberOfCoresPerMachine>")
$BareMetalRole = $BareMetalRole.Replace("<MinimumPhysicalMemoryPerMachineGB>96</MinimumPhysicalMemoryPerMachineGB>","<MinimumPhysicalMemoryPerMachineGB>32</MinimumPhysicalMemoryPerMachineGB>")
$BareMetalRole = $BareMetalRole.Replace("<MinimumSizeOfSystemDiskGB>180</MinimumSizeOfSystemDiskGB>","<MinimumSizeOfSystemDiskGB>80</MinimumSizeOfSystemDiskGB>")
([xml]$BareMetalRole).Save("c:\CloudDeployment\Configuration\Roles\Infrastructure\BareMetal\OneNodeRole.xml")
Write-Verbose -Message (" C:\CloudDeployment\Configuration\Roles\Infrastructure\BareMetal\OneNodeRole.xml updated")
$i = 1
}
if (Test-Path "c:\CloudDeployment\Roles\PhysicalMachines\Tests\BareMetal.Tests.ps1")
{
Write-Progress $MountVHDMessage -Status " updating C:\CloudDeployment\Roles\PhysicalMachines\Tests\BareMetal.Tests.ps1" -PercentComplete 60
$BareMetalTests = Get-Content "c:\CloudDeployment\Roles\PhysicalMachines\Tests\BareMetal.Tests.ps1"
$BareMetalTests = $BareMetalTests.Replace('$physicalMachine.IsVirtualMachine | Should Be $false','$false | Should Be $false')
$BareMetalTests = $BareMetalTests.Replace('($physicalMachine.Processors.NumberOfEnabledCores | Measure-Object -Sum).Sum | Should Not BeLessThan $minimumNumberOfCoresPerMachine','$minimumNumberOfCoresPerMachine | Should Not BeLessThan $minimumNumberOfCoresPerMachine')
$BareMetalTests | Out-File "c:\CloudDeployment\Roles\PhysicalMachines\Tests\BareMetal.Tests.ps1"
Write-Verbose -Message (" C:\CloudDeployment\Roles\PhysicalMachines\Tests\BareMetal.Tests.ps1 updated")
$i = 2
}
sleep -Seconds 1
"loop $i"
}
while (2 -ne $i)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment