Deployment Environment
OpenStack nodes include controller, compute, and storage nodes. You can deploy these nodes on a single server or across multiple servers, depending on your requirements. Generally, deploy controller and storage nodes on the same server, and deploy compute nodes independently on one or more servers.
Installing OpenStack Components
- Install the dependencies.
- Install the dependency packages.
yum install python3-iniparse python3-crudini libaio-devel
- Install Kernel, QEMU, libvirt, and EDK2. For details, see Software Deployment.
- After installing EDK2, modify the following file and restart the service.
- Open the /usr/share/qemu/firmware/10-edk2-aarch64-verbose-raw.json file.
vim /usr/share/qemu/firmware/10-edk2-aarch64-verbose-raw.json
- Press i to enter the insert mode, change QEMU_EFI-pflash.raw to QEMU_EFI.fd, and change raw to fd.

- Press Esc to exit the insert mode. Type :wq! and press Enter to save the file and exit.
- Restart the service.
systemctl restart libvirtd
- Open the /usr/share/qemu/firmware/10-edk2-aarch64-verbose-raw.json file.
- Install the TMM driver. For details, see Obtaining Security Memory Information.
- OpenStack depends on the TMM driver to obtain secure memory information. The tmm_driver.ko file must be reloaded after every server reboot.
- Install the dependency packages.
Creating cVMs on OpenStack
- Verify the permission.
source ~/.admin-openrc
The ~/.admin-openrc file has been created earlier in the deployment process.
- Check the Nova environment and ensure that Success is displayed for all items. If any item fails, modify the setting based on the command output.
nova-status upgrade check

- View the compute node list.
openstack hypervisor list

- Generate a public key.
- Create a key pair, and enter the key path and name when prompted.
ssh-keygen -q -N ""
- By default, the key pair is stored in ~/.ssh/xx.pub. Upload the corresponding public key to OpenStack.
openstack keypair create --public-key ~/.ssh/xx.pub mykey openstack keypair list
- Create a key pair, and enter the key path and name when prompted.
- Create an instance flavor.
- Create a common VM instance flavor.
openstack flavor create normal-flavor --vcpus 4 --ram 8192 --disk 50
- Create a cVM instance flavor.
openstack flavor create cca-flavor --vcpus 4 --ram 8192 --disk 50 \ --property trait:HW_CPU_AARCH64_HISI_VIRTCCA=required \ --property sw:qemu_cmdline="tmm-guest,id=tmm0,num-pmu-counters=1" \ --property hw:mem_secure=true
In this document, the instance flavors are normal-flavor and cca-flavor. A VM created using the instance flavors has four CPU cores, 8 GB memory, and 50 GB system drive space. When creating a VM, you need to specify its instance flavor.
- Create a common VM instance flavor.
- Upload the image.Create a QCOW2 image for a cVM by following instructions in Creating a QCOW2 Image for a cVM and upload the image to OpenStack.
openstack image create openEuler-image --file openEuler-24.03-LTS-SP2-aarch64.qcow2 --disk-format qcow2 --container-format bare --public
The created QCOW2 image is 40 GB by default. The disk value specified in the flavor used to create a VM must be greater than or equal to the image size. Otherwise, the VM fails to be created.
- Create a network.
- Create a public network.
openstack network create --share --provider-physical-network provider --provider-network-type flat public-network
- Create a subnet.
openstack subnet create --network public-network --subnet-range xx.xx.xx.xx/xx --gateway xx.xx.xx.xx public-subnet
--subnet-range: subnet range.
--gateway: gateway.
- Create a public network.
- Create a cVM.
openstack server create --image openEuler-image --flavor cca-flavor --network public-network cca-server