Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kvm test #660

Merged
merged 1 commit into from
Nov 28, 2024
Merged

Kvm test #660

merged 1 commit into from
Nov 28, 2024

Conversation

Yarboa
Copy link
Collaborator

@Yarboa Yarboa commented Nov 13, 2024

Adding KVM tier-0 rpm subpackage testing

KVM tier-0 tests dedicated for kvm tests.
It checks /dev/kvm. nested virtualization exist.
In case not, it removes qm_mount_bind_kvm rpm, in case installed by packit.

Test check_qm_setup_succeeds is the irst test to run,
The test check repo setup script is working properly

Packit support for nested kvm support added currently for fedora/c9s
Kvm tests should be introduced later.
Introducing QM quadlets drop-ins for extending qm.container base quadlet.
Using as single point of configuration.
Replacing the usage of containers.conf

Fedora is failing due to #666

@Yarboa Yarboa marked this pull request as draft November 13, 2024 13:31
@Yarboa Yarboa force-pushed the kvm-test branch 7 times, most recently from e478167 to 7b32d8b Compare November 17, 2024 10:37
@Yarboa Yarboa mentioned this pull request Nov 17, 2024
@Yarboa
Copy link
Collaborator Author

Yarboa commented Nov 17, 2024

@dougsland
caught the following selinux error causing QM restarts on fedora, need to check for c9s

vda4.txt

It is very interesting, in fedora once adding the following file to for exposing /dev/kvm
/etc/qm/containers/containers.conf.d/qm_dropin_mount_bind_kvm.conf

# Drop-in configuration for Podman to mount bind /dev/kvm from host to container
#
[containers]
devices = [
	"/dev/kvm:/dev/kvm",
	"/dev/net/tun:/dev/net/tun"
]

@rhatdan any inputs are welcome

@Yarboa Yarboa mentioned this pull request Nov 17, 2024
@dougsland
Copy link
Collaborator

@dougsland caught the following selinux error causing QM restarts on fedora, need to check for c9s

vda4.txt

It is very interesting, in fedora once adding the following file to for exposing /dev/kvm /etc/qm/containers/containers.conf.d/qm_dropin_mount_bind_kvm.conf

# Drop-in configuration for Podman to mount bind /dev/kvm from host to container
#
[containers]
devices = [
	"/dev/kvm:/dev/kvm",
	"/dev/net/tun:/dev/net/tun"
]

Indeed, we are exposing /dev/kvm and also /dev/net/tun which was required during my tests.
@Yarboa , It should be automatically by the subpackage. Isn't working ?

For the future as reference:

/dev/net/tun represents a TUN (network tunnel) device in Linux systems. It is used for network tunneling and is a part of the TUN/TAP driver that allows for virtual network kernel interfaces. KVM can use /dev/net/tun when setting up networking for virtual machines (VMs). Specifically, it is utilized when creating a network bridge or using a TAP (network tap) device to provide networking for VMs. (During my tests I noticed this).

@rhatdan any inputs are welcome

@Yarboa Yarboa force-pushed the kvm-test branch 9 times, most recently from adcdde3 to a68683e Compare November 20, 2024 18:18
tests/e2e/lib/repoutils Outdated Show resolved Hide resolved
@Yarboa Yarboa force-pushed the kvm-test branch 7 times, most recently from 5f1fc80 to 908ac1c Compare November 25, 2024 07:32
@Yarboa Yarboa marked this pull request as ready for review November 25, 2024 10:23
@Yarboa Yarboa marked this pull request as draft November 26, 2024 20:03
@Yarboa Yarboa self-assigned this Nov 26, 2024
@Yarboa Yarboa force-pushed the kvm-test branch 4 times, most recently from 5caa9f8 to 936f15d Compare November 27, 2024 12:43
@Yarboa
Copy link
Collaborator Author

Yarboa commented Nov 27, 2024

Failing gate is f41
please refer this WIP issue
It is generic problem with fedora, currently blocked on that
#666

@Yarboa Yarboa marked this pull request as ready for review November 27, 2024 14:53
rpm/qm.spec Outdated Show resolved Hide resolved
KVM tier-0 tests dedicated for kvm tests.
It checks /dev/kvm. nested virtualization exist.
In case not, it removes qm_mount_bind_kvm rpm, in case installed by packit.

Test check_qm_setup_succeeds is the irst test to run,
The test check repo setup script is working properly

Packit support for nested kvm support added currently for fedora/c9s
Kvm tests should be introduced later.
Introducing QM quadlets drop-ins for extending qm.container base quadlet.
Using as single point of configuration.
Replacing the usage of containers.conf

Fedora is failing due to containers#666

Signed-off-by: Yariv Rachmani <[email protected]>
@dougsland dougsland merged commit 7d48592 into containers:main Nov 28, 2024
9 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants