Rate This Document
Findability
Accuracy
Completeness
Readability

Deploying a Virtual Client

  • Deploy virtual clients on all client nodes.
  • This section uses the root user as an example.

Installing Dependencies

  1. Run the yum command to install dependencies.
    yum install -y vim qemu libvirt edk2-aarch64 glib2-devel zlib-devel pixman-devel gtk3-devel vte291-devel libaio-devel libcap-devel libiscsi-devel libvirt-devel meson rpcgen libpciaccess-devel yajl-devel CUnit-devel libtirpc-devel-1.2.6 libxml2-devel autoconf automake libtool openssl-devel ncurses-devel gcc-c++.aarch64 gperftools-libs.aarch64 librbd-devel-14.2.8
  2. Install Python dependencies.
    python3 -m pip install -U matplotlib
    pip install rst2html5
    pip install prettytable
    pip3 install pyelftools
    pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple --user meson==0.57.1

    It takes a long time to install Meson 0.57.1 using Pip3. If the installation fails, run the installation command again or manually download the meson-0.57.1 package and install it.

    wget https://pypi.tuna.tsinghua.edu.cn/packages/0f/f8/e67e447cb3c8fe391ad8cedd67cab81486831e37a3a028c9a6974fe63a38/meson-0.57.1.tar.gz
  3. Start the libvirt service.
    systemctl start libvirtd
    systemctl enable libvirtd

Installing QEMU

Install QEMU 5.0.0.
wget https://download.qemu.org/qemu-5.0.0.tar.xz --no-check-certificate
tar -xf qemu-5.0.0.tar.xz
cd qemu-5.0.0
./configure --prefix=/usr --enable-tcmalloc
make -j
make -j install

Installing libvirt

Install libvirt 7.1.0.
wget https://libvirt.org/sources/libvirt-7.1.0.tar.xz --no-check-certificate
tar -xf libvirt-7.1.0.tar.xz
cd libvirt-7.1.0
sed -i "s/^[^#].*subdir('docs')/#&/g" meson.build
meson build --prefix=/usr
ninja -C build
ninja -C build install

Installing the SPDK

  1. Install the SPDK.
    git clone https://github.com/spdk/spdk
    cd spdk
    git reset --hard v21.04
    git submodule update --init
    ./configure --with-shared --enable-debug --disable-tests --disable-unit-tests --with-rbd
    make -j && make install
  2. Install the DPDK.
    cd dpdk
    git reset --hard v19.11
    meson --prefix=/usr --libdir=/usr/lib64 --bindir=/usr/bin --sbindir=/usr/sbin --includedir=/usr/include/dpdk -Dc_args="-fstack-protector-strong" -Dc_link_args="-Wl,-z,relro,-z,now,-z,noexecstack" build
    ninja -C build && ninja -C build install && ldconfig
  3. Modify ldconfig.
    1. Open the file.
      vi /etc/ld.so.conf
    2. Add the following content to the file:
       /usr/local/lib
    3. Run the following command for the modification to take effect:
      ldconfig

Installing a VM

  1. Modify the Yum repository file.
    Enable the update repository in the openEuler.repo Yum repository file in the /etc/yum.repos.d directory. Change the value of enabled in the [update] repository to 1.
    [update]
    name=update
    baseurl=http://repo.openeuler.org/openEuler-20.03-LTS-SP1/update/$basearch/
    enabled=1
    gpgcheck=1
    gpgkey=http://repo.openeuler.org/openEuler-20.03-LTS-SP1/OS/$basearch/RPM-GPG-KEY-openEuler
  2. Clear the Yum cache.
    yum clean all
    yum makecache
  3. Download virt-install.
    yum install -y virt-install
  4. Delete the content added in step 1 from the Yum repository file.
  5. Install a VM.
    1. Download the openEuler 20.03 LTS SP1 image.

      https://repo.openeuler.org/openEuler-20.03-LTS-SP1/ISO/aarch64/

    2. Install a VM.
      virt-install --name openEuler --vcpus=4 --ram 8192 --location=/home/iso/openEuler-20.03-LTS-SP1-aarch64-dvd.iso --nographics --disk path=/home/kvm/images/openEuler.qcow2,size=20,bus=virtio,format=qcow2 --extra-args="console=ttyS0,115200n8"

      In the preceding command, /home/iso indicates the path for storing the ISO image, and path specifies the path for storing the QCOW2 file of the VM. Change them based on your environment.

    3. Install the OS on the VM.
      1. Select 2) Use test mode.

      2. Configure all items that contain an exclamation mark (!). Enter the serial number corresponding to the item, configure the parameter as prompted, and press b to start the installation.

      3. After the installation is complete, the login prompt is displayed.