Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.