Skip to content

Commit

Permalink
Fix kvm support in GitHub Actions container
Browse files Browse the repository at this point in the history
  • Loading branch information
rootmos committed Nov 6, 2023
1 parent 0edc8b2 commit c523c07
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
runs-on: ubuntu-latest
container:
image: ${{ matrix.distro }}
options: [ "--device=/dev/kvm" ]
steps:
- name: Install essentials
run: |
Expand Down
4 changes: 2 additions & 2 deletions openbsd
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ class Situation:
if self._kvm_hardware_support is None:
p = subprocess.run(["grep", "-cq", "-E", "vmx|svm|0xc0f", "/proc/cpuinfo"])
self._kvm_hardware_support = p.returncode == 0
self.logger.debug("kvm hardware support: {self._kvm_hardware_support}")
self.logger.debug(f"kvm hardware support: {self._kvm_hardware_support}")
return self._kvm_hardware_support

@property
Expand All @@ -368,7 +368,7 @@ class Situation:
if m == "kvm":
self._kvm_kernel_support = True
break
self.logger.debug("kvm kernel support: {self._kvm_kernel_support}")
self.logger.debug(f"kvm kernel support: {self._kvm_kernel_support}")
return self._kvm_kernel_support

@property
Expand Down

0 comments on commit c523c07

Please sign in to comment.