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

后端 未结 2 2068
囚心锁ツ
囚心锁ツ 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:18

    Dmesg may give some hints from the kernel message buffer, here is output on a virtualized Ubuntu instance from Slicehost:

    bvm@qdbp:~$ sudo dmesg | grep Xen
    [    0.000000]  Xen: 0000000000000000 - 00000000000a0000 (usable)
    [    0.000000]  Xen: 00000000000a0000 - 0000000000100000 (reserved)
    [    0.000000]  Xen: 0000000000100000 - 0000000010000000 (usable)
    [    0.000000] Booting paravirtualized kernel on Xen
    [    0.000000] Xen version: 3.1.2-rc1
    [    0.000000] Xen: using vcpu_info placement
    [    0.000000] Xen: using vcpuop timer interface
    [    0.000000] installing Xen timer for CPU 0
    [    0.021223] installing Xen timer for CPU 1
    [    0.046157] installing Xen timer for CPU 2
    [    0.046157] installing Xen timer for CPU 3
    [    0.265880] Initialising Xen virtual ethernet driver.
    

提交回复
热议问题