Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--archinstall/lib/hardware.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/archinstall/lib/hardware.py b/archinstall/lib/hardware.py
index 687b4a74..3da333de 100644
--- a/archinstall/lib/hardware.py
+++ b/archinstall/lib/hardware.py
@@ -41,4 +41,12 @@ def cpuVendor()-> Optional[str]:
if info.get('field',None):
if info.get('field',None) == "Vendor ID:":
return info.get('data',None)
+
+def isVM() -> bool:
+ try:
+ subprocess.check_call(["systemd-detect-virt"]) # systemd-detect-virt issues a none 0 exit code if it is not on a virtual machine
+ return True
+ except:
+ return False
+
# TODO: Add more identifiers