虚拟化之esxi命令行管理之二
/vmfs # ls -l
lrwxrwxrwx 1 root root 4 Mar 23 2013 devices -> /dev
drwxr-xr-x 1 root root 512 Sep 21 03:29 volumes
/vmfs # cd volumes/
/vmfs/volumes # ls -l
drwxr-xr-x 1 root root 8 Jan 1 1970 537e35f7-f37c1097-6876-00e04c21c7a5
drwxr-xr-t 1 root root 3640 Sep 17 08:53 537e3601-83e8ce86-8c6f-00e04c21c7a5
drwxr-xr-x 1 root root 8 Jan 1 1970 537e3602-57ab150e-12ac-00e04c21c7a5
drwxr-xr-x 1 root root 8 Jan 1 1970 76bb5275-c62f6af6-c490-8b76701604db
lrwxr-xr-x 1 root root 35 Sep 21 03:29 datastore1 -> 537e3601-83e8ce86-8c6f-00e04c21c7a5
drwxr-xr-x 1 root root 8 Jan 1 1970 e1569476-ffac720f-793a-42482c57cdc3
/vmfs/volumes # cd datastore1/
/vmfs/volumes/537e3601-83e8ce86-8c6f-00e04c21c7a5 # ls -l
drwxr-xr-x 1 root root 420 May 11 00:58 123-converter
-rw------- 1 root root 417333248 Jun 24 2014 CentOS-6.5-x86_64-minimal.iso
-rw------- 1 root root 226224128 Aug 21 2014 FreeNAS-9.2.1.5-RELEASE-x64.iso
drwxr-xr-x 1 root root 560 Jul 15 2014 centos-6.5
drwxr-xr-x 1 root root 1120 Jul 15 2014 centos-min-6.5-64
drwxr-xr-x 1 root root 2660 Aug 31 12:34 cs
-rw------- 1 root root 78198784 Jun 11 2014 hsrouter_V8.0_Build20131022.iso
-rw------- 1 root root 1285396902 Nov 3 2014 linux_11gR2_database_1of2.zip
-rw------- 1 root root 995359177 Nov 3 2014 linux_11gR2_database_2of2.zip
drwxr-xr-x 1 root root 2800 Sep 17 08:50 mec
drwxr-xr-x 1 root root 3220 Sep 1 01:56 mrtg
drwxr-xr-x 1 root root 2240 Nov 3 2014 oracle-shiyan
drwxr-xr-x 1 root root 1260 Aug 14 2014 ori
drwxr-xr-x 1 root root 2100 Sep 17 09:29 test1
-rw------- 1 root root 630237184 Aug 21 2014 windows_cn_xp_sp3.iso /dev/disks # ls
t10.ATA_____ST500DM0022D1BD142___________________________________Z3TFY6H0 vml.01000000002020202020202020202020205a33544659364830535435303044
t10.ATA_____ST500DM0022D1BD142___________________________________Z3TFY6H0:1 vml.01000000002020202020202020202020205a33544659364830535435303044:1
t10.ATA_____ST500DM0022D1BD142___________________________________Z3TFY6H0:2 vml.01000000002020202020202020202020205a33544659364830535435303044:2
t10.ATA_____ST500DM0022D1BD142___________________________________Z3TFY6H0:3 vml.01000000002020202020202020202020205a33544659364830535435303044:3
t10.ATA_____ST500DM0022D1BD142___________________________________Z3TFY6H0:5 vml.01000000002020202020202020202020205a33544659364830535435303044:5
t10.ATA_____ST500DM0022D1BD142___________________________________Z3TFY6H0:6 vml.01000000002020202020202020202020205a33544659364830535435303044:6
t10.ATA_____ST500DM0022D1BD142___________________________________Z3TFY6H0:7 vml.01000000002020202020202020202020205a33544659364830535435303044:7
t10.ATA_____ST500DM0022D1BD142___________________________________Z3TFY6H0:8 vml.01000000002020202020202020202020205a33544659364830535435303044:8
/dev/disks # ls -l
-rw------- 1 root root 500107862016 Sep 21 03:24 t10.ATA_____ST500DM0022D1BD142___________________________________Z3TFY6H0
-rw------- 1 root root 4161536 Sep 21 03:24 t10.ATA_____ST500DM0022D1BD142___________________________________Z3TFY6H0:1
-rw------- 1 root root 4293918720 Sep 21 03:24 t10.ATA_____ST500DM0022D1BD142___________________________________Z3TFY6H0:2
-rw------- 1 root root 494870208000 Sep 21 03:24 t10.ATA_____ST500DM0022D1BD142___________________________________Z3TFY6H0:3
-rw------- 1 root root 262127616 Sep 21 03:24 t10.ATA_____ST500DM0022D1BD142___________________________________Z3TFY6H0:5
-rw------- 1 root root 262127616 Sep 21 03:24 t10.ATA_____ST500DM0022D1BD142___________________________________Z3TFY6H0:6
-rw------- 1 root root 115326976 Sep 21 03:24 t10.ATA_____ST500DM0022D1BD142___________________________________Z3TFY6H0:7
-rw------- 1 root root 299876352 Sep 21 03:24 t10.ATA_____ST500DM0022D1BD142___________________________________Z3TFY6H0:8
lrwxrwxrwx 1 root root 73 Sep 21 03:24 vml.01000000002020202020202020202020205a33544659364830535435303044 -> t10.ATA_____ST500DM0022D1BD142___________________________________Z3TFY6H0
lrwxrwxrwx 1 root root 75 Sep 21 03:24 vml.01000000002020202020202020202020205a33544659364830535435303044:1 -> t10.ATA_____ST500DM0022D1BD142___________________________________Z3TFY6H0:1
lrwxrwxrwx 1 root root 75 Sep 21 03:24 vml.01000000002020202020202020202020205a33544659364830535435303044:2 -> t10.ATA_____ST500DM0022D1BD142___________________________________Z3TFY6H0:2
lrwxrwxrwx 1 root root 75 Sep 21 03:24 vml.01000000002020202020202020202020205a33544659364830535435303044:3 -> t10.ATA_____ST500DM0022D1BD142___________________________________Z3TFY6H0:3
lrwxrwxrwx 1 root root 75 Sep 21 03:24 vml.01000000002020202020202020202020205a33544659364830535435303044:5 -> t10.ATA_____ST500DM0022D1BD142___________________________________Z3TFY6H0:5
lrwxrwxrwx 1 root root 75 Sep 21 03:24 vml.01000000002020202020202020202020205a33544659364830535435303044:6 -> t10.ATA_____ST500DM0022D1BD142___________________________________Z3TFY6H0:6
lrwxrwxrwx 1 root root 75 Sep 21 03:24 vml.01000000002020202020202020202020205a33544659364830535435303044:7 -> t10.ATA_____ST500DM0022D1BD142___________________________________Z3TFY6H0:7
lrwxrwxrwx 1 root root 75 Sep 21 03:24 vml.01000000002020202020202020202020205a33544659364830535435303044:8 -> t10.ATA_____ST500DM0022D1BD142___________________________________Z3TFY6H0:8 ~ # partedUtil getptbl /vmfs/devices/disks/t10.ATA_____ST500DM0022D1BD142___________________________________Z3TFY6H0
gpt
60801 255 63 976773168
1 64 8191 C12A7328F81F11D2BA4B00A0C93EC93B systemPartition 128
5 8224 520191 EBD0A0A2B9E5443387C068B6B72699C7 linuxNative 0
6 520224 1032191 EBD0A0A2B9E5443387C068B6B72699C7 linuxNative 0
7 1032224 1257471 9D27538040AD11DBBF97000C2911D1B8 vmkDiagnostic 0
8 1257504 1843199 EBD0A0A2B9E5443387C068B6B72699C7 linuxNative 0
2 1843200 10229759 EBD0A0A2B9E5443387C068B6B72699C7 linuxNative 0
3 10229760 976773134 AA31E02A400F11DB9590000C2911D1B8 vmfs 0
~ # partedUtil get /vmfs/devices/disks/t10.ATA_____ST500DM0022D1BD142___________________________________Z3TFY6H0
60801 255 63 976773168
1 64 8191 0 128
5 8224 520191 0 0
6 520224 1032191 0 0
7 1032224 1257471 0 0
8 1257504 1843199 0 0
2 1843200 10229759 0 0
3 10229760 976773134 0 0
~ # partedUtil showGuids
Partition Type GUID
vmfs AA31E02A400F11DB9590000C2911D1B8
vmkDiagnostic 9D27538040AD11DBBF97000C2911D1B8
vsan 381CFCCC728811E092EE000C2911D0B2
VMware Reserved 9198EFFC31C011DB8F78000C2911D1B8
Basic Data EBD0A0A2B9E5443387C068B6B72699C7
Linux Swap 0657FD6DA4AB43C484E50933C84B4F4F
Linux Lvm E6D6D379F50744C2A23C238F2A3DF928
Linux Raid A19D880F05FC4D3BA006743F0F84911E
Efi System C12A7328F81F11D2BA4B00A0C93EC93B
Microsoft Reserved E3C9E3160B5C4DB8817DF92DF00215AE
Unused Entry 00000000000000000000000000000000
~ # esxcli storage core adapter list
HBA Name Driver Link State UID Description
-------- --------- ---------- ------------- --------------------------------------------------------------------
vmhba0 ata_piix link-n/a sata.vmhba0 (0:0:31.2) Intel Corporation Cougar Point 4 port SATA IDE Controller
vmhba1 ata_piix link-n/a sata.vmhba1 (0:0:31.5) Intel Corporation Cougar Point 2 port SATA IDE Controller
vmhba32 ata_piix link-n/a sata.vmhba32 (0:0:31.2) Intel Corporation Cougar Point 4 port SATA IDE Controller
vmhba33 ata_piix link-n/a sata.vmhba33 (0:0:31.5) Intel Corporation Cougar Point 2 port SATA IDE Controller
vmhba34 iscsi_vmk online iscsi.vmhba34 iSCSI Software Adapter
~ # esxcli storage core adapter stats get
vmhba0
Successful Commands: 0
Blocks Read: 0
Blocks Written: 0
Read Operations: 0
Write Operations: 0
Reserve Operations: 0
Reservation Conflicts: 0
Failed Commands: 256
Failed Blocks Read: 0
Failed Blocks Written: 0
Failed Read Operations: 0
Failed Write Operations: 0
Failed Reserve Operations: 0
Total Splits: 0
PAE Commands: 0
~ # esxcli storage core device vaai status get
t10.ATA_____ST500DM0022D1BD142___________________________________Z3TFY6H0
VAAI Plugin Name:
ATS Status: unsupported
Clone Status: unsupported
Zero Status: supported
Delete Status: unsupported
~ # esxcli storage core device partition list
Device Partition Start Sector End Sector Type Size
------------------------------------------------------------------------- --------- ------------ ---------- ---- ------------
t10.ATA_____ST500DM0022D1BD142___________________________________Z3TFY6H0 0 0 976773168 0 500107862016
t10.ATA_____ST500DM0022D1BD142___________________________________Z3TFY6H0 1 64 8192 0 4161536
t10.ATA_____ST500DM0022D1BD142___________________________________Z3TFY6H0 2 1843200 10229760 6 4293918720
t10.ATA_____ST500DM0022D1BD142___________________________________Z3TFY6H0 3 10229760 976773135 fb 494870208000
t10.ATA_____ST500DM0022D1BD142___________________________________Z3TFY6H0 5 8224 520192 6 262127616
t10.ATA_____ST500DM0022D1BD142___________________________________Z3TFY6H0 6 520224 1032192 6 262127616
t10.ATA_____ST500DM0022D1BD142___________________________________Z3TFY6H0 7 1032224 1257472 fc 115326976
t10.ATA_____ST500DM0022D1BD142___________________________________Z3TFY6H0 8 1257504 1843200 6 299876352
~ # esxcli storage core device partition showguid
Device Partition Layout GUID
------------------------------------------------------------------------- --------- ------ --------------------------------
t10.ATA_____ST500DM0022D1BD142___________________________________Z3TFY6H0 0 GPT 00000000000000000000000000000000
t10.ATA_____ST500DM0022D1BD142___________________________________Z3TFY6H0 1 GPT c12a7328f81f11d2ba4b00a0c93ec93b
t10.ATA_____ST500DM0022D1BD142___________________________________Z3TFY6H0 2 GPT ebd0a0a2b9e5443387c068b6b72699c7
t10.ATA_____ST500DM0022D1BD142___________________________________Z3TFY6H0 3 GPT aa31e02a400f11db9590000c2911d1b8
t10.ATA_____ST500DM0022D1BD142___________________________________Z3TFY6H0 5 GPT ebd0a0a2b9e5443387c068b6b72699c7
t10.ATA_____ST500DM0022D1BD142___________________________________Z3TFY6H0 6 GPT ebd0a0a2b9e5443387c068b6b72699c7
t10.ATA_____ST500DM0022D1BD142___________________________________Z3TFY6H0 7 GPT 9d27538040ad11dbbf97000c2911d1b8
t10.ATA_____ST500DM0022D1BD142___________________________________Z3TFY6H0 8 GPT ebd0a0a2b9e5443387c068b6b72699c7
~ # esxcli storage core plugin list
Plugin name Plugin class
----------- ------------
NMP MP
~ # esxcli storage vmfs extent list
Volume Name VMFS UUID Extent Number Device Name Partition
----------- ----------------------------------- ------------- ------------------------------------------------------------------------- ---------
datastore1 537e3601-83e8ce86-8c6f-00e04c21c7a5 0 t10.ATA_____ST500DM0022D1BD142___________________________________Z3TFY6H0 3 ~ # esxcli storage filesystem list
Mount Point Volume Name UUID Mounted Type Size Free
------------------------------------------------- ----------- ----------------------------------- ------- ------ ------------ -----------
/vmfs/volumes/537e3601-83e8ce86-8c6f-00e04c21c7a5 datastore1 537e3601-83e8ce86-8c6f-00e04c21c7a5 true VMFS-5 494726545408 72710356992
/vmfs/volumes/537e3602-57ab150e-12ac-00e04c21c7a5 537e3602-57ab150e-12ac-00e04c21c7a5 true vfat 4293591040 4256366592
/vmfs/volumes/76bb5275-c62f6af6-c490-8b76701604db 76bb5275-c62f6af6-c490-8b76701604db true vfat 261853184 125140992
/vmfs/volumes/e1569476-ffac720f-793a-42482c57cdc3 e1569476-ffac720f-793a-42482c57cdc3 true vfat 261853184 109809664
/vmfs/volumes/537e35f7-f37c1097-6876-00e04c21c7a5 537e35f7-f37c1097-6876-00e04c21c7a5 true vfat 299712512 84123648
~ # esxcli vm process list
mrtg
World ID: 37586
Process ID: 0
VMX Cartel ID: 37584
UUID: 56 4d 21 8b 6a 26 87 8f-2e 5f f9 6f d1 1b 40 74
Display Name: mrtg
Config File: /vmfs/volumes/537e3601-83e8ce86-8c6f-00e04c21c7a5/mrtg/mrtg.vmx test1
World ID: 1039588
Process ID: 0
VMX Cartel ID: 1039587
UUID: 56 4d 52 a8 4a 48 f7 4e-ff c8 48 6e 5a 60 25 dc
Display Name: test1
Config File: /vmfs/volumes/537e3601-83e8ce86-8c6f-00e04c21c7a5/test1/test1.vmx cs
World ID: 3688
Process ID: 0
VMX Cartel ID: 3678
UUID: 42 25 49 7d 81 55 c1 85-9a 36 00 94 30 e1 d1 4c
Display Name: cs
Config File: /vmfs/volumes/537e3601-83e8ce86-8c6f-00e04c21c7a5/cs/cs.vmx
~ # esxcli vm process list
查看虚拟机
~ # vim-cmd vmsvc/getallvms
启动虚拟机
~ # vim-cmd vmsvc/power.on 39 1. 使用如下命令获取正在运行的虚拟机清单,该清单由VMID、Display Name和 .vmx 配置文件所在路径构成:
#vim-cmd vmsvc/getallvms
2. 获取虚拟机的当前状态:
#vim-cmd vmsvc/power.getstate VMID
3. 使用第2步获取的VMID 来关闭虚拟机:
#vim-cmd vmsvc/power.shutdown VMID
Note: 如果虚拟机还是不能关闭,请尝试以下命令:
#vim-cmd vmsvc/power.off VMID
虚拟化之esxi命令行管理之二的更多相关文章
- 虚拟化之esxi命令行管理
Vmware PowerCLI和Vmware CLI vMA A Linux virtual appliance that includes the vSphere SDK for Perl and ...
- openstack 命令行管理 - 目录
原文http://blog.csdn.net/signmem/article/details/19513775 相关 openstack 命令行管理, 分下面部分进行介绍 openstack 命令行 ...
- ElasticSearch 命令行管理工具Curator
一.背景 elastic官网现在已经大面积升级到了5.x版本,然而针对elasticsearch的命令行管理工具curator现在仍然是4.0版本. 刚开始找到此工具,深深的怕因为版本更迭无法使用,还 ...
- 原创:vsphere概念深入系列三:vSphere命令行管理
假设无法近距离接触物理主机,只能远程命令行管理,. 以下命令行可以起到点作用. 首先需要安装vSphere CLI工具. 启动后界面: 1.查看datastore内容 所有命令行工具都可以加上-ser ...
- virsh命令行管理工具
virsh命令行管理工具 Libvirt有两种控制方式,命令行和图形界面 图形界面: 通过执行名virt-manager,启动libvirt的图形界面,在图形界面下可以一步一步的创建虚拟机,管理虚拟机 ...
- 玩转Windows服务系列——命令行管理Windows服务
说到Windows服务的管理就不得不说通过命令行的方式管理Windows服务,因为无论是系统管理员,还是通过编程的方式调用cmd命令,命令行都是非常方便以及强大的工具. 接下来就看一下如何通过cmd命 ...
- 玩转Windows服务系列——命令行管理Windows服务
原文:玩转Windows服务系列——命令行管理Windows服务 说到Windows服务的管理就不得不说通过命令行的方式管理Windows服务,因为无论是系统管理员,还是通过编程的方式调用cmd命令, ...
- IIS命令行管理工具使用
AppCmd.exe工具所在目录 C:\windows\sytstem32\inetsrv\目录下 一条命令批量添加应用程序 c:\Windows\System32\inetsrv>for /d ...
- QrenCode : 命令行下生成二维码图片
对于二维码大家应该并不陌生,英文名为 2-dimensional bar code 或 QR Code,是一种用图形记载信息的技术,最常见的是应用在手机应用上.用户通过手机摄像头扫描二维码或输入二维码 ...
随机推荐
- Interview----求 1+2+...+n, 不能用乘除法、for、while if、else、switch、case 等关键字以及条件判断语句 (A?B:C)
题目描述: 求 1+2+...+n, 要求不能使用乘除法.for.while.if.else.switch.case 等关键字以及条件判断语句 (A?B:C). 分析: 首先想到的是写递归函数,但是遇 ...
- Js的 "继承"
Js 和 Java , C等语言不是很一样 . 其他语言有 类和实例 但是Js就比较特殊 , 所以 类和实例 只能说是大多数面向对象编程的语言的基本概念 . Js比较特殊 , 它不去分类和实例的概念 ...
- BZOJ 1568 Blue Mary开公司
李超线段树. GTMD调了一下午... #include<iostream> #include<cstdio> #include<cstring> #include ...
- HDU5763 another meaning -(KMP+DP)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5763 思路:dp[i]表示前i个字符组成的字符串所表示的意思数量,则当匹配时dp[i]=dp[i-1] ...
- [转]浅谈https\ssl\数字证书
浅谈https\ssl\数字证书 http://www.cnblogs.com/P_Chou/archive/2010/12/27/https-ssl-certification.html 全球可信的 ...
- hadoop权威指南 读书笔记
1 数据库和MapReduce对比 2 hadoop 包含的内容
- 一直纠结中的"底层模板"含义(借鉴)
无意间看到这个解释,推荐给哪些和我一样迷惑的人!
- 2016-2017 ACM-ICPC, NEERC, Southern Subregional Contest (Online Mirror, ACM-ICPC Rules, Teams Preferred) G 优先队列
G. Car Repair Shop time limit per test 2 seconds memory limit per test 512 megabytes input standard ...
- Letter Combinations of a Phone Number
Given a digit string, return all possible letter combinations that the number could represent. A map ...
- Oracle数据库Linux下的导出EXP
先转一篇 ================================我是分割线================================ 时间:2013-06-22 13:48来源:未知 ...