Is there an OS command I can run to determine if running inside a Xen based virtual machine

后端 未结 2 2083
囚心锁ツ
囚心锁ツ 2021-02-18 21:33

Is there an OS command I can run from within a Xen based virtual machine to tell me that it is a virtual box rather than a physical box - I heard that the kernel had some self a

2条回答
  •  一整个雨季
    2021-02-18 22:05

    Try file /sys/hypervisor/uuid.

    1. It does not exist -> Not related to XEN.
    2. It does exist, and is full of 0-s -> It is a XEN Dom0
    3. It does exist, and has a not-0 values -> It is a DomU

    This requires of course, that /sys is mounted and populated...

提交回复
热议问题