** Description changed:

  [General]
  
  On Azure, when provisioning a Hirsute VM with Accelerated Networking
- enabled, sometimes the SSH key is not setup properly and the user cannot
- log into the VM.
+ enabled, sometimes part of the cloud-init configuration is not applied.
+ 
+ Especially, in those cases, the SSH key is not setup properly and the
+ user cannot log into the VM.
  
  [how to reproduce]
  
  Start a VM with AN enabled:
  
  ```
  az vm create --name "$VM_NAME --resource-group "$GROUP" --location "UK South" 
 --image 
'Canonical:0001-com-ubuntu-server-hirsute-daily:21_04-daily-gen2:latest' --size 
Standard_F8s_v2 --admin-username ubuntu --ssh-key-value "$SSH_KEY" 
--accelerated-networking
  ```
  
  After a moment, try to SSH: if you succeed, delete and recreate a new
  VM.
  
  [troubleshooting]
  
- To be able to connect into the VM to debug, run:
+ To be able to connect into the VM, run:
  
- ```
+ 
  az vm run-command invoke -g "$GROUP" -n "$VM_NAME" --command-id 
RunShellScript --scripts "sudo -u ubuntu ssh-import-id $LP_USERNAME"
  ```
  
  In "/run/cloud-init/instance-data.json", I can see:
  ```
-      "publicKeys": [
-       {
-        "keyData": "<my-pub-key>",
-        "path": "/home/ubuntu/.ssh/authorized_keys"
-       }
-      ],
+      "publicKeys": [
+       {
+        "keyData": "<my-pub-key>",
+        "path": "/home/ubuntu/.ssh/authorized_keys"
+       }
+      ],
  ```
  
  as expected.
+ 
+ [workaround]
+ 
+ As mentioned, Azure allows the user to run command into the VM without
+ SSH connection. To do so, one can use the Azure CLI:
+ 
+ 
+ az vm run-command invoke -g "$GROUP" -n "$VM_NAME" --command-id 
RunShellScript --scripts "sudo -u ubuntu ssh-import-id $LP_USERNAME"
+ 
+ This example uses "ssh-import-id" but it's also possible to just echo a
+ given public key into /home/ubuntu/.ssh/authorized_keys
+ 
+ NOTE: this will only solves the SSH issue, I do not know if this bug
+ affects other things. If so the user would have to apply those things
+ manually.

** Description changed:

  [General]
  
  On Azure, when provisioning a Hirsute VM with Accelerated Networking
  enabled, sometimes part of the cloud-init configuration is not applied.
  
- Especially, in those cases, the SSH key is not setup properly and the
- user cannot log into the VM.
+ Especially, in those cases, the public SSH key is not setup properly.
  
  [how to reproduce]
  
  Start a VM with AN enabled:
  
  ```
  az vm create --name "$VM_NAME --resource-group "$GROUP" --location "UK South" 
 --image 
'Canonical:0001-com-ubuntu-server-hirsute-daily:21_04-daily-gen2:latest' --size 
Standard_F8s_v2 --admin-username ubuntu --ssh-key-value "$SSH_KEY" 
--accelerated-networking
  ```
  
  After a moment, try to SSH: if you succeed, delete and recreate a new
  VM.
  
  [troubleshooting]
  
  To be able to connect into the VM, run:
- 
  
  az vm run-command invoke -g "$GROUP" -n "$VM_NAME" --command-id 
RunShellScript --scripts "sudo -u ubuntu ssh-import-id $LP_USERNAME"
  ```
  
  In "/run/cloud-init/instance-data.json", I can see:
  ```
       "publicKeys": [
        {
         "keyData": "<my-pub-key>",
         "path": "/home/ubuntu/.ssh/authorized_keys"
        }
       ],
  ```
  
  as expected.
  
  [workaround]
  
  As mentioned, Azure allows the user to run command into the VM without
  SSH connection. To do so, one can use the Azure CLI:
  
- 
- az vm run-command invoke -g "$GROUP" -n "$VM_NAME" --command-id 
RunShellScript --scripts "sudo -u ubuntu ssh-import-id $LP_USERNAME"
+ az vm run-command invoke -g "$GROUP" -n "$VM_NAME" --command-id
+ RunShellScript --scripts "sudo -u ubuntu ssh-import-id $LP_USERNAME"
  
  This example uses "ssh-import-id" but it's also possible to just echo a
  given public key into /home/ubuntu/.ssh/authorized_keys
  
  NOTE: this will only solves the SSH issue, I do not know if this bug
  affects other things. If so the user would have to apply those things
  manually.

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux-azure in Ubuntu.
https://bugs.launchpad.net/bugs/1919177

Title:
  Azure: issues with accelerated networking on Hirsute

Status in cloud-init:
  Incomplete
Status in cloud-init package in Ubuntu:
  New
Status in linux-azure package in Ubuntu:
  New

Bug description:
  [General]

  On Azure, when provisioning a Hirsute VM with Accelerated Networking
  enabled, sometimes part of the cloud-init configuration is not
  applied.

  Especially, in those cases, the public SSH key is not setup properly.

  [how to reproduce]

  Start a VM with AN enabled:

  ```
  az vm create --name "$VM_NAME --resource-group "$GROUP" --location "UK South" 
 --image 
'Canonical:0001-com-ubuntu-server-hirsute-daily:21_04-daily-gen2:latest' --size 
Standard_F8s_v2 --admin-username ubuntu --ssh-key-value "$SSH_KEY" 
--accelerated-networking
  ```

  After a moment, try to SSH: if you succeed, delete and recreate a new
  VM.

  [troubleshooting]

  To be able to connect into the VM, run:

  az vm run-command invoke -g "$GROUP" -n "$VM_NAME" --command-id 
RunShellScript --scripts "sudo -u ubuntu ssh-import-id $LP_USERNAME"
  ```

  In "/run/cloud-init/instance-data.json", I can see:
  ```
       "publicKeys": [
        {
         "keyData": "<my-pub-key>",
         "path": "/home/ubuntu/.ssh/authorized_keys"
        }
       ],
  ```

  as expected.

  [workaround]

  As mentioned, Azure allows the user to run command into the VM without
  SSH connection. To do so, one can use the Azure CLI:

  az vm run-command invoke -g "$GROUP" -n "$VM_NAME" --command-id
  RunShellScript --scripts "sudo -u ubuntu ssh-import-id $LP_USERNAME"

  This example uses "ssh-import-id" but it's also possible to just echo
  a given public key into /home/ubuntu/.ssh/authorized_keys

  NOTE: this will only solves the SSH issue, I do not know if this bug
  affects other things. If so the user would have to apply those things
  manually.

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1919177/+subscriptions

-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to     : kernel-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to