@@ -55,6 +55,10 @@ description = "Image to use with the DPDK checkup"
55
55
version = "0.0.1"
56
56
distro = "rhel-87"
57
57
58
+ [[customizations.user]]
59
+ name = "root"
60
+ password = "redhat"
61
+
58
62
[[packages]]
59
63
name = "dpdk"
60
64
@@ -68,7 +72,7 @@ name = "driverctl"
68
72
name = "tuned-profiles-cpu-partitioning"
69
73
70
74
[customizations.kernel]
71
- append = "default_hugepagesz=1GB hugepagesz=1G hugepages=8 isolcpus=2-7 "
75
+ append = "default_hugepagesz=1GB hugepagesz=1G hugepages=1 "
72
76
73
77
[customizations.services]
74
78
disabled = ["NetworkManager-wait-online", "sshd"]
@@ -108,28 +112,26 @@ EOF
108
112
[source,terminal]
109
113
----
110
114
$ cat <<EOF >customize-vm
111
- echo isolated_cores=2-7 > /etc/tuned/cpu-partitioning-variables.conf
112
- tuned-adm profile cpu-partitioning
115
+ #!/bin/bash
116
+
117
+ # Setup hugepages mount
118
+ mkdir -p /mnt/huge
119
+ echo "hugetlbfs /mnt/huge hugetlbfs defaults,pagesize=1GB 0 0" >> /etc/fstab
120
+
121
+ # Create vfio-noiommu.conf
113
122
echo "options vfio enable_unsafe_noiommu_mode=1" > /etc/modprobe.d/vfio-noiommu.conf
114
- EOF
115
- ----
116
- +
117
- [source,terminal]
118
- ----
119
- $ cat <<EOF >first-boot
120
- driverctl set-override 0000:06:00.0 vfio-pci
121
- driverctl set-override 0000:07:00.0 vfio-pci
122
123
123
- mkdir /mnt/huge
124
- mount /mnt/huge --source nodev -t hugetlbfs -o pagesize=1GB
124
+ # Enable guest-exec,guest-exec-status on the qemu-guest-agent configuration
125
+ sed -i '/^BLACKLIST_RPC=/ { s/guest-exec-status//; s/guest-exec//g }' /etc/sysconfig/qemu-ga
126
+ sed -i '/^BLACKLIST_RPC=/ { s/,\+/,/g; s/^,\|,$//g }' /etc/sysconfig/qemu-ga
125
127
EOF
126
128
----
127
129
128
130
. Use the `virt-customize` tool to customize the image generated by the image builder tool:
129
131
+
130
132
[source,terminal]
131
133
----
132
- $ virt-customize -a <UUID>.qcow2 -- run=customize-vm -- firstboot=first-boot -- selinux-relabel
134
+ $ virt-customize -a <UUID>.qcow2 -- run=customize-vm -- selinux-relabel
133
135
----
134
136
135
137
. To create a Dockerfile that contains all the commands to build the container disk image, enter the following command:
@@ -138,7 +140,7 @@ $ virt-customize -a <UUID>.qcow2 --run=customize-vm --firstboot=first-boot --sel
138
140
----
139
141
$ cat << EOF > Dockerfile
140
142
FROM scratch
141
- COPY <uuid >-disk.qcow2 /disk/
143
+ COPY -- chown=107:107 <uuid >-disk.qcow2 /disk/
142
144
EOF
143
145
----
144
146
+
@@ -160,4 +162,4 @@ $ podman build . -t dpdk-rhel:latest
160
162
$ podman push dpdk-rhel:latest
161
163
----
162
164
163
- . Provide a link to the container disk image in the `spec.param.vmContainerDiskImage ` attribute in the DPDK checkup config map.
165
+ . Provide a link to the container disk image in the `spec.param.vmUnderTestContainerDiskImage ` attribute in the DPDK checkup config map.
0 commit comments