title: Enabling disk encryption fails for Azure Ubuntu 16.04-LTS saying "'VolumeType' is not supported"
body: <p><a href="https://docs.microsoft.com/en-us/azure/security/azure-security-disk-encryption" rel="nofollow noreferrer">Azure Disk Encryption for Windows and Linux IaaS VMs</a> says that "Linux OS disk encryption is currently supported on ... Ubuntu 16.04" however when I create a new VM</p>
  
  <pre><code>$vm = New-AzureRmVMConfig -VMName "vmname" -VMSize "Standard_D2_v2"
  $vm = Set-AzureRmVMOperatingSystem -VM $vm -Linux -ComputerName "vmname" -Credential $cred
  $vm = Set-AzureRmVMSourceImage -VM $vm -PublisherName "Canonical" -Offer "UbuntuServer" -Skus "16.04-LTS" -Version "latest"
  $vm = Add-AzureRmVMNetworkInterface -VM $vm -Id $nic.Id
  $osDiskUri = $storage_account.PrimaryEndpoints.Blob.ToString() + "vhds/vmname.vhd"
  $vm = Set-AzureRmVMOSDisk -VM $vm -Name "myOsDisk1" -VhdUri $osDiskUri -CreateOption fromImage
  New-AzureRmVM -ResourceGroupName "rgname" -Location "East US" -VM $vm
  </code></pre>
  
  <p>and then run</p>
  
  <pre><code>Set-AzureRmVMDiskEncryptionExtension -ResourceGroupName "rgname" -VMName "vmname" -AadClientID "appname" -AadClientSecret "xxx=" -DiskEncryptionKeyVaultUrl $KeyVault.VaultUri -DiskEncryptionKeyVaultId $KeyVault.ResourceId;
  </code></pre>
  
  <p>then I get this error:</p>
  
  <pre><code>Set-AzureRmVMDiskEncryptionExtension : Long running operation failed with status 'Failed'.
  ErrorCode: VMExtensionProvisioningError
  ErrorMessage: VM has reported a failure when processing extension 'AzureDiskEncryptionForLinux'. Error message: "VolumeType "" is not supported".
  StartTime: 6/01/2017 3:12:44 PM
  EndTime: 6/01/2017 3:14:49 PM
  OperationID: b976c3ab-fe5b-4356-b62f-96f3b80aeba1
  </code></pre>
  
  <p><a href="https://social.msdn.microsoft.com/Forums/en-US/fdaded92-b8ef-4c84-8060-675071a11262/volumetype-is-not-supported?forum=AzureDiskEncryption" rel="nofollow noreferrer">This post</a> suggests there may be some way to apply encryption earlier than this, but actually I think it relates to people with already-encrypted drives they are trying to move into Azure.</p>
  
  <p>What am I doing wrong?  How can I use PowerShell to enable disk encryption on Ubuntu?</p>