使用virt-what来判断VPS使用哪种虚拟技术

洼地云 ai-quyi.png

有些时候,我们需要判断我们的虚拟机是使用的哪种虚拟技术:KVM, Xen, QEMU, VirtualBox。

virt-what是一个shell脚本,在虚拟机上运行脚本,可以检测机器是哪种虚拟技术。

virt-what支持很多种虚拟机,包括常见的开源虚拟技术(KVM, Xen, QEMU, VirtualBox),大型机(IBM Systemz, LPAR, z/VM),硬件分区方案(Hitachi Virtage),专有管理程序(VMWare, Microsoft Hyper-V),以及更多类型

virt-what已经集成到Fedora (13+), Red Hat Enterprise Linux (5.7+ and 6.1+), Debian, Ubuntu, ArchLinux and Gentoo,你也可以通过源码编译。

你也可以从git仓库clone源码:[git clone git://git.annexia.org/git/virt-what.git] 。

具体编译方式可以参考,源码中的readme文件。

使用时,如下:

[michael@centos74 ~]$ virt-what
virt-what: this script must be run as root
[michael@centos74 ~]$ sudo virt-what
[sudo] password for michael: 
kvm

我的VPS时digitalocean,CentOS 7.4,已经集成到系统中了,可以直接使用。

赞(1)
未经允许禁止转载:优米格 » 使用virt-what来判断VPS使用哪种虚拟技术

评论 抢沙发

合作&反馈&投稿

商务合作、问题反馈、投稿,欢迎联系

广告合作侵权联系

登录

找回密码

注册