Skip to content

Commit

Permalink
vm-under-test: Set CPU/tuned configurations
Browse files Browse the repository at this point in the history
The tuned-adm command needs a reboot in order to take effect.
In order to reboot during the virt-builder operation - the command
is done in a first-boot script.

Signed-off-by: Ram Lavi <ralavi@redhat.com>
  • Loading branch information
RamLavi authored and orelmisan committed Nov 27, 2023
1 parent e5c9d77 commit 74d590c
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
1 change: 1 addition & 0 deletions vms/vm-under-test/scripts/build-vm-image
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,6 @@ virt-builder centosstream-8 \
--root-password password:redhat \
--install cloud-init,kernel-rt,tuned,rt-tests \
--run /root/scripts/customize-vm \
--firstboot /root/scripts/first-boot \
--selinux-relabel \
--output /output/kubevirt-realtime-checkup-vm.qcow2
26 changes: 26 additions & 0 deletions vms/vm-under-test/scripts/first-boot
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/usr/bin/env bash
#
# This file is part of the kiagnose project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Copyright 2023 Red Hat, Inc.
#

set -e

echo isolated_cores=1-2 >> /etc/tuned/realtime-virtual-guest-variables.conf
echo isolate_managed_irq=Y >> /etc/tuned/realtime-virtual-guest-variables.conf
tuned-adm profile realtime-virtual-guest

reboot

0 comments on commit 74d590c

Please sign in to comment.