Azure / Azure/azure-linux-extensions

[Ubuntu 16.04] Unable to encrypt VM

Open
#783 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
333
Forks
278
Avg merge
2d 9h
Merged PRs (30d)
4

Description

VM Size: Standard D4s v3 (4 vcpus, 16 GB memory)
OS: Ubuntu 16.04 LTS (30gb OS Disk)
Region: West US

Error:

"statusMessage":
"{\"status\":\"Failed\",\"error\":{\"code\":\"ResourceOperationFailure\",\"message\":\"The resource operation completed with terminal provisioning state 'Failed'.\",\"details\":[{\"code\":\"VMExtensionProvisioningError\",\"message\":\"VM
has reported a failure when processing extension 'AzureDiskEncryptionForLinux'. Error message: \\\"Failed to encrypt OS volume with error: 'NoneType' object has no attribute 'getFlag', stack trace: Traceback (most recent call last):\\n File \\\"/var/lib/waagent/Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.1.0.30/main/handle.py\\\",
line 1633, in daemon_encrypt\\n os_encryption.start_encryption()\\n File \\\"/var/lib/waagent/Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.1.0.30/main/oscrypto/ubuntu_1604/Ubuntu1604EncryptionStateMachine.py\\\", line 191, in start_encryption\\n
self.enter_split_root_partition()\\n File \\\"/var/lib/waagent/Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.1.0.30/transitions/transitions/core.py\\\", line 222, in trigger\\n return self.machine.process(f)\\n File \\\"/var/lib/waagent/Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.1.0.30/transitions/transitions/core.py\\\",
line 526, in process\\n return trigger()\\n File \\\"/var/lib/waagent/Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.1.0.30/transitions/transitions/core.py\\\", line 247, in _trigger\\n if t.execute(event):\\n File \\\"/var/lib/waagent/Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.1.0.30/transitions/transitions/core.py\\\",
line 148, in execute\\n self._change_state(event_data)\\n File \\\"/var/lib/waagent/Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.1.0.30/transitions/transitions/core.py\\\", line 159, in _change_state\\n event_data.machine.get_state(self.dest).enter(event_data)\\n
File \\\"/var/lib/waagent/Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.1.0.30/transitions/transitions/core.py\\\", line 48, in enter\\n event_data.machine.callback(oe, event_data)\\n File \\\"/var/lib/waagent/Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.1.0.30/transitions/transitions/core.py\\\",
line 518, in callback\\n func(*event_data.args, **event_data.kwargs)\\n File \\\"/var/lib/waagent/Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.1.0.30/main/oscrypto/ubuntu_1604/Ubuntu1604EncryptionStateMachine.py\\\", line 114, in on_enter_state\\n
super(Ubuntu1604EncryptionStateMachine, self).on_enter_state()\\n File \\\"/var/lib/waagent/Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.1.0.30/main/oscrypto/OSEncryptionStateMachine.py\\\", line 65, in on_enter_state\\n self.state_objs[self.state].enter()\\n
File \\\"/var/lib/waagent/Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.1.0.30/main/oscrypto/ubuntu_1604/encryptstates/SplitRootPartitionState.py\\\", line 157, in enter\\n if (root_partition.getFlag(parted.PARTITION_BOOT)):\\nAttributeError:
'NoneType' object has no attribute 'getFlag'\\n, machine state: split_root_partition\\\".\"}]}}"

},

Steps to reproduce:

1. Create an Ubuntu 16 VM as usual

2. Once machine is created successfully, stop and deallocate the VM

3. Resize the OS disk from within the portal

4. Start the VM

5. Verify disk resized (Ubuntu does it automatically) by ssh in and run df -h

6. From Azure CLI: az vm encryption enable --resource-group "myResourceGroup" --name "myVmName" --disk-encryption-keyvault "myKeyVaultRG" --volume-type All

I've also tried encrypting using the old ADE method with AAD creds with no luck. Any input or help is appreciated. Thank you. Oddly enough, encryption was working fine prior to today.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.