{"id":1929,"date":"2019-08-29T18:24:03","date_gmt":"2019-08-29T11:24:03","guid":{"rendered":"https:\/\/tino.vn\/?post_type=ht_kb&#038;p=1929"},"modified":"2019-09-15T10:34:48","modified_gmt":"2019-09-15T03:34:48","slug":"11-cach-kiem-tra-vps-su-dung-ao-hoa-gi","status":"publish","type":"ht_kb","link":"https:\/\/tino.vn\/blog\/docs\/11-cach-kiem-tra-vps-su-dung-ao-hoa-gi\/","title":{"rendered":"11 C\u00e1ch ki\u1ec3m tra VPS s\u1eed d\u1ee5ng \u1ea3o h\u00f3a g\u00ec ?"},"content":{"rendered":"<h4 id=\"C\u00e1ch_1:_:_s\u1eed_d\u1ee5ng_dmidecode\u00a0_command\">C\u00e1ch 1: : s\u1eed d\u1ee5ng <strong>dmidecode\u00a0 <\/strong>command<\/h4>\n<p>\u0110\u1ec3 \u0111\u01a1n gi\u1ea3n b\u1ea1n c\u00f3 th\u1ec3 s\u1eed d\u1ee5ng tr\u00ecnh <strong>dmidecode\u00a0<\/strong>b\u1eb1ng l\u1ec7nh:<\/p>\n<pre>dmidecode -t system | grep -E \"Manufacturer|Product\"<\/pre>\n<p>M\u1ed9t s\u1ed1 v\u00ed d\u1ee5 hi\u1ec3n th\u1ecb.<\/p>\n<pre>[VMware Workstation]\r\n# dmidecode -s system-manufacturer\r\nVMware, Inc.\r\n\r\n# dmidecode -s system-product-name\r\nVMware Virtual Platform\r\n\r\n[VirtualBox]\r\n$ sudo dmidecode -s system-product-name\r\nVirtualBox\r\n\r\n[OpenStack]\r\n$ sudo dmidecode -s system-product-name\r\nOpenStack Nova\r\n\r\n[Physical Server]\r\n# dmidecode -s system-manufacturer\r\nIBM\r\n\r\n# dmidecode -s system-product-name\r\nSystem x3550 M2 -[7284AC1]-\r\n[VPS KVM]\r\ndmidecode -t system | grep -E \"Manufacturer|Product\"\r\n<span class=\"crayon-v\">Manufacturer<\/span><span class=\"crayon-o\">:<\/span> <span class=\"crayon-e\">QEMU\r\n<\/span><span class=\"crayon-e\">Product <\/span><span class=\"crayon-v\">Name<\/span><span class=\"crayon-o\">:<\/span> <span class=\"crayon-e\">Standard <\/span><span class=\"crayon-e\">PC<\/span> <span class=\"crayon-sy\">(<\/span><span class=\"crayon-v\">i440FX<\/span> <span class=\"crayon-o\">+<\/span> <span class=\"crayon-v\">PIIX<\/span><span class=\"crayon-sy\">,<\/span> <span class=\"crayon-cn\">1996<\/span><span class=\"crayon-sy\">)<\/span><\/pre>\n<p>&nbsp;<\/p>\n<h4 id=\"C\u00e1ch-2_:_S\u1eed_d\u1ee5ng_l\u1ec7nh_lshw\">C\u00e1ch-2 : S\u1eed d\u1ee5ng l\u1ec7nh lshw<\/h4>\n<p>M\u1ed9t s\u1ed1 v\u00ed d\u1ee5:<\/p>\n<p>L\u1ec7nh lshw\u00a0 \u0111\u1ed1i v\u1edbi VPS\u00a0 VMware Workstation<\/p>\n<pre># lshw -class system\r\n2daygeek\r\n    description: Computer\r\n    product: VMware Virtual Platform ()\r\n    vendor: VMware, Inc.\r\n    version: None\r\n    serial: VMware-42 0a a0 62 85 7e 8d 48-f2 8f 15 5a aa 7f 77 95\r\n    width: 64 bits\r\n    capabilities: smbios-2.4 dmi-2.4 vsyscall32\r\n    configuration: administrator_password=enabled boot=normal frontpanel_password=unknown keyboard_password=unknown power-on_password=disabled uuid=420AA062-857E-8D48-F28F-155AAA7F7795\r\n  *-remoteaccess UNCLAIMED\r\n       vendor: Intel\r\n       physical id: 1\r\n       capabilities: inbound\r\n\r\n[Alternatively use lshw command to print only product]\r\n# lshw -class system | grep product\r\nproduct: VMware Virtual Platform ()\r\n<\/pre>\n<p>L\u1ec7nh lshw\u00a0 \u0111\u1ed1i v\u1edbi VPS VirtualBox<\/p>\n<pre>$ sudo lshw -class system\r\ndaygeek                     \r\n    description: Computer\r\n    product: VirtualBox\r\n    vendor: innotek GmbH\r\n    version: 1.2\r\n    serial: 0\r\n    width: 64 bits\r\n    capabilities: smbios-2.5 dmi-2.5 smp vsyscall32\r\n    configuration: family=Virtual Machine uuid=762A99BF-6916-450F-80A6-B2E9E78FC9A1\r\n\r\n[Alternatively use lshw command to print only product]\r\n# lshw -class system | grep product | awk '{print $2}'\r\nVirtualBox\r\n<\/pre>\n<p>L\u1ec7nh lshw\u00a0 \u0111\u1ed1i v\u1edbi\u00a0 m\u00e1y ch\u1ee7 v\u1eadt l\u00fd<\/p>\n<pre># lshw -class system\r\n2daygeek\r\n    description: Blade\r\n    product: Flex System x240 Compute Node -[7284AC1]-\r\n    vendor: IBM\r\n    version: 06\r\n    serial: KQ3YZ9B\r\n    width: 64 bits\r\n    capabilities: smbios-2.7 dmi-2.7 vsyscall32\r\n    configuration: boot=normal chassis=enclosure family=System X uuid=8B57E5D1-7002-3F3C-8765-\r\n\r\n[Alternatively use lshw command to print only product]\r\n# lshw -class system | grep product\r\nproduct: Flex System x240 Compute Node -[7284AC1]-<\/pre>\n<p>&nbsp;<\/p>\n<h4 id=\"C\u00e1ch-3_:_S\u1eed_d\u1ee5ng_facter\">C\u00e1ch-3 : S\u1eed d\u1ee5ng facter<\/h4>\n<p>Facter l\u00e0 m\u1ed9t tool c\u01a1 b\u1ea3n tr\u00ean ruby \u0111\u01b0a ra th\u00f4ng tin v\u1ec1 sever c\u1ee7a b\u1ea1n.<\/p>\n<p>C\u00e0i \u0111\u1eb7t facter tr\u00ean centos: <strong>yum install -y facter<\/strong><\/p>\n<pre>[VMware Workstation]\r\n# facter virtual\r\nvmware\r\n\r\n[VirtualBox]\r\n$ facter virtual\r\nvirtualbox\r\n\r\n[Physical Server]\r\n# facter virtual\r\nphysical<\/pre>\n<p>&nbsp;<\/p>\n<h4 id=\"C\u00e1ch-4_:_Using_imvirt_Command\">C\u00e1ch-4 : Using imvirt Command<\/h4>\n<p>imvirt l\u00e0 m\u1ed9t t\u1eadp h\u1ee3p c\u00e1c m\u00f4-\u0111un Perl \u0111\u01b0\u1ee3c s\u1eed d\u1ee5ng \u0111\u1ec3 ph\u00e1t hi\u1ec7n h\u1ec7 th\u1ed1ng Linux l\u00e0 v\u1eadt l\u00fd hay \u1ea3o. N\u1ebfu n\u00f3 ph\u00e1t hi\u1ec7n ra r\u1eb1ng n\u00f3 l\u00e0 m\u1ed9t \u1ea3o h\u00f3a, th\u00ec n\u00f3 s\u1ebd c\u1ed1 g\u1eafng t\u00ecm ra c\u00f4ng ngh\u1ec7 \u1ea3o h\u00f3a n\u00e0o \u0111\u01b0\u1ee3c s\u1eed d\u1ee5ng.<\/p>\n<pre>[VMware Workstation]\r\n# imvirt\r\nVMware VMware ESX Server\r\n\r\n[VirtualBox]\r\n$ imvirt\r\nKVM\r\n\r\n[Physical Server]\r\n# imvirt\r\nPhysical\r\n<\/pre>\n<h4 id=\"C\u00e1ch-5_:_Using_virt-what_Command\">C\u00e1ch-5 : Using virt-what Command<\/h4>\n<p>N\u1ebfu virt-what ph\u00e1t hi\u1ec7n ra r\u1eb1ng n\u00f3 l\u00e0 m\u1ed9t \u1ea3o h\u00f3a, th\u00ec n\u00f3 s\u1ebd c\u1ed1 g\u1eafng t\u00ecm ra c\u00f4ng ngh\u1ec7 \u1ea3o h\u00f3a n\u00e0o \u0111\u01b0\u1ee3c s\u1eed d\u1ee5ng. n\u1ebfu kh\u00f4ng tr\u1ea3 v\u1ec1 gi\u00e1 tr\u1ecb n\u00e0o th\u00ec t\u1ee9c l\u00e0 m\u00e1y ch\u1ee7 v\u1eadt l\u00fd.<\/p>\n<p>C\u00e0i \u0111\u1eb7t,<\/p>\n<pre>Centos: yum install -y virt-what\r\nubuntu: apt-get install -y virt-what<\/pre>\n<pre>[VMware Workstation]\r\n# virt-what\r\nvmware\r\n\r\n[VirtualBox]\r\n$ sudo virt-what\r\nvirtualbox\r\nkvm\r\n\r\n[Physical Server]\r\n# virt-what\r\n<\/pre>\n<p>&nbsp;<\/p>\n<h4 id=\"C\u00e1ch-6_:_S\u1eed_d\u1ee5ng_l\u1ec7nh_hostnamectl\u00a0\"><span style=\"color: #1a1a1a; font-family: Nunito, sans-serif; font-size: 18px; background-color: #ffffff;\">C\u00e1ch-6 : S\u1eed d\u1ee5ng l\u1ec7nh hostnamectl\u00a0<\/span><\/h4>\n<p>C\u00f4ng c\u1ee5 hostnamectl \u0111\u01b0\u1ee3c cung c\u1ea5p \u0111\u1ec3 qu\u1ea3n tr\u1ecb t\u00ean m\u00e1y ch\u1ee7 h\u1ec7 th\u1ed1ng, b\u1ea1n c\u00f3 th\u1ec3 d\u1ee5ng l\u1ec7nh n\u00e0y \u0111\u1ec3 ki\u1ec3m tra.<\/p>\n<p><strong>VirtualBox Output<\/strong><\/p>\n<pre># hostnamectl\r\nor\r\n# hostnamectl status\r\n   Static hostname: daygeek\r\n         Icon name: computer-vm\r\n           Chassis: vm\r\n        Machine ID: c01b17d61f2542478047952180768c82\r\n           Boot ID: 8be91fafab024c5880581fb3968a22f8\r\n    Virtualization: oracle\r\n  Operating System: Ubuntu 16.10\r\n            Kernel: Linux 4.10.1-041001-generic\r\n      Architecture: x86-64\r\n<\/pre>\n<p><strong>Physical Output<\/strong><\/p>\n<pre># hostnamectl\r\nor\r\n# hostnamectl status\r\n   Static hostname: daygeek\r\n         Icon name: computer-laptop\r\n           Chassis: laptop\r\n        Machine ID: bb8348e0f32e495184590f98ce96ee62\r\n           Boot ID: 06ee2c95917744b9b23a2861a0a82abb\r\n  Operating System: Fedora 25 (Workstation Edition)\r\n       CPE OS Name: cpe:\/o:fedoraproject:fedora:25\r\n            Kernel: Linux 4.10.14-200.fc25.x86_64\r\n      Architecture: x86-64\r\n<\/pre>\n<h4 id=\"C\u00e1ch-7_:_S\u1eed_d\u1ee5ng_l\u1ec7nh_Dmesg\">C\u00e1ch-7 : S\u1eed d\u1ee5ng l\u1ec7nh Dmesg<\/h4>\n<p>B\u1ea1n c\u00f3 th\u1ec3 s\u1eed d\u1ee5ng Dmesg \u0111\u1ec3 ki\u1ec3m tra:<\/p>\n<pre>[VMware Workstation]\r\n# dmesg |grep DMI\r\n[    0.000000] DMI: VMware, Inc. VMware Virtual Platform\/440BX Desktop Reference Platform, BIOS 6.00 11\/02\/201\r\n\r\n[Physical Server]\r\n# dmesg |grep DMI\r\nDMI: IBM System x3650 M4: -[7915AC1]-\/00Y8494, BIOS -[VVE134MUS-1.50]- 18\/20\/2015\r\n\r\n[VirtualBox]\r\n# dmesg |grep DMI\r\n[    0.000000] DMI: innotek GmbH VirtualBox\/VirtualBox, BIOS VirtualBox 12\/01\/2006\r\n[KVM] \r\n# dmesg |grep DMI \r\n[    0.000000] DMI: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.11.1-0-g0551a4be2c-prebuilt.qemu-project.org 04\/01\/2014\r\n<\/pre>\n<h4 id=\"C\u00e1ch-8_:_s\u1eed_d\u1ee5ng_\/sys_file_system\">C\u00e1ch-8 : s\u1eed d\u1ee5ng \/sys file system<\/h4>\n<p>B\u1ea1n c\u00f3 th\u1ec3 s\u1eed d\u1ee5ng l\u1ec7nh nh\u01b0 sau:<\/p>\n<pre># grep \"\" \/sys\/class\/dmi\/id\/[pbs]*\r\n\/sys\/class\/dmi\/id\/bios_date:12\/01\/2006\r\n\/sys\/class\/dmi\/id\/bios_vendor:innotek GmbH\r\n\/sys\/class\/dmi\/id\/bios_version:VirtualBox\r\n\/sys\/class\/dmi\/id\/board_asset_tag:\r\n\/sys\/class\/dmi\/id\/board_name:VirtualBox\r\n\/sys\/class\/dmi\/id\/board_serial:0\r\n\/sys\/class\/dmi\/id\/board_vendor:Oracle Corporation\r\n\/sys\/class\/dmi\/id\/board_version:1.2\r\ngrep: \/sys\/class\/dmi\/id\/power: Is a directory\r\n\/sys\/class\/dmi\/id\/product_name:VirtualBox\r\n\/sys\/class\/dmi\/id\/product_serial:0\r\n\/sys\/class\/dmi\/id\/product_uuid:762A99BF-6916-450F-80A6-B2E9E78FC9A1\r\n\/sys\/class\/dmi\/id\/product_version:1.2\r\ngrep: \/sys\/class\/dmi\/id\/subsystem: Is a directory\r\n\/sys\/class\/dmi\/id\/sys_vendor:innotek GmbH\r\n<\/pre>\n<p>&nbsp;<\/p>\n<pre>[VMware]\r\n# cat \/sys\/class\/dmi\/id\/product_name\r\nVMware Virtual Platform\r\n\r\n[Physical Server]\r\n# cat \/sys\/class\/dmi\/id\/product_name\r\nSystem x3650 M4: -[7915AC1]-\r\n\r\n<\/pre>\n<h4 id=\"C\u00e1ch-9_:_S\u1eed_d\u1ee5ng_th\u01b0_vi\u1ec7n_proc\">C\u00e1ch-9 : S\u1eed d\u1ee5ng th\u01b0 vi\u1ec7n proc<\/h4>\n<p>&nbsp;<\/p>\n<p>B\u1ea1n \u0111\u1ecdc t\u1ea1i file : \/proc\/scsi\/scsi<\/p>\n<p><strong>VMware Output<\/strong><\/p>\n<pre># cat \/proc\/scsi\/scsi\r\nAttached devices:\r\nHost: scsi1 Channel: 00 Id: 00 Lun: 00\r\n  Vendor: NECVMWar Model: VMware IDE CDR10 Rev: 1.00\r\n  Type:   CD-ROM                           ANSI  SCSI revision: 05\r\nHost: scsi2 Channel: 00 Id: 00 Lun: 00\r\n  Vendor: VMware   Model: Virtual disk     Rev: 1.0\r\n  Type:   Direct-Access                    ANSI  SCSI revision: 02\r\n<\/pre>\n<p><strong>VirtualBox Output<\/strong><\/p>\n<pre># cat \/proc\/scsi\/scsi\r\nAttached devices:\r\nHost: scsi1 Channel: 00 Id: 00 Lun: 00\r\n  Vendor: VBOX     Model: CD-ROM           Rev: 1.0 \r\n  Type:   CD-ROM                           ANSI  SCSI revision: 05\r\nHost: scsi2 Channel: 00 Id: 00 Lun: 00\r\n  Vendor: ATA      Model: VBOX HARDDISK    Rev: 1.0 \r\n  Type:   Direct-Access                    ANSI  SCSI revision: 05\r\n<\/pre>\n<p><strong>QEMU Output (KVM)<\/strong><\/p>\n<pre># cat \/proc\/scsi\/scsi\r\nAttached devices:\r\nHost: scsi2 Channel: 00 Id: 00 Lun: 00\r\n  Vendor: QEMU     Model: QEMU HARDDISK    Rev: 2.3.\r\n  Type:   Direct-Access                    ANSI  SCSI revision: 05\r\n<\/pre>\n<p>&nbsp;<\/p>\n<pre># cat \/proc\/scsi\/scsi\r\nAttached devices:\r\nHost: scsi0 Channel: 02 Id: 00 Lun: 00\r\n  Vendor: IBM      Model: ServeRAID M5110e Rev: 3.24\r\n  Type:   Direct-Access                    ANSI  SCSI revision: 05\r\nHost: scsi0 Channel: 02 Id: 01 Lun: 00\r\n  Vendor: IBM      Model: ServeRAID M5110e Rev: 3.24\r\n  Type:   Direct-Access                    ANSI  SCSI revision: 05\r\nHost: scsi2 Channel: 00 Id: 00 Lun: 00\r\n  Vendor: IBM SATA Model:  DEVICE 81Y3672  Rev: SA82\r\n  Type:   CD-ROM                           ANSI  SCSI revision: 05\r\n<\/pre>\n<pre><\/pre>\n<h4 id=\"C\u00e1ch-10:_S\u1eed_d\u1ee5ng_l\u1ec7nh_lscpu\">C\u00e1ch-10: S\u1eed d\u1ee5ng l\u1ec7nh lscpu<\/h4>\n<p>B\u1ea1n c\u00f3 th\u1ec3 s\u1eed d\u1ee5ng l\u1ec7nh lscpu \u0111\u1ec3 hi\u1ec3n th\u1ecb c\u00e1c th\u00f4ng tin c\u01a1 b\u1ea3n c\u1ee7a m\u00e1y, nh\u01b0 th\u00f4ng tin OS, CPU &#8230;<\/p>\n<pre># lscpu\r\nArchitecture:          x86_64\r\nCPU op-mode(s):        32-bit, 64-bit\r\nByte Order:            Little Endian\r\nCPU(s):                1\r\nOn-line CPU(s) list:   0\r\nThread(s) per core:    1\r\nCore(s) per socket:    1\r\nSocket(s):             1\r\nNUMA node(s):          1\r\nVendor ID:             GenuineIntel\r\nCPU family:            6\r\nModel:                 60\r\nModel name:            Intel Core Processor (Haswell, no TSX)\r\nStepping:              1\r\nCPU MHz:               2399.996\r\nBogoMIPS:              4799.99\r\nVirtualization:        VT-x\r\nHypervisor vendor:     KVM\r\nVirtualization type:   full\r\nL1d cache:             32K\r\nL1i cache:             32K\r\nL2 cache:              4096K\r\nNUMA node0 CPU(s):     0\r\n\r\n[Alternatively use lshw command to print only product]\r\n# lscpu | grep Hypervisor\r\nHypervisor vendor:     KVM\r\n<\/pre>\n<h4 id=\"C\u00e1ch-11:_\u0111\u1ecdc\u00a0_Devices_File\">C\u00e1ch-11: \u0111\u1ecdc\u00a0 Devices File<\/h4>\n<p>B\u1ea1n c\u00f3 th\u1ec3 \u0111\u1ecdc file sau \u0111\u1ec3 bi\u1ebft th\u00f4ng tin VPS c\u1ee7a m\u00ecnh.<\/p>\n<pre>[VMware]\r\n# cat \/sys\/block\/sda\/device\/model\r\nVirtual disk\r\n\r\n[VirtualBox]\r\n# cat \/sys\/block\/sda\/device\/model\r\nVBOX HARDDISK   \r\n\r\n[OpenStack]\r\n# cat \/sys\/block\/sda\/device\/model\r\nQEMU HARDDISK\r\n\r\n[Pysical]\r\n# cat \/sys\/block\/sda\/device\/model\r\nServeRAID M5110e\r\n[KVM]\r\ncat \/sys\/block\/sda\/device\/model\r\nQEMU HARDDISK   \r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>C\u00e1ch 1: : s\u1eed d\u1ee5ng dmidecode\u00a0 command \u0110\u1ec3 \u0111\u01a1n gi\u1ea3n b\u1ea1n c\u00f3 th\u1ec3 s\u1eed d\u1ee5ng tr\u00ecnh dmidecode\u00a0b\u1eb1ng l\u1ec7nh: dmidecode -t system | grep -E &#8220;Manufacturer|Product&#8221; M\u1ed9t s\u1ed1 v\u00ed d\u1ee5 hi\u1ec3n th\u1ecb. [VMware Workstation] # dmidecode -s system-manufacturer VMware, Inc. # dmidecode -s system-product-name VMware Virtual Platform [VirtualBox] $ sudo dmidecode -s system-product-name VirtualBox [OpenStack] $ [&hellip;]<\/p>\n","protected":false},"author":7,"featured_media":16424,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","format":"standard","meta":{"footnotes":""},"tags":[],"ht_kb_category":[17],"class_list":["post-1929","ht_kb","type-ht_kb","status-publish","format-standard","has-post-thumbnail","hentry","ht_kb_category-huong-dan-ve-cloud-vps"],"_links":{"self":[{"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/ht_kb\/1929","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/ht_kb"}],"about":[{"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/comments?post=1929"}],"version-history":[{"count":0,"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/ht_kb\/1929\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/media\/16424"}],"wp:attachment":[{"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/media?parent=1929"}],"wp:term":[{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/tags?post=1929"},{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/ht_kb_category?post=1929"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}