question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

VM Encryption does not support Ubuntu 16.04.0-LTS

See original GitHub issue

I am trying to encrypt a running Machine by azure-cli. The procedure failed with error message ‘Encryption is not supported for current VM…’, but the OS image of the running machine is Ubuntu 16.04.0-LTS provided by Azure. The VM size is Standard_D2. Looks like it validates the OS image with an incorrect SKU ‘16.04’.

    supported = [
        {
            'offer': 'RHEL',
            'publisher': 'RedHat',
            'sku': '7.2'
        },
        {
            'offer': 'RHEL',
            'publisher': 'RedHat',
            'sku': '7.3'
        },
        {
            'offer': 'CentOS',
            'publisher': 'OpenLogic',
            'sku': '7.2n'
        },
        {
            'offer': 'Ubuntu',
            'publisher': 'Canonical',
            'sku': '14.04'
        },
        {
            'offer': 'Ubuntu',
            'publisher': 'Canonical',
            'sku': '16.04'
        }]

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:13 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
orezahccommented, Nov 15, 2017

I got another error while encrypting VMs. Here is the information from az vm encryption show -g group -n vm

{
  "dataDisk": "Unknown",
  "osDisk": "Unknown",
  "osDiskEncryptionSettings": {
    "diskEncryptionKey": {
      "secretUrl": "https://group-kv.vault.azure.net/secrets/xxxxxxxxxxxxxxxxxxx/xxxxxxxxxxxxxxxxxxx",
      "sourceVault": {
        "id": "/subscriptions/xxxxxxxxxxxxxxxxxxx/resourceGroups/rg-xxxxxxxxxxxxxxxxxxx/providers/Microsoft.KeyVault/vaults/group-kv"
      }
    },
    "enabled": true,
    "keyEncryptionKey": {
      "keyUrl": "https://groupvm-kv.vault.azure.net/keys/DiskEncryption/xxxxxxxxxxxxxxxxxxx",
      "sourceVault": {
        "id": "/subscriptions/xxxxxxxxxxxxxxxxxxx/resourceGroups/xxxxxxxxxxxxxxxxxxx/providers/Microsoft.KeyVault/vaults/group-kv"
      }
    }
  },
  "osType": "Linux",
  "progressMessage": "Failed to encrypt OS volume with error: Attempt #1 to unmount /oldroot failed with error: Command umount /oldroot failed with return code 32\nstdout:\n\nstderr:\numount: /oldroot: target is busy\n        (In some cases useful info about processes that\n         use the device is found by lsof(8) or fuser(1).)\n, stack trace: Traceback (most recent call last):\n  File \"/var/lib/waagent/Microsoft.Azure.Security.AzureDiskEncryptionForLinux-0.1.0.999283/main/oscrypto/ubuntu_1604/Ubuntu1604EncryptionStateMachine.py\", line 166, in start_encryption\n    self.enter_unmount_oldroot()\n  File \"/var/lib/waagent/Microsoft.Azure.Security.AzureDiskEncryptionForLinux-0.1.0.999283/transitions/transitions/core.py\", line 222, in trigger\n    return self.machine.process(f)\n  File \"/var/lib/waagent/Microsoft.Azure.Security.AzureDiskEncryptionForLinux-0.1.0.999283/transitions/transitions/core.py\", line 526, in process\n    return trigger()\n  File \"/var/lib/waagent/Microsoft.Azure.Security.AzureDiskEncryptionForLinux-0.1.0.999283/transitions/transitions/core.py\", line 247, in _trigger\n    if t.execute(event):\n  File \"/var/lib/waagent/Microsoft.Azure.Security.AzureDiskEncryptionForLinux-0.1.0.999283/transitions/transitions/core.py\", line 148, in execute\n    self._change_state(event_data)\n  File \"/var/lib/waagent/Microsoft.Azure.Security.AzureDiskEncryptionForLinux-0.1.0.999283/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-0.1.0.999283/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-0.1.0.999283/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-0.1.0.999283/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-0.1.0.999283/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-0.1.0.999283/main/oscrypto/ubuntu_1604/encryptstates/UnmountOldrootState.py\", line 134, in enter\n    self.command_executor.Execute('umount /oldroot', True)\n  File \"/var/lib/waagent/Microsoft.Azure.Security.AzureDiskEncryptionForLinux-0.1.0.999283/main/CommandExecutor.py\", line 70, in Execute\n    raise Exception(msg)\nException: Command umount /oldroot failed with return code 32\nstdout:\n\nstderr:\numount: /oldroot: target is busy\n        (In some cases useful info about processes that\n         use the device is found by lsof(8) or fuser(1).)\n\n, stack trace: Traceback (most recent call last):\n  File \"/var/lib/waagent/Microsoft.Azure.Security.AzureDiskEncryptionForLinux-0.1.0.999283/main/handle.py\", line 1522, in daemon_encrypt\n    os_encryption.start_encryption()\n  File \"/var/lib/waagent/Microsoft.Azure.Security.AzureDiskEncryptionForLinux-0.1.0.999283/main/oscrypto/ubuntu_1604/Ubuntu1604EncryptionStateMachine.py\", line 184, in start_encryption\n    raise Exception(message)\nException: Attempt #1 to unmount /oldroot failed with error: Command umount /oldroot failed with return code 32\nstdout:\n\nstderr:\numount: /oldroot: target is busy\n        (In some cases useful info about processes that\n         use the device is found by lsof(8) or fuser(1).)\n, stack trace: Traceback (most recent call last):\n  File \"/var/lib/waagent/Microsoft.Azure.Security.AzureDiskEncryptionForLinux-0.1.0.999283/main/oscrypto/ubuntu_1604/Ubuntu1604EncryptionStateMachine.py\", line 166, in start_encryption\n    self.enter_unmount_oldroot()\n  File \"/var/lib/waagent/Microsoft.Azure.Security.AzureDiskEncryptionForLinux-0.1.0.999283/transitions/transitions/core.py\", line 222, in trigger\n    return self.machine.process(f)\n  File \"/var/lib/waagent/Microsoft.Azure.Security.AzureDiskEncryptionForLinux-0.1.0.999283/transitions/transitions/core.py\", line 526, in process\n    return trigger()\n  File \"/var/lib/waagent/Microsoft.Azure.Security.AzureDiskEncryptionForLinux-0.1.0.999283/transitions/transitions/core.py\", line 247, in _trigger\n    if t.execute(event):\n  File \"/var/lib/waagent/Microsoft.Azure.Security.AzureDiskEncryptionForLinux-0.1.0.999283/transitions/transitions/core.py\", line 148, in execute\n    self._change_state(event_data)\n  File \"/var/lib/waagent/Microsoft.Azure.Security.AzureDiskEncryptionForLinux-0.1.0.999283/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-0.1.0.999283/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-0.1.0.999283/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-0.1.0.999283/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-0.1.0.999283/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-0.1.0.999283/main/oscrypto/ubuntu_1604/encryptstates/UnmountOldrootState.py\", line 134, in enter\n    self.command_executor.Execute('umount /oldroot', True)\n  File \"/var/lib/waagent/Microsoft.Azure.Security.AzureDiskEncryptionForLinux-0.1.0.999283/main/CommandExecutor.py\", line 70, in Execute\n    raise Exception(msg)\nException: Command umount /oldroot failed with return code 32\nstdout:\n\nstderr:\numount: /oldroot: target is busy\n        (In some cases useful info about processes that\n         use the device is found by lsof(8) or fuser(1).)\n\n\n, machine state: unmount_oldroot"
}
0reactions
yugangw-msftcommented, Nov 16, 2018

Per internal mailing exchange, @andyzhangx, your issue should have been resolved. Closing

Read more comments on GitHub >

github_iconTop Results From Across the Web

Full_Disk_Encryption_Howto_20...
This page is an up-to-date guide (last revised August 2022) to comprehensive LUKS encryption, including GRUB, covering 18.04 LTS and later ...
Read more >
Enabling disk encryption fails for Azure Ubuntu 16.04-LTS ...
For now, Azure does not support use Set-AzureRmVMDiskEncryptionExtension to encrypt Linux OS disk. Please refer to this article. -VolumeType.
Read more >
Does Ubuntu server support encryption on arm devices?
Yes encryption is supported. However, the Pi4 bootloader cannot currently (late 2021) handle the normal Ubuntu Server installer.
Read more >
zabbix ssl nginx - Travel Masters
macros are supported in web scenario Variables, Headers, SSL certificate ... if it can't successfully proxy a request to PHP-FPM, Ssl 16:27 0:00...
Read more >
How To Secure Nginx with Let's Encrypt on Ubuntu 16.04
In this tutorial, you will use Certbot to obtain a free SSL certificate for Nginx on Ubuntu 16.04 and set up your certificate...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found