index : archinstall32 | |
Archlinux32 installer | gitolite user |
summaryrefslogtreecommitdiff |
author | Anton Hvornum <anton@hvornum.se> | 2021-04-07 11:40:28 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-07 11:40:28 +0000 |
commit | 04bc9ce05f6c86e0c3e3e97ed4734165b9482472 (patch) | |
tree | 89c7d1ba647cc135a04fc288c3e0cf2216f8abb8 /archinstall | |
parent | 42470dcc9ae13fca5f46d0f8e1be800744a8a797 (diff) | |
parent | d9480ee8a085409145de0d0fa4457ee2e144c444 (diff) |
-rw-r--r-- | archinstall/lib/hardware.py | 8 |
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 |