This message was deleted.
# harvester
a
This message was deleted.
k
Adding to what @high-alligator-99144 posted, the documentation asks to mention the name of the user which would be used for SSH. We have done that and our cloud-config works perfectly. The VMs get created on harvester, the IPs get assigned (we have DHCP) and we are able to SSH to the VMs. Only Rancher is unable to do so. I am guessing some key from rancher must be added to the list of authorised keys. I can't seem to find a setting to do this however...
s
adding a cloud-config to the deployment through rancher might be affecting this. As you stated, rancher does add its own key. Can you ssh in with the rancher key? For rke1, you can download the ssh key for a given node by clicking the
button next to the node on the cluster page. I would recommend trying a more ‘vanilla’ install, without any user input in the cloud-config, and seeing if rancher can provision then.
h
Thanks for your response. Few more questions - • How does Rancher adds a key to the deployment? • Does it internally create a cloud-config and supply all the required parameters including a key? If so, can we see this in any specific logs? • Is this public key auto-generated for each VM?
Since our environment is air-gapped, we must provide apt proxy at least. So, this is the bare-minimum cloud-config that we use in order to install the qemu-guest-agent (we added only
apt proxy
and
package_update
. qemu-guest-agent is by harvester and the ssh key is by rancher. This still doesn't work.
Copy code
#cloud-config
apt:
  conf: |
    APT {
        Get {
            Assume-Yes 'true';
            Fix-Broken 'true';
        }
    }
  http_proxy: <http://16.85.88.10:8080>
  https_proxy: <http://16.85.88.10:8080>
package_update: true
packages:
  - qemu-guest-agent
runcmd:
  - - systemctl
    - enable
    - --now
    - qemu-guest-agent
ssh_authorized_keys:
  - ssh-rsa
    AAAAB3NzaC1yc2EAAAADAQABAAABAQCk1SnbFcyXhnd+Ipc3o03EO/+JOY+xV3d3PdyKo8ZqzG0+0RhC+/Cd8fiQuWWQDgadqr65pqn9xWyeP31IpzGoS9hRoXk8sqaXPCMyRwUKr3vrpRngKWm8k187JDldDfHqHKWx6E3DwXN2nM+dMAzd65tR9ljOKu8daqhQqmsHmWiT98Kw+VDyqUNq/DW7HcoaLrmIP3xbFSJnBs12Abrn86I0JeY5XKa2fb9P9DK2rnMDssNcRaNgmL5V/6z4LkGD8i0NcL8l2JSq807QJj2lROdKREj9tT653XY191oq7G8aStd0to4AOoLdrm+34tJd2ciPbZDEqAqMdNk8ZZVP
s
oh, if you’re running it behind a proxy then that might change things. Is rancher running behind the proxy too?
h
Yes. We are using docker installation of rancher.