Skip to content

Disk encryption feature #1243

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 111 commits into from
Nov 7, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
111 commits
Select commit Hold shift + click to select a range
aa35f44
Merge pull request #88 from Azure/dev
huangpf Sep 15, 2015
ad974b7
Merge pull request #89 from Azure/dev
huangpf Sep 16, 2015
a38fa2d
Merge pull request #90 from Azure/dev
huangpf Sep 17, 2015
7a97e3a
Merge pull request #91 from Azure/dev
huangpf Sep 17, 2015
5682401
Merge pull request #92 from Azure/dev
huangpf Sep 19, 2015
2c2f082
Merge pull request #93 from Azure/dev
huangpf Sep 20, 2015
a688180
Merge pull request #94 from Azure/dev
huangpf Sep 21, 2015
390ffbe
Merge pull request #95 from Azure/dev
huangpf Sep 21, 2015
39cd7bf
Merge pull request #96 from Azure/dev
huangpf Sep 21, 2015
2d643e9
Fix AzureRT test settings
hyonholee Sep 22, 2015
7e087c9
Merge pull request #99 from Azure/dev
huangpf Sep 22, 2015
84062e0
Merge pull request #100 from AzureRT/dev
huangpf Sep 22, 2015
0e64614
Merge pull request #37 from hyonholee/dev
AzureRT Sep 22, 2015
b9ad912
Merge pull request #110 from Azure/dev
huangpf Sep 25, 2015
0d1d883
Merge pull request #112 from Azure/dev
huangpf Sep 25, 2015
6b38643
Merge pull request #113 from Azure/dev
huangpf Sep 25, 2015
64c136c
Merge branch 'dev' of https://github.com/Azure/azure-powershell into dev
hyonholee Sep 26, 2015
28289db
fix AzureRT test issue
hyonholee Sep 26, 2015
70b9a28
Merge pull request #116 from Azure/dev
huangpf Sep 26, 2015
996ffe3
Merge pull request #118 from Azure/dev
huangpf Sep 28, 2015
95d23d2
Merge pull request #120 from Azure/dev
huangpf Sep 29, 2015
67d29f1
Merge pull request #123 from Azure/dev
huangpf Sep 29, 2015
e515ea9
Merge branch 'dev' of https://github.com/Azure/azure-powershell into dev
hyonholee Sep 29, 2015
c2cf2c1
Merge pull request #127 from Azure/dev
huangpf Sep 30, 2015
772da26
Merge pull request #128 from Azure/dev
huangpf Sep 30, 2015
e6246b7
Merge pull request #129 from Azure/dev
huangpf Oct 1, 2015
3305508
Merge pull request #131 from Azure/dev
huangpf Oct 2, 2015
b074625
Merge pull request #132 from Azure/dev
huangpf Oct 2, 2015
cfe09a1
Merge pull request #133 from AzureRT/dev
huangpf Oct 2, 2015
92eac87
Merge pull request #135 from Azure/dev
huangpf Oct 2, 2015
bf104f6
Merge pull request #137 from Azure/dev
huangpf Oct 2, 2015
94641e1
Merge pull request #138 from Azure/dev
huangpf Oct 3, 2015
bfb5796
Merge pull request #139 from Azure/dev
huangpf Oct 5, 2015
02ab411
Merge branch 'dev' of https://github.com/Azure/azure-powershell into dev
huangpf Oct 5, 2015
ad1aa1c
Merge pull request #140 from Azure/dev
huangpf Oct 6, 2015
a6ca3e7
Merge pull request #141 from Azure/dev
huangpf Oct 6, 2015
9ecd0db
Merge pull request #142 from Azure/dev
huangpf Oct 7, 2015
f2f9f61
Merge pull request #143 from Azure/dev
huangpf Oct 7, 2015
3b08900
Merge pull request #144 from Azure/dev
huangpf Oct 7, 2015
26f1713
Merge branch 'release-1.0.0-preview' of https://github.com/Azure/azur…
hyonholee Oct 8, 2015
158dfdb
Merge branch 'dev' of https://github.com/Azure/azure-powershell into dev
hyonholee Oct 8, 2015
19cba6e
Merge pull request #146 from AzureRT/dev
huangpf Oct 8, 2015
fd794b5
Merge branch 'dev' of https://github.com/Azure/azure-powershell into dev
hyonholee Oct 9, 2015
527fb0d
Fix ASM Compute test setup.
hyonholee Oct 9, 2015
75ae80d
Add location parameter to virtual machine test
hyonholee Oct 9, 2015
e95f664
Merge pull request #149 from Azure/dev
huangpf Oct 9, 2015
ab4d18a
Merge branch 'release-1.0.0-preview' of https://github.com/Azure/azur…
hyonholee Oct 9, 2015
52b3191
Fix ASM AzureRT test setup
hyonholee Oct 9, 2015
446e832
Fix ASM AzureRT test setup
hyonholee Oct 9, 2015
35c4469
Merge branch 'release-1.0.0-preview' of https://github.com/AzureRT/az…
hyonholee Oct 9, 2015
66734fc
Merge pull request #151 from AzureRT/dev
huangpf Oct 9, 2015
b73feb8
Merge pull request #153 from Azure/dev
huangpf Oct 10, 2015
6f2d28f
Merge pull request #154 from Azure/dev
huangpf Oct 13, 2015
a1611e1
Merge pull request #156 from Azure/dev
huangpf Oct 14, 2015
d6c7c2c
Remove Spaces in Extension IDs
huangpf Oct 14, 2015
b2a710b
Merge branch 'dev' of https://github.com/huangpf/azure-powershell int…
huangpf Oct 14, 2015
afb2e62
Merge branch 'dev' of https://github.com/Azure/azure-powershell into dev
hyonholee Oct 16, 2015
594101b
Merge pull request #45 from AzureRT/release-1.0.0-preview
AzureRT Oct 16, 2015
9b51c08
Merge pull request #160 from AzureRT/dev
huangpf Oct 16, 2015
4ed2091
Merge pull request #46 from huangpf/dev
AzureRT Oct 16, 2015
2b581cf
Update Set-AzureRmOsDisk cmdlet for disk encryption
hyonholee Oct 19, 2015
c49c1d8
Fix Get-ResourceProviderLocation
hyonholee Oct 19, 2015
73ebe3a
Merge pull request #48 from Azure/dev
AzureRT Oct 20, 2015
4279fe1
Merge branch 'dev' of https://github.com/Azure/azure-powershell into dev
hyonholee Oct 21, 2015
063c906
Merge branch 'dev' of https://github.com/Azure/azure-powershell into dev
hyonholee Oct 21, 2015
ab23f61
Update Management.Compute nuget pacakge
hyonholee Oct 22, 2015
bc093a1
Merge branch 'dev' of https://github.com/Azure/azure-powershell into de
hyonholee Oct 22, 2015
aa314db
Update Set-AzureRmOSDisk cmdlet
hyonholee Oct 22, 2015
8217d32
Merge branch 'dev' of https://github.com/Azure/azure-powershell into dev
hyonholee Oct 22, 2015
04a7174
Set-AzureRmVmDiskEncryption along with encryptionSettings in UpdateVM
Oct 22, 2015
47885d0
Updated with Get-AzureDiskEncryptionStatus cmdlet
Oct 23, 2015
decf009
Merge branch 'dev' of https://github.com/AzureRT/azure-powershell int…
Oct 23, 2015
3ccbce6
Merge branch 'dev' of https://github.com/Azure/azure-powershell into …
Oct 23, 2015
93acb9c
Merge branch 'dev' of https://github.com/Azure/azure-powershell into dev
hyonholee Oct 23, 2015
e503572
Update Set-AzureRMVMOsDisk cmdlet
hyonholee Oct 24, 2015
04d9c7b
Merge branch 'dev' of https://github.com/Azure/azure-powershell into de
hyonholee Oct 24, 2015
e47f120
Merge pull request #50 from hyonholee/de
AzureRT Oct 24, 2015
589d5db
Merge Set-AzureVMOSDisk changes
Oct 24, 2015
c7cf3b3
Update extension default version to 1.3
Oct 24, 2015
508b217
Handled no extensions case for GetAzureDiskEncryptionStatus
Oct 24, 2015
6630f4a
Handle empty volumeType in extension config
Oct 24, 2015
3a31a05
Changed default parameters to AAD Client Secret and updated confirmat…
Oct 26, 2015
4ea96ac
Added AadCertThumbprint support
Oct 27, 2015
8168544
Updated extension name to AzureDiskEncryption and changed cmdlet name…
Oct 29, 2015
0bf565c
linux support for AzureDiskEncryption.
andyliuliming Oct 30, 2015
7ac47dc
Merge pull request #2 from andyliuliming/AzureDiskEncryption
Oct 30, 2015
7d02de6
Remove GetAzureDiskEncryptionExtension cmdlet
Oct 30, 2015
03099e3
Merging Linux extension changes
Oct 30, 2015
49d5f1c
Refactoring Linux changes to separate function and fixinf indentation
Oct 30, 2015
3eebd4f
Added copy right headers
Oct 30, 2015
e6e4a93
Merge pull request #1 from SudhakaraReddyEvuri/AzureDiskEncryption
andyliuliming Oct 31, 2015
8451665
remove the extra parameters.
andyliuliming Oct 31, 2015
3c43e22
Merge pull request #3 from andyliuliming/AzureDiskEncryption
Oct 31, 2015
8f90648
passphrase support in Powershell
andyliuliming Nov 1, 2015
a4c06f9
Set the extension default Name, add tests
Nov 2, 2015
bf7a4e0
Updating help files for AzureDiskEncryption cmdlets, updating test to…
Nov 3, 2015
d492438
merge Sudhakar's change
andyliuliming Nov 3, 2015
04326fc
help document for the Linux part.
andyliuliming Nov 3, 2015
a6484ed
Merge branch 'dev' of https://github.com/Azure/azure-powershell into dev
hyonholee Nov 4, 2015
7d3efd0
Merge AzureRT\Dev
Nov 4, 2015
acfa917
Merge branch 'AzureDiskEncryption' of https://github.com/andyliulimin…
Nov 4, 2015
bf7640c
Merge branch 'andyliuliming-AzureDiskEncryption' into dev
Nov 4, 2015
a56a469
Merge pull request #51 from SudhakaraReddyEvuri/AzureDiskEncryption
AzureRT Nov 4, 2015
9ab0b57
Remove unnecessary references.
hyonholee Nov 4, 2015
6a59b6a
Remove unnecessary references
hyonholee Nov 4, 2015
f3f6be7
Update
hyonholee Nov 4, 2015
d0cd566
Merge branch 'release-1.0.0' of https://github.com/Azure/azure-powers…
hyonholee Nov 5, 2015
32a66e1
Merge branch 'DiskEncryption' of https://github.com/Azure/azure-power…
hyonholee Nov 6, 2015
1ba3d48
Upgrade the version of AzureRM.Compute module from 1.0.0 to 1.1.0
hyonholee Nov 6, 2015
1e5d7f1
Merge branch 'DiskEncryption' of https://github.com/Azure/azure-power…
hyonholee Nov 6, 2015
6c204ed
Update Assembly version to 1.1.0
hyonholee Nov 6, 2015
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/ResourceManager/Compute/AzureRM.Compute.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
@{

# Version number of this module.
ModuleVersion = '1.0.1'
ModuleVersion = '1.1.0'

# ID used to uniquely identify this module
GUID = '0a83c907-1ffb-4d87-a492-c65ac7d7ed37'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Authorization.1.0.0\lib\net40\Microsoft.Azure.Management.Authorization.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Azure.Management.Compute, Version=9.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Compute.9.0.0\lib\net40\Microsoft.Azure.Management.Compute.dll</HintPath>
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Compute.9.1.0\lib\net40\Microsoft.Azure.Management.Compute.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Azure.Management.Network, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,13 @@ public void TestVirtualMachineAccessExtension()
{
ComputeTestController.NewInstance.RunPsTest("Test-VirtualMachineAccessExtension");
}

[Fact(Skip = "TODO: only works for live mode")]
[Trait(Category.RunType, Category.LiveOnly)]
public void TestAzureDiskEncryptionExtension()
{
ComputeTestController.NewInstance.RunPsTest("Test-AzureDiskEncryptionExtension");
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -790,3 +790,138 @@ function Test-VirtualMachineAccessExtension
Clean-ResourceGroup $rgname
}
}

<#
.SYNOPSIS
Test AzureDiskEncryption extension
#>
function Test-AzureDiskEncryptionExtension
{
# This test should be run in Live mode only not in Playback mode
#Pre-requisites to be filled in before running this test. The AAD app should belong to the directory as the user running the test.
$aadClientID = "";
$aadClientSecret = "";
#Fill in VM admin user and password
$adminUser = "";
$adminPassword = "";

#Resource group variables
$rgName = "detestrg";
$loc = "South Central US";

#KeyVault config variables
$vaultName = "detestvault";
$kekName = "dstestkek";

#VM config variables
$vmName = "detestvm";
$vmsize = 'Standard_D2';
$imagePublisher = "MicrosoftWindowsServer";
$imageOffer = "WindowsServer";
$imageSku ="2012-R2-Datacenter";

#Storage config variables
$storageAccountName = "deteststore";
$stotype = 'Standard_LRS';
$vhdContainerName = "vhds";
$osDiskName = 'osdisk' + $vmName;
$dataDiskName = 'datadisk' + $vmName;
$osDiskCaching = 'ReadWrite';

#Network config variables
$vnetName = "detestvnet";
$subnetName = "detestsubnet";
$publicIpName = 'pubip' + $vmName;
$nicName = 'nic' + $vmName;


#Disk encryption variables
$keyEncryptionAlgorithm = "RSA-OAEP";
$volumeType = "All";

try
{
Login-AzureRmAccount;
# Create new resource group
New-AzureRmResourceGroup -Name $rgname -Location $loc -Force;

# Create new KeyVault
$keyVault = New-AzureRmKeyVault -VaultName $vaultName -ResourceGroupName $rgname -Location $loc -Sku standard;
$keyVault = Get-AzureRmKeyVault -VaultName $vaultName -ResourceGroupName $rgname
#set enabledForDiskEncryption
Write-Host 'Press go to https://resources.azure.com and set enabledForDiskEncryption flag on KeyVault. [ENTER] to continue or [CTRL-C] to abort...'
Read-Host
#set permissions to AAD app to write secrets and keys
Set-AzureRmKeyVaultAccessPolicy -VaultName $vaultName -ServicePrincipalName $aadClientID -PermissionsToKeys all -PermissionsToSecrets all
#create a key in KeyVault to use as Kek
$kek = Add-AzureKeyVaultKey -VaultName $vaultName -Name $kekName -Destination "Software"

$diskEncryptionKeyVaultUrl = $keyVault.VaultUri;
$keyVaultResourceId = $keyVault.ResourceId;
$keyEncryptionKeyUrl = $kek.Key.kid;

# VM Profile & Hardware
$p = New-AzureRmVMConfig -VMName $vmname -VMSize $vmsize;

# NRP
$subnet = New-AzureRmVirtualNetworkSubnetConfig -Name ($subnetName) -AddressPrefix "10.0.0.0/24";
$vnet = New-AzureRmVirtualNetwork -Force -Name ($vnetName) -ResourceGroupName $rgname -Location $loc -AddressPrefix "10.0.0.0/16" -Subnet $subnet;
$vnet = Get-AzureRmVirtualNetwork -Name ($vnetName) -ResourceGroupName $rgname;
$subnetId = $vnet.Subnets[0].Id;
$pubip = New-AzureRmPublicIpAddress -Force -Name ($publicIpName) -ResourceGroupName $rgname -Location $loc -AllocationMethod Dynamic -DomainNameLabel ($publicIpName);
$pubip = Get-AzureRmPublicIpAddress -Name ($publicIpName) -ResourceGroupName $rgname;
$pubipId = $pubip.Id;
$nic = New-AzureRmNetworkInterface -Force -Name ($nicName) -ResourceGroupName $rgname -Location $loc -SubnetId $subnetId -PublicIpAddressId $pubip.Id;
$nic = Get-AzureRmNetworkInterface -Name ($nicName) -ResourceGroupName $rgname;
$nicId = $nic.Id;

$p = Add-AzureRmVMNetworkInterface -VM $p -Id $nicId;

# Storage Account (SA)
New-AzureRmStorageAccount -ResourceGroupName $rgname -Name $storageAccountName -Location $loc -Type $stotype;
$stokey = (Get-AzureRmStorageAccountKey -ResourceGroupName $rgname -Name $storageAccountName).Key1;

$osDiskVhdUri = "https://$storageAccountName.blob.core.windows.net/$vhdContainerName/$osDiskName.vhd";
$dataDiskVhdUri = "https://$storageAccountName.blob.core.windows.net/$vhdContainerName/$dataDiskName.vhd";

$p = Set-AzureRmVMOSDisk -VM $p -Name $osDiskName -VhdUri $osDiskVhdUri -Caching $osDiskCaching -CreateOption FromImage;
$p = Add-AzureRmVMDataDisk -VM $p -Name $dataDiskName -Caching 'ReadOnly' -DiskSizeInGB 2 -Lun 1 -VhdUri $dataDiskVhdUri -CreateOption Empty;

# OS & Image
$securePassword = ConvertTo-SecureString $adminPassword -AsPlainText -Force;
$cred = New-Object System.Management.Automation.PSCredential ($adminUser, $securePassword);
$computerName = $vmName;
$vhdContainer = "https://$storageAccountName.blob.core.windows.net/$vhdContainerName";

$p = Set-AzureRmVMOperatingSystem -VM $p -Windows -ComputerName $computerName -Credential $cred -ProvisionVMAgent;
$p = Set-AzureRmVMSourceImage -VM $p -PublisherName $imagePublisher -Offer $imageOffer -Skus $imageSku -Version "latest";


# Virtual Machine
New-AzureRmVM -ResourceGroupName $rgname -Location $loc -VM $p;

#Enable encryption on the VM
Set-AzureRmVMDiskEncryptionExtension -ResourceGroupName $rgname -VMName $vmName -AadClientID $aadClientID -AadClientSecret $aadClientSecret -DiskEncryptionKeyVaultUrl $diskEncryptionKeyVaultUrl -DiskEncryptionKeyVaultId $keyVaultResourceId -KeyEncryptionKeyUrl $keyEncryptionKeyUrl -KeyEncryptionKeyVaultId $keyVaultResourceId -Force;
#Get encryption status
$encryptionStatus = Get-AzureRmVmDiskEncryptionStatus -ResourceGroupName $rgname -VMName $vmName;
#Remove AzureDiskEncryption extension
Remove-AzureRmVMDiskEncryptionExtension -ResourceGroupName $rgname -VMName $vmName;

#Remove the VM
Remove-AzureRmVm -ResourceGroupName $rgname -Name $vmName -Force;

#Create a brand new VM using the same OS vhd encrypted above
$p.StorageProfile.ImageReference = $null;
$p.OSProfile = $null;
$p.StorageProfile.DataDisks = $null;
$p = Set-AzureRmVMOSDisk -VM $p -Name $p.StorageProfile.OSDisk.Name -VhdUri $p.StorageProfile.OSDisk.VirtualHardDisk.Uri -Caching ReadWrite -CreateOption attach -DiskEncryptionKeyUrl $encryptionStatus.OsVolumeEncryptionSettings.DiskEncryptionKey.SecretUrl -DiskEncryptionKeyVaultId $encryptionStatus.OsVolumeEncryptionSettings.DiskEncryptionKey.SourceVault.ReferenceUri -Windows;

New-AzureRmVM -ResourceGroupName $rgname -Location $loc -VM $p;

}
finally
{
# Cleanup
Remove-AzureRmResourceGroup -Name $rgname -Force;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -244,13 +244,22 @@ function Test-VirtualMachineProfileWithoutAUC
$dataDiskVhdUri2 = "https://$stoname.blob.core.windows.net/test/data2.vhd";
$dataDiskVhdUri3 = "https://$stoname.blob.core.windows.net/test/data3.vhd";

$p = Set-AzureRmVMOSDisk -VM $p -Name $osDiskName -VhdUri $osDiskVhdUri -Caching $osDiskCaching -CreateOption Empty;
$dekUri = "https://testvault123.vault.azure.net/secrets/Test1/514ceb769c984379a7e0230bddaaaaaa";
$dekId = "/subscriptions/" + $subid + "/resourceGroups/RgTest1/providers/Microsoft.KeyVault/vaults/TestVault123";
$kekUri = "http://keyVaultName.vault.azure.net/secrets/secretName/secretVersion";
$kekId = "/subscriptions/" + $subid + "/resourceGroups/RgTest1/providers/Microsoft.KeyVault/vaults/TestVault123";

$p = Set-AzureRmVMOSDisk -VM $p -Windows -Name $osDiskName -VhdUri $osDiskVhdUri -Caching $osDiskCaching -CreateOption Empty -DiskEncryptionKeyUrl $dekUri -DiskEncryptionKeyVaultId $dekId -KeyEncryptionKeyUrl $kekUri -KeyEncryptionKeyVaultId $kekId;

$p = Add-AzureRmVMDataDisk -VM $p -Name 'testDataDisk1' -Caching 'ReadOnly' -DiskSizeInGB 10 -Lun 0 -VhdUri $dataDiskVhdUri1 -CreateOption Empty;
$p = Add-AzureRmVMDataDisk -VM $p -Name 'testDataDisk2' -Caching 'ReadOnly' -DiskSizeInGB 11 -Lun 1 -VhdUri $dataDiskVhdUri2 -CreateOption Empty;
$p = Add-AzureRmVMDataDisk -VM $p -Name 'testDataDisk3' -Caching 'ReadOnly' -DiskSizeInGB 12 -Lun 2 -VhdUri $dataDiskVhdUri3 -CreateOption Empty;
$p = Remove-AzureRmVMDataDisk -VM $p -Name 'testDataDisk3';

Assert-AreEqual $p.StorageProfile.OSDisk.EncryptionSettings.DiskEncryptionKey.SourceVault.ReferenceUri $dekId
Assert-AreEqual $p.StorageProfile.OSDisk.EncryptionSettings.DiskEncryptionKey.SecretUrl $dekUri
Assert-AreEqual $p.StorageProfile.OSDisk.EncryptionSettings.KeyEncryptionKey.SourceVault.ReferenceUri $kekId
Assert-AreEqual $p.StorageProfile.OSDisk.EncryptionSettings.KeyEncryptionKey.KeyUrl $kekUri
Assert-AreEqual $p.StorageProfile.OSDisk.Caching $osDiskCaching;
Assert-AreEqual $p.StorageProfile.OSDisk.Name $osDiskName;
Assert-AreEqual $p.StorageProfile.OSDisk.VirtualHardDisk.Uri $osDiskVhdUri;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public partial class VirtualMachineTests
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestVirtualMachine()
{
ComputeTestController.NewInstance.RunPsTest("Test-VirtualMachine");
ComputeTestController.NewInstance.RunPsTest(@"Test-VirtualMachine $null");
}

[Fact]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,17 @@ Test Virtual Machines
#>
function Test-VirtualMachine
{
param ($loc)
# Setup
$rgname = Get-ComputeTestResourceName

try
{
# Common
$loc = Get-ComputeVMLocation;
if ($loc -eq $null)
{
$loc = Get-ComputeVMLocation;
}
New-AzureRmResourceGroup -Name $rgname -Location $loc -Force;

# VM Profile & Hardware
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<package id="Microsoft.Azure.Gallery" version="2.6.2-preview" targetFramework="net45" />
<package id="Microsoft.Azure.Graph.RBAC" version="1.7.0-preview" targetFramework="net45" />
<package id="Microsoft.Azure.Management.Authorization" version="1.0.0" targetFramework="net45" />
<package id="Microsoft.Azure.Management.Compute" version="9.0.0" targetFramework="net45" />
<package id="Microsoft.Azure.Management.Compute" version="9.1.0" targetFramework="net45" />
<package id="Microsoft.Azure.Management.Network" version="2.0.13-preview" targetFramework="net45" />
<package id="Microsoft.Azure.Management.Resources" version="2.18.7-preview" targetFramework="net45" />
<package id="Microsoft.Azure.Management.Storage" version="3.0.0" targetFramework="net45" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Azure.Management.Compute, Version=9.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Compute.9.0.0\lib\net40\Microsoft.Azure.Management.Compute.dll</HintPath>
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Compute.9.1.0\lib\net40\Microsoft.Azure.Management.Compute.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Azure.Management.Network, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
Expand Down Expand Up @@ -206,6 +207,19 @@
<Compile Include="ExtensionImages\GetAzureVMExtensionImageTypeCommand.cs" />
<Compile Include="ExtensionImages\GetAzureVMExtensionImageCommand.cs" />
<Compile Include="ExtensionImages\VirtualMachineExtensionImageBaseCmdlet.cs" />
<Compile Include="Extension\AzureDiskEncryption\AzureDiskEncryptionExtensionContext.cs" />
<Compile Include="Extension\AzureDiskEncryption\AzureDiskEncryptionExtensionProtectedSettings.cs" />
<Compile Include="Extension\AzureDiskEncryption\AzureDiskEncryptionExtensionPublicSettings.cs" />
<Compile Include="Extension\AzureDiskEncryption\GetAzureDiskEncryptionStatus.cs" />
<Compile Include="Extension\AzureDiskEncryption\RemoveAzureDiskEncryptionExtension.cs" />
<Compile Include="Extension\AzureDiskEncryption\SetAzureDiskEncryptionExtension.cs" />
<Compile Include="Extension\AzureVMBackup\AzureVMBackupExtensionUtil.cs" />
<Compile Include="Extension\AzureVMBackup\AzureVMBackupException.cs" />
<Compile Include="Extension\AzureVMBackup\AzureVMBackupExtensionProtectedSettings.cs" />
<Compile Include="Extension\AzureVMBackup\AzureVMBackupExtensionPublicSettings.cs" />
<Compile Include="Extension\AzureVMBackup\AzureVMBackupConfig.cs" />
<Compile Include="Extension\AzureVMBackup\RemoveAzureVMBackup.cs" />
<Compile Include="Extension\AzureVMBackup\SetAzureVMBackupExtension.cs" />
<Compile Include="Extension\CustomScript\GetAzureVMCustomScriptExtensionCommand.cs" />
<Compile Include="Extension\CustomScript\CustomScriptExtensionPrivateSettings.cs" />
<Compile Include="Extension\CustomScript\CustomScriptExtensionPublicSettings.cs" />
Expand Down Expand Up @@ -241,6 +255,7 @@
<Compile Include="Extension\SqlServer\VirtualMachineSqlServerExtensionContext.cs" />
<Compile Include="Images\GetAzureVMImageCommand.cs" />
<Compile Include="Common\HashTableExtensions.cs" />
<Compile Include="Models\AzureDiskEncryptionStatusContext.cs" />
<Compile Include="Models\PSComputeLongRunningOperation.cs" />
<Compile Include="Models\PSOperation.cs" />
<Compile Include="Extension\VMAccess\GetAzureVMAccessExtension.cs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ public static class HelpMessages
public const string VMOSDiskCaching = "The virtual machine OS disk's caching.";
public const string VMOSDiskWindowsOSType = "The virtual machine disk's OS is Windows.";
public const string VMOSDiskLinuxOSType = "The virtual machine disk's OS is Linux.";
public const string VMOSDiskDiskEncryptionKeyUrl = "the URL referencing a secret in a disk encryption key vault";
public const string VMOSDiskDiskEncryptionKeyVaultId = "the Id of a disk encryption key vault";
public const string VMOSDiskKeyEncryptionKeyUrl = "the URL referencing a key in a key encryption key vault";
public const string VMOSDiskKeyEncryptionKeyVaultId = "the Id of a key encryption key Vault";
public const string VMSourceImageUri = "The virtual machine OS disk's source image Uri.";

public const string VMDataDiskName = "The virtual machine data disk's name.";
Expand Down Expand Up @@ -110,5 +114,14 @@ public static class ProfileNouns

// Sql Server
public const string VirtualMachineSqlServerExtension = "AzureRmVMSqlServerExtension";

//AzureDiskEncryption
public const string AzureDiskEncryptionExtension = "AzureRmVMDiskEncryptionExtension";
public const string AzureDiskEncryptionStatus = "AzureRmVMDiskEncryptionStatus";

//AzureVMBackup
public const string AzureVMBackup = "AzureRmVMBackup";
public const string AzureVMBackupExtension = "AzureRmVMBackupExtension";

}
}
Loading