mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2025-12-20 06:29:50 +00:00
resize disk using powershell
This commit is contained in:
@@ -128,11 +128,7 @@ if (Test-IsWin19) {
|
||||
}
|
||||
|
||||
# Expand disk size of OS drive
|
||||
New-Item -Path d:\ -Name cmds.txt -ItemType File -Force
|
||||
Add-Content -Path d:\cmds.txt "SELECT VOLUME=C`r`nEXTEND"
|
||||
|
||||
$expandResult = (diskpart /s 'd:\cmds.txt')
|
||||
Write-Host $expandResult
|
||||
|
||||
Write-Host "Disk sizes after expansion"
|
||||
wmic logicaldisk get size,freespace,caption
|
||||
$driveLetter = "C"
|
||||
$size = Get-PartitionSupportedSize -DriveLetter $driveLetter
|
||||
Resize-Partition -DriveLetter $driveLetter -Size $size.SizeMax
|
||||
Get-Partition | Select-Object DriveLetter, PartitionNumber, Size
|
||||
@@ -13,7 +13,7 @@
|
||||
"virtual_network_resource_group_name": "{{env `VNET_RESOURCE_GROUP`}}",
|
||||
"virtual_network_subnet_name": "{{env `VNET_SUBNET`}}",
|
||||
"private_virtual_network_with_public_ip": "{{env `PRIVATE_VIRTUAL_NETWORK_WITH_PUBLIC_IP`}}",
|
||||
"vm_size": "Standard_D4_v2",
|
||||
"vm_size": "Standard_DS4_v2",
|
||||
"run_scan_antivirus": "false",
|
||||
"root_folder": "C:",
|
||||
"toolset_json_path": "{{env `TEMP`}}\\toolset.json",
|
||||
|
||||
Reference in New Issue
Block a user