Latest Posts

Use virt-what to Get VPS Virtualization Technology

VPS has a variety of virtualization technologies. Common VPS virtualization architectures are VMWare, Hyper-v, OpenVZ, Xen, and KVM. We can use the "virt-what" tool to judge and refer to our own VPS virtualization architecture. Now Lets take a look those popular main Cloud Vendor's Virtualization technology. virt-what is a shell script which can be used to detect if the program is running in a virtual machine. Virt-what supports a very large number of different hypervisor types, including common open source hypervisors (KVM, Xen, QEMU, VirtualBox), mainframe systems like IBM Systemz, LPAR, z/VM, hardware partitioning schemes like Hitachi Virtage, proprietary hypervisors like VMWare, Microsoft Hyper-V and much more.

It supports following virtualization platforms:
VMware、Hyper-V、VirtualPC、VirtualBox、OpenVZ / Virtuozzo、Linux-VServer、UML、IBM PowerVM Lx86 Linux/x86 emulator、Hitachi Virtualization Manager (HVM) Virtage logical 、partitioning、IBM SystemZ、Parallels、Xen、QEMU/KVM

Here are some running examples:
The program prints out a list of facts about the virtual machine, derived from heuristics. One fact is printed per line.
# virt-what
# virt-what
# virt-what
(nothing printed ⇒ baremetal)

Method 1: Compile it from code

1. Download tool
2. Installation
tar zxf virt-what-1.20.tar.gz   #untar the download file
cd virt-what-1.11               #enter the directory
./configure                     #configure it using default settings
make && make install            #compile and get executable file
3. View

Method 2: Download it and Run

Mostly, it has been installed in to your VPS. If not, you can use 'yum install virt-what -y' or 'apt-get install virt-what' to get it installed.


$ apk add virt-what
(1/1) Installing virt-what (1.19-r1)
Executing busybox-1.30.1-r2.trigger
OK: 303 MiB in 109 packages
[node1] (local) [email protected] ~/virt-what-1.11
$ virt-what
[node1] (local) [email protected] ~/virt-what-1.11

2. Google Cloud
# virt-what

3. AWS

4. Azure

5. Oracle
# virt-what

Method 3: Directly Install it

yum -y install virt-what
sudo apt install virt-what
Check the Azure output
[email protected]:~$ sudo apt install virt-what
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 14.7 kB of archives.
After this operation, 39.9 kB of additional disk space will be used.
Get:1 bionic/universe amd64 virt-what amd64 1.18-2 [14.7 kB]
Fetched 14.7 kB in 0s (213 kB/s)
Selecting previously unselected package virt-what.
(Reading database ... 88964 files and directories currently installed.)
Preparing to unpack .../virt-what_1.18-2_amd64.deb ...
Unpacking virt-what (1.18-2) ...
Setting up virt-what (1.18-2) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
[email protected]:~$ virt-what
virt-what: this script must be run as root
[email protected]:~$ sudo virt-what
[email protected]:~$

No comments