If you're adding it via CloudStack then the addHost command will ssh into the KVM host and add it (including setup certificate, keys in a keystore).
To add a KVM host in an out-of-band way you can either use cloudstack-setup-agent or skip that by manually editing the agent.properties file and disable auth strictness global setting, and then if you start the cloudstack-agent it will be added as a host. Later you can reset the auth strictness global setting to false and in the UI go to Infra->Host->select the KVM host -> click on the provision host security keys button which will setup the key (since the agent is connected already, it won't use ssh for cert/key setup). Regards. ________________________________ From: Pieter Koorts <[email protected]> Sent: Wednesday, January 13, 2021 21:48 To: [email protected] <[email protected]> Subject: Re: CloudStack 4.15 Focal network issue on MAAS Hi Rohit, This is currently how I have my compute server configured. This doesn't generate the old style '/etc/network/interfaces' file but this is the file that the cloudstack-setup-agent is specifically looking for. Do I need to run "cloudstack-setup-agent" or can this be skipped and just manually edited/added in the agent.properties file? --- Regards, Pieter [email protected] www.shapeblue.com 3 London Bridge Street, 3rd floor, News Building, London SE1 9SGUK @shapeblue On 13 January 2021 at 15:47, Rohit Yadav <[email protected]> wrote: Hi Pieter, On 18.04/20.04 that uses netplan you'll need to add the network device (bridge) before adding the KVM host. For example: Install dependencies: apt-get install bridge-utils In /etc/netplan/01-netcfg.yaml applying your network specific changes: network: version: 2 renderer: networkd ethernets: ens3: dhcp4: false dhcp6: false optional: true bridges: cloudbr0: addresses: [192.168.1.10/24] gateway4: 192.168.1.1 nameservers: addresses: [1.1.1.1,8.8.8.8] interfaces: [ens3] dhcp4: false dhcp6: false parameters: stp: false forward-delay: 0 Then (as root), netplan generate netplan apply reboot # reboot is optional if netplan doesnot immediate make the changes Also, newer sshd versions in Ubuntu 20.04 don't support specific ciphers for CloudStack mgmt server to ssh and setup agent, which you can fix as: Add these to your sshd_config on the KVM host temporarily before adding the KVM host in CloudStack: PubkeyAcceptedKeyTypes=+ssh-dss HostKeyAlgorithms=+ssh-dss KexAlgorithms=+diffie-hellman-group1-sha1 Finally restart sshd and add host via CloudStack UI/API. [1] https://rohityadav.cloud/blog/cloudstack-kvm/ Regards. ________________________________ From: Pieter Koorts <[email protected]> Sent: Wednesday, January 13, 2021 18:06 To: [email protected]<mailto:[email protected]> <[email protected]> Subject: CloudStack 4.15 Focal network issue on MAAS Hi, Just wanted to check if there is some way to get cloudstack to read the network information without a /etc/network/interfaces file? The reason being that Ubuntu MAAS when deploying a host by default uses netplan to configure all interfaces. All bridges and routes are valid and there is full network communication but this error pops up when running cloudstack-setup-agent [Errno 2] No such file or directory: '/etc/network/interfaces' Current deployment setup Version: 4.15 Controller: Ubuntu Focal 20.04 Agent: Ubuntu Focal 20.04 --- Regards, Pieter [email protected]<mailto:[email protected]> www.shapeblue.com<http://www.shapeblue.com> 3 London Bridge Street, 3rd floor, News Building, London SE1 9SGUK @shapeblue
