Skip to content

Commit 6ec3a20

Browse files
committed
chore: set the KVM user
This change will set the KVM user to a known clean user from within the container which will eliminate conflicts in the event there's an issue between the host and the podified runtime. Signed-off-by: Kevin Carter <[email protected]>
1 parent 039b041 commit 6ec3a20

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

ContainerFiles/libvirt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,11 @@ COPY --from=dependency_build /lib/x86_64-linux-gnu/libnuma* /lib/x86_64-linux-gn
2525
COPY --from=dependency_build /lib/x86_64-linux-gnu/libssl* /lib/x86_64-linux-gnu/
2626
COPY --from=dependency_build /lib/x86_64-linux-gnu/libxdp* /lib/x86_64-linux-gnu/
2727
COPY --from=dependency_build /lib/x86_64-linux-gnu/libz* /lib/x86_64-linux-gnu/
28-
RUN export DEBIAN_FRONTEND=noninteractive \
28+
RUN mkdir -p /etc/udev/rules.d \
29+
&& groupadd --gid 929292 kvm || groupmod --gid 929292 kvm \
30+
&& getent group kvm \
31+
&& echo 'KERNEL=="kvm", GROUP="929292", MODE="0660"' | sudo tee /etc/udev/rules.d/99-genestack-kvm.rules \
32+
&& export DEBIAN_FRONTEND=noninteractive \
2933
&& apt-get update && apt-get upgrade -y \
3034
&& apt-get install --no-install-recommends -y iproute2 \
3135
iptables \
@@ -57,4 +61,3 @@ RUN export DEBIAN_FRONTEND=noninteractive \
5761
&& mkdir -p /etc/nova /var/log/nova /var/cache/nova \
5862
&& chown nova:nova /etc/nova /var/log/nova /var/lib/nova /var/cache/nova \
5963
&& usermod -a -G kvm nova
60-

0 commit comments

Comments
 (0)