■ 가상 머신에 디스크 추가하기

------------------------------------------------------------------------------------------------------------------------

 

$diskConfig = New-AzDiskConfig -Location EastUS -CreateOption Empty -DiskSizeGB 128

                                         ------                                 ---

                                         지역명                                 디스크 크기(단위 : GB)

 

$dataDisk = New-AzDisk -ResourceGroupName TestResourceGroup -DiskName TestDataDisk -Disk $diskConfig

                                          -----------------           ------------

                                          리소스 그룹명               디스크명

 

$vm = Get-AzVM -ResourceGroupName TestResourceGroup -Name TestVM

                                  -----------------       ------

                                  리소스 그룹명           가상 머신명

 

$vm = Add-AzVMDataDisk -VM $vm -Name TestDataDisk -CreateOption Attach -ManagedDiskId $dataDisk.Id -Lun 1

                                     ------------

                                     디스크명

 

Update-AzVM -ResourceGroupName TestResourceGroup -VM $vm

                               -----------------

                               리소스 그룹명

 

------------------------------------------------------------------------------------------------------------------------

Posted by 사용자 icodebroker

댓글을 달아 주세요