2014年(3)
分类: 虚拟化
2014-11-25 20:57:34
在管理vSphere设备时,除了可以使用图形界面外,还可以使用vSphere命令行。vSphere官方文档介绍如下:
vSphere supports several command-line interfaces for managing your virtual infrastructure including the vSphere Command-Line Interface (vCLI), a set of ESXi Shell commands, and PowerCLI. You can choose the CLI set best suited for your needs, and write scripts to automate your CLI tasks.
点击
意思是说vSphere支持几种命令行交互界面,包括vSphere Command-Line Interface (vCLI),ESXi Shell命令集和PowerCLI。你可以选择合适的命令写成脚本来自动执行任务。
- ~ # esxcli fcoe
- Usage: esxcli fcoe {cmd} [cmd options]
- Available Namespaces:
- adapter Operations that can be performed on FCOE-type storage HBAs
- nic Operations that can be performed on FCOE-capable CNA devices
- ~ # esxcli fcoe adapter
- Usage: esxcli fcoe adapter {cmd} [cmd options]
- Available Commands:
- list List FCOE-capable CNA devices.
- ~ # esxcli fcoe nic
- Usage: esxcli fcoe nic {cmd} [cmd options]
- Available Commands:
- disable Disable rediscovery of FCOE storage on behalf of an FCOE-capable
- CNA upon next boot.
- discover Initiate FCOE adapter discovery on behalf of an FCOE-capable
- CNA.
- list List FCOE-capable CNA devices.
- ~ #
- ~ # esxcli hardware cpu
- Usage: esxcli hardware cpu {cmd} [cmd options]
- Available Namespaces:
- cpuid Information from the CPUID instruction on each CPU.
- global Information and configuration global to all CPUs.
- Available Commands:
- list List all of the CPUs on this host. \\查看cpu的详细信息
- ~ # esxcli hardware bootdevice
- Usage: esxcli hardware bootdevice {cmd} [cmd options]
- Available Commands:
- list List the boot device order, if available, for this host.
- ~ #
- ~ # esxcli hardware clock
- Usage: esxcli hardware clock {cmd} [cmd options]
- Available Commands:
- get Disply the current hardware clock time.
- set Set the hardware clock time. Any missing parameters will default
- to the current time.
- ~ #
- ~ # esxcli hardware memory
- Usage: esxcli hardware memory {cmd} [cmd options]
- Available Commands:
- get Get information about memory.
- ~ # esxcli hardware memory get
- Physical Memory: 4294430720 Bytes
- NUMA Node Count: 1
- ~ #
- ~ # esxcli hardware pci
- Usage: esxcli hardware pci {cmd} [cmd options]
- Available Commands:
- list List all of the PCI devices on this host.
- ~ #
- ~ # esxcli hardware platform
- Usage: esxcli hardware platform {cmd} [cmd options]
- Available Commands:
- get Get information about the platform
- ~ # esxcli hardware platform get
- Platform Information
- UUID: 0x56 0x4d 0xda 0x14 0xe6 0x33 0x26 0xbe 0xf1 0x4c 0x77 0x56 0xe2 0x50 0x40 0x60
- Product Name: VMware Virtual Platform
- Vendor Name: VMware, Inc.
- Serial Number: VMware-56 4d da 14 e6 33 26 be-f1 4c 77 56 e2 50 40 60
- IPMI Supported: false
- ~ #
- ~ # esxcli network fence
- Usage: esxcli network fence {cmd} [cmd options]
- Available Namespaces:
- network Commands to list fence network information
- Available Commands:
- list Get all fence switch info on the system.
- ~ # esxcli network fence network
- Usage: esxcli network fence network {cmd} [cmd options]
- Available Namespaces:
- bte Commands to list fence network bte information
- port Commands to list fence network port information
- Available Commands:
- list Get all fence network info on the vds.
- ~ # esxcli network fence list
- ~ #