Uploaded image for project: 'OpenShift Virtualization'
  1. OpenShift Virtualization
  2. CNV-41083

QEMU agent command 'guest-ssh-add-authorized-keys': failed to create directory '/home/cloud-user/.ssh': Permission denied'

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • CNV v4.15.0
    • CNV Infrastructure
    • None
    • 0.42
    • False
    • Hide

      None

      Show
      None
    • False
    • None
    • No
    • ---
    • ---
    • High

      Description of problem:

      When "Dynamic SSH key injection" is enabled for RHEL9 VM, the ssh key is failed to be added to VM, the error is 
      QEMU agent command 'guest-ssh-add-authorized-keys': failed to create directory '/home/cloud-user/.ssh': Permission denied'
      

      Version-Release number of selected component (if applicable):

      4.15 and 4.16
      

      How reproducible:

      100%
      

      Steps to Reproduce:

      1. Configure the public ssh key via UI: Virtualization -> Overview -> settings -> User -> Manage SSH keys
      2. Create RHEL9 VM from UI: Virtualization -> Catalog -> Templates -> RHEL9 template -> Customize -> Enable "Dynamic SSH key injection" under "Scripts" tab
      3. Wait until the VM is up
      

      Actual results:

      1. AgentVersionNotSupported is showing in VM status, which is misleading
      2. Check VMI events, could see the error
      QEMU agent command 'guest-ssh-add-authorized-keys': failed to create directory '/home/cloud-user/.ssh': Permission denied'
      

      Expected results:

      SSH key is added to the VM
      

      Additional info:

      
      

            dholler@redhat.com Dominik Holler
            gouyang1@redhat.com Guohua Ouyang
            Geetika Kapoor Geetika Kapoor
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: