虚拟化之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,是一种用图形记载信息的技术,最常见的是应用在手机应用上.用户通过手机摄像头扫描二维码或输入二维码 ...
随机推荐
- 考古备份:a.out文件ELF文件头中魔数的由来
来源: <程序员的自我修养>3.4节. 补充: http://wiki.osdev.org/ELF http://www.linux-mag.com/id/116/ http://en.w ...
- Android Bluetooth详解(Android英文文档相关译文)
一.Bluetooth Android平台包含了对Bluetooth协议栈的支持,允许机器通过Bluetooth设备进行无线数据交换.应用框架通过Android Bluetooth API访问Blue ...
- PHP使用mysqli操作MySQL数据库
PHP的 mysqli 扩展提供了其先行版本的所有功能,此外,由于 MySQL 已经是一个 具有完整特性的数据库服务器 , 这为PHP 又添加了一些新特性 . 而 mysqli 恰恰也支持了 这些新特 ...
- Cow Exhibition_背包(负数情况)
Description "Fat and docile, big and dumb, they look so stupid, they aren't much fun..." - ...
- HDU 3047
http://acm.hdu.edu.cn/showproblem.php?pid=3047 和hdu 3038以及poj那个食物链一样,都是带权并查集,此题做法和hdu 3038完全相同,具体操作看 ...
- WCF服务端行为的一些设置
[ServiceBehavior( InstanceContextMode = InstanceContextMode.Single, //表示所有的请求都用一个服务实例来处理 Concurren ...
- sprint计划会议
会议召开时间表 日期 时间 内容 05/09 21:00-22:00 讨论题目(未果) 05/10 21:00-21:30 确定题目(网络助手) 05/13 21:00-21:45 讨论软件页面设计 ...
- LeetCode Permutations II (全排列)
题意: 给出n个元素(可能有重复的),请产生出所有的全排列. 思路: 同版本1的有点不同,这次有可能含有重复的元素,很容易就TLE,节省时间才是关键点. 如果将一个序列中两个相同的元素交换,这个序列是 ...
- python 函数基础
定义: def intersect(seq1,seq2): res = [] for x in seq1: if x in seq2: res.append(x) yield res 运行效果 > ...
- AspxGridView
转:出处 http://i.cnblogs.com/EditPosts.aspx?opt=1 AspxGridView点滴 1:页码设置 <SettingsPager> & ...