weizhouapache commented on issue #8223:
URL: https://github.com/apache/cloudstack/issues/8223#issuecomment-1835705361

   > There are few caveats in installing KVM on Ubuntu 22.04. Those are not yet 
covered in the project documentation. One is an ability for an `agent` host to 
register itself within the `mgmt` host, which is done somewhat counter 
intuitively. To resolve your issue, do this:
   > 
   > 1. Update `libvirt` configs, following the 
[doc](http://docs.cloudstack.apache.org/en/4.18.1.0/installguide/hypervisor/kvm.html)
   > 2. On the `agent` host: `sudo nano /etc/cloudstack/agent/agent.properties` 
and set proper values for UUID, host and bridges
   > 3. Copy `cloudstack` generated `ssh key` to the `authorized_keys` on a 
`mgmt` host:
   > 
   > ```
   > cat id_rsa.pub.cloud >> /root/.ssh/authorized_keys
   > ```
   > 
   > 4. Restart `libvirt` and `agent` and make sure they started properly:
   > 
   > ```
   > sudo systemctl restart libvirtd.service
   > sudo systemctl restart cloudstack-agent.service
   > ```
   > 
   > 5. If everything is ok, switch to the `mgmt` service UI config. When you 
get to adding the host, specify for `root` user and click the `SSH Public Key 
Access` to login with the autogenerated key.
   > 
   > NOTE: You'll probably face another errors, which you would report here or 
open another issue 😏😏😏
   
   yes @tampler 
   If you do not want to use root password, ssh key is a good alternative. it 
just works.
   
   If you use a non-root user, `/etc/sudoers` should be configured. I suspect 
the following configuration is correct for non-root users.
   ```
   cloudstack ALL=NOPASSWD: /usr/bin/cloudstack-setup-agent
   Defaults:cloudstack !requiretty
   ```
   
https://docs.cloudstack.apache.org/en/latest/installguide/hypervisor/kvm.html#install-and-configure-the-agent


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to