Add Compute Nodes
To run private cloud virtual machines, you need to add corresponding compute nodes (hosts) first. This section describes how to deploy the corresponding components.
Compute nodes are mainly responsible for virtual machine, network, and storage management. The components that need to be installed are as follows:
| Component | Purpose |
|---|---|
| host | Manage KVM virtual machines and storage |
| host-deployer | Virtual machine deployment service |
| sdnagent | Manage virtual machine networks and security groups |
| openvswitch | Virtual machine network port and flow table configuration |
| qemu | Run virtual machines |
Environment
- Hardware requirements:
- Virtualization: CPU must support virtualization for KVM acceleration of virtual machines
- Enable IOMMU, VT-d: For GPU passthrough (can be disabled if GPU is not used)
- Network:
- Currently available network segment: Virtual machines can directly use the flat network segment where the compute node is located. You need to pre-allocate and reserve corresponding IP ranges for cloud platform virtual machines to prevent them from being occupied by other devices, which would cause IP conflicts.
- The operating system needs to be a clean version, because the deployment tool will build a k3s cluster of the specified version from scratch, so ensure that the system does not have kubernetes, containerd and other container management tools installed, otherwise conflicts will occur causing installation exceptions.
- Minimum configuration requirements: CPU 8 cores, memory 8GiB, storage 200GiB.
- The storage paths for virtual machines and services are all under the /opt directory, so ideally it is recommended to set up a separate mount point for the /opt directory.
- For example, partition /dev/sdb1 separately as ext4 and mount it to the /opt directory via /etc/fstab.
Depending on the CPU architecture, the supported distributions are also different. The currently supported distributions are as follows:
Note: 3.11, 3.10, etc. represent Release/3.11, Release/3.10. The same applies to others.
| Operationg system and Arch | 3.11 | 3.10 |
|---|---|---|
| OpenEuler 22.03 LTS SP3 x86_64+aarch64 | ✅ | ✅ |
| OpenEuler 22.03 LTS SP4 x86_64+aarch64 | ✅ | |
| OpenEuler 24.03 LTS SP2 x86_64+aarch64 | ✅ | |
| CentOS 7 2009 x86_64+aarch64 | ✅ | ✅ |
| CentOS 8 Stream x86_64+aarch64 | ✅ | |
| CentOS 9 Stream x86_64+aarch64 | ✅ | |
| CentOS 10 Stream x86_64+aarch64 | ✅ | |
| Debian 11 x86_64+aarch64 | ✅ | ✅ |
| Debian 12 x86_64+aarch64 | ✅ | |
| Debian 13 x86_64+aarch64 | ✅ | |
| Ubuntu 20.04 LTS x86_64+aarch64 | ✅ | |
| Ubuntu 22.04 LTS x86_64+aarch64 | ✅ | |
| Ubuntu 24.04 LTS x86_64+aarch64 | ✅ | |
| Ubuntu 25.04 x86_64+aarch64 | ✅ | |
| Rocky Linux 8.x x86_64+aarch64 | ✅ | |
| Rocky Linux 9.x x86_64+aarch64 | ✅ | |
| Rocky Linux 10.x x86_64+aarch64 | ✅ | |
| AlmaLinux 8.x x86_64+aarch64 | ✅ | |
| AlmaLinux 9.x x86_64+aarch64 | ✅ | |
| AlmaLinux 10.x x86_64+aarch64 | ✅ | |
| OpencloudOS 8.x x86_64+aarch64 | ✅ | |
| OpencloudOS 9.x x86_64+aarch64 | ✅ | |
| AnolisOS 8.x x86_64+aarch64 | ✅ |
If it is for testing purposes, you can deploy compute node services on a virtual machine, but KVM acceleration and GPU passthrough may not be available.
Use ocboot to Add Corresponding Nodes
The following operations are performed on the control node. Use the ocboot.sh add-node command on the control node to add the corresponding compute nodes.
Assuming you want to add compute node 10.168.222.140 to control node 10.168.26.216, you first need SSH root passwordless login to the corresponding compute node and the control node itself.
If it is a high availability deployment environment, when adding nodes here, do not use the VIP for the control node IP, only use the actual IP of the first control node, because the VIP may drift to other nodes, but usually only the first node has SSH passwordless login permissions to other nodes configured. Using other control nodes will cause SSH login to fail.
# Set the control node itself to passwordless login
$ ssh-copy-id -i ~/.ssh/id_rsa.pub root@10.168.26.216
# Try passwordless login to the control node to see if it succeeds
$ ssh root@10.168.26.216 "hostname"
# Copy the generated ~/.ssh/id_rsa.pub public key to the machine to be deployed
$ ssh-copy-id -i ~/.ssh/id_rsa.pub root@10.168.222.140
# Try passwordless login to the machine to be deployed. You should be able to get the hostname of the deployment machine without entering a login password
$ ssh root@10.168.222.140 "hostname"
Add Nodes
The following commands are all run on the previously deployed control node. The control node should have the ocboot deployment tool installed in advance.
# Use ocboot to add nodes
$ ./ocboot.sh add-node 10.168.26.216 10.168.222.140
# Other options, use '--help' for help
$ ./ocboot.sh add-node --help
usage: ocboot.py add-node [-h] [--user SSH_USER] [--key-file SSH_PRIVATE_FILE] [--port SSH_PORT] [--node-port SSH_NODE_PORT]
FIRST_MASTER_HOST TARGET_NODE_HOSTS [TARGET_NODE_HOSTS ...]
positional arguments:
FIRST_MASTER_HOST onecloud cluster primary master host, e.g., 10.1.2.56
TARGET_NODE_HOSTS target nodes ip added into cluster
optional arguments:
-h, --help show this help message and exit
--user SSH_USER, -u SSH_USER
primary master host ssh user (default: root)
--key-file SSH_PRIVATE_FILE, -k SSH_PRIVATE_FILE
primary master ssh private key file (default: /home/lzx/.ssh/id_rsa)
--port SSH_PORT, -p SSH_PORT
primary master host ssh port (default: 22)
--node-port SSH_NODE_PORT, -n SSH_NODE_PORT
worker node host ssh port (default: 22)
This command will use ansible-playbook to add the corresponding compute nodes.
Enable Compute Nodes (Hosts)
After the compute nodes are added, you need to enable the compute nodes that were just reported. Only enabled hosts can run virtual machines.
# Use climc to view the registered host list
$ climc host-list
+--------------------------------------+-------------------------+-------------------+----------------+----------------------------+---------+---------+-------------+----------+-----------+------------+---------------+--------------+------------+-------------------------+--------------+
|| ID | Name | Access_mac | Access_ip | Manager_URI | Status | enabled | host_status | mem_size | cpu_count | node_count | sn | storage_type | host_type | version | storage_size |
+--------------------------------------+-------------------------+-------------------+----------------+----------------------------+---------+---------+-------------+----------+-----------+------------+---------------+--------------+------------+-------------------------+--------------+
|| 3830870e-a499-459d-89df-bb6979b5e1ff | lzx-allinone-standalone | 00:22:39:4c:6c:e9 | 10.168.222.140 | http://10.168.222.140:8885 | running | false | online | 8192 | 4 | 1 | Not Specified | rotate | hypervisor | master(7ab047419092301) | 50141 |
+--------------------------------------+-------------------------+-------------------+----------------+----------------------------+---------+---------+-------------+----------+-----------+------------+---------------+--------------+------------+-------------------------+--------------+
*** Total: 0 Pages: 0 Limit: 20 Offset: 0 Page: 1 ***
# Enable host
$ climc host-enable lzx-allinone-standalone
Common Troubleshooting
For common troubleshooting of compute nodes, please refer to: Host Service Troubleshooting.