The provided script installs the RPM packages for the Napatech OVS/DPDK and configures the overcloud image.
About this task
This describes a series of actions to modify the overcloud image.
Before you begin
Procedure
-
Download the overcloud image.
wget https://images.rdoproject.org/centos8/victoria/rdo_trunk/current-tripleo/overcloud-full.tar
Unpack the file.tar xf overcloud-full.tar
-
Install the required packages.
sudo dnf groupinstall -y "Development Tools" sudo dnf groupinstall -y "Virtualization Host" sudo dnf install -y qemu-kvm qemu-img sudo dnf install -y libguestfs-tools-c
-
Update the QEMU access rights.
vim /etc/libvirt/qemu.conf
Add the following lines to the file.user = "root" group = "root"
Start the libvirt service.sudo systemctl enable libvirtd sudo systemctl start libvirtd
-
Set the root password.
sudo virt-customize -a overcloud-full.qcow2 --root-password password:1234
An output example:[ 0.0] Examining the guest ... [ 12.9] Setting a random seed [ 12.9] Setting the machine ID in /etc/machine-id [ 12.9] Setting passwords [ 16.0] Finishing off
-
Run a VM with the overcloud image.
sudo /usr/libexec/qemu-kvm -m 4096 -drive \ file=overcloud-full.qcow2,if=virtio -net nic,model=virtio -net nic \ -net user,hostfwd=tcp::10035-:22 -kernel overcloud-full.vmlinuz \ -append "rw root=/dev/vda console=ttyS0" \ -initrd overcloud-full.initrd -nographic
Log in to the VM.... CentOS Stream 8 Kernel 4.18.0-373.el8.x86_64 on an x86_64 Activate the web console with: systemctl enable --now cockpit.socket localhost login: root Password:
-
Copy the provided package from the host to the VM.
For example:
scp root@<host>:/root/tripleo/overcloud_image/Napatech/overcloud_packages.tar.gz . scp root@<host>:/root/tripleo/overcloud_image/Napatech/customize_overcloud.sh .
Run the customize_overcloud.sh script which installs required packages and configure the overcloud image../customize_overcloud.sh
Delete the customize_overcloud.sh script.rm -rf /root/customize_overcloud.sh
-
Restart and log in to the VM.
shutdown -r now
-
Clean up the overcloud image after changes are made.
All the packages must be deleted to make disk memory available, and network data must be cleared to keep the image without any network configuration.
-
Delete all data in the /etc/resolv.conf file.
# Generated by NetworkManager nameserver 8.8.8.8 # delete this line nameserver 10.0.2.3 # delete this line
-
Flush the IP address of network interfaces. For example:
ip addr flush <network_interface>
For example:ip addr flush ens3 ip addr flush ens4
-
Delete the dnf repository files.
rm -rf /etc/yum.repos.d/*
-
Delete all data in the /etc/resolv.conf file.
-
Shutdown the VM.
poweroff