Esxi下vm虛擬機器命令

Michael_DD發表於2014-12-08
Esxi下vm虛擬機器命令


簡單說,直接到 /bin 目錄和 /sbin  目錄查詢

/bin 目錄下,可以檢視到如下命令:
~ # cd /bin
/bin # ls -al
lrwxrwxrwx    1 root     root                 17 Feb 17  2012 vmware -> /sbin/vmkvsitools
-r-xr-xr-x    1 root     root               6076 Feb 17  2012 vmware-vimdump
-r-sr-xr-x    1 root     root           13050984 Feb 17  2012 vmx
-r-xr-xr-x    1 root     root              17793 Feb 17  2012 vmx-buildtype
-r-sr-xr-x    1 root     root           15035928 Feb 17  2012 vmx-debug
-r-sr-xr-x    1 root     root           13732576 Feb 17  2012 vmx-stats
/bin #

/sbin 目錄下,可以檢視到如下命令: (/sbin 目錄下比/bin 目錄下的命令多)

/sbin 和 /bin  區別:
/sbin :s就是Super User的意思,也就是說這裡存放的是一些系統管理員使用的系統管理程式。
/bin:bin是binary(二進位制)的縮寫。這個目錄是對UNIX系統習慣的沿襲,存放著使用者最經常使用的命令。

~ # cd /sbin
/sbin # ls -al
lrwxrwxrwx    1 root     root                 44 Feb 17  2012 vm-support -> /usr/lib/vmware/hostd/cgi-bin/vm-support.cgi
-r-xr-xr-x    1 root     root              17904 Feb 17  2012 vmcp
-r-xr-xr-x    1 root     root               9816 Feb 17  2012 vmdumper
-r--r--r--    1 root     root                483 Feb 17  2012 vmfs-support
-r-xr-xr-x    1 root     root              35740 Feb 17  2012 vmkbacktrace
-r-xr-xr-x    1 root     root               9716 Feb 17  2012 vmkchdev
-r-xr-xr-x    1 root     root              17976 Feb 17  2012 vmkdevmgr
-r-xr-xr-x    1 root     root             141524 Feb 17  2012 vmkdump_extract
-r-xr-xr-x    1 root     root              58872 Feb 17  2012 vmkerrcode
-r-xr-xr-x    1 root     root              22028 Feb 17  2012 vmkeventd
-r-xr-xr-x    1 root     root            2453680 Feb 17  2012 vmkfstools
-r-xr-xr-x    1 root     root            1409304 Feb 17  2012 vmkiscsi-tool
-r-xr-xr-x    1 root     root            1134200 Feb 17  2012 vmkiscsid
-r-xr-xr-x    1 root     root              13868 Feb 17  2012 vmkload_mod
-r-xr-xr-x    1 root     root              18044 Feb 17  2012 vmkmicrocode
-r-xr-xr-x    1 root     root              13912 Feb 17  2012 vmkmkdev
-r-xr-xr-x    1 root     root              22168 Feb 17  2012 vmkperf
-r-xr-xr-x    1 root     root              34292 Feb 17  2012 vmkping
-r-xr-xr-x    1 root     root               9772 Feb 17  2012 vmkramdisk
lrwxrwxrwx    1 root     root                 17 Feb 17  2012 vmksystemswap -> /sbin/vmkvsitools
-r-xr-xr-x    1 root     root              68084 Feb 17  2012 vmkvsitools
-r-xr-xr-x    1 root     root              17928 Feb 17  2012 vmtar
-r-xr-xr-x    1 root     root               2699 Feb 17  2012 vmware-autostart.sh
-r-xr-xr-x    1 root     root            1047452 Feb 17  2012 vmware-usbarbitrator
/sbin #


命令詳解:

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
vmcp
/sbin # vmcp --help
Usage: vmcp [-LcPepSh] [[-b] [-s ]] -i -o
        -L -- do not follow symbolic links                           
        -D -- do not quit on broken symbolic links                   
        -c -- do not clobber existing files                          
        -P -- do not create parent directories if they do not exist  
        -e -- ignore read errors (i.e. from proc files)              
        -p -- preserve owner, group, and permissions                 
        -h -- prints this message                                    
        -b -- copy the end of the file (specify size with -s )
        -s -- copy only KB of the file                 
        -i -- input file (Required)                             
        -o -- output file (Required)                            
                                                               
        Return values:                                               
         0: No errors                                 
         1: Usage error                               
         2: Non-existent input file                   
         3: Non-critical error (doesn't cause exit)   
         4: Copy failed for a file or directory       
         5: Write failed                              
         6: Something serious failed  

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
vmdumper
/sbin # vmdumper --help
vmdumper: [options]
         -f: ignore vsi version check
         -h: print friendly help message
         -l: print information about running VMs
         -g: log specified text to the vmkernel log

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
vmfs-support

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
vmkbacktrace

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
vmkchdev

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
vmkdevmgr

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
vmkdump_extract

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
vmkerrcode

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
vmkeventd

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
vmkfstools
/sbin # vmkfstools --help

OPTIONS FOR FILE SYSTEMS:

vmkfstools -C --createfs [vmfs3|vmfs5]
               -b --blocksize #[mMkK]
               -S --setfsname fsName
           -Z --spanfs span-partition
           -G --growfs grown-partition
   deviceName

           -P --queryfs -h --humanreadable
           -T --upgradevmfs
   vmfsPath

OPTIONS FOR VIRTUAL DISKS:

vmkfstools -c --createvirtualdisk #[gGmMkK]
               -d --diskformat [zeroedthick|
                                thin|
                                eagerzeroedthick]
               -a --adaptertype [buslogic|lsilogic|ide]
           -w --writezeros
           -j --inflatedisk
           -k --eagerzero
           -K --punchzero
           -U --deletevirtualdisk
           -E --renamevirtualdisk srcDisk
           -i --clonevirtualdisk srcDisk
               -d --diskformat [zeroedthick|
                                thin|
                                eagerzeroedthick|
                                rdm:|rdmp:|
                                2gbsparse]
               -N --avoidnativeclone
           -X --extendvirtualdisk #[gGmMkK]
               [-d --diskformat eagerzeroedthick]
           -M --migratevirtualdisk
           -r --createrdm /vmfs/devices/disks/...
           -q --queryrdm
           -z --createrdmpassthru /vmfs/devices/disks/...
           -v --verbose #
           -g --geometry
           -I --snapshotdisk srcDisk
           -x --fix [check|repair]
           -e --chainConsistent
   vmfsPath

OPTIONS FOR DEVICES:

           -L --lock [reserve|release|lunreset|targetreset|busreset|readkeys|readresv] /vmfs/devices/disks/...
           -B --breaklock /vmfs/devices/disks/...

vmkfstools -H --help

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
vmkiscsi-tool

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
vmkiscsid

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
vmkload_mod

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
vmkmicrocode

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
vmkmkdev

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
vmkperf

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
vmkping

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
vmkramdisk

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
vmksystemswap -> /sbin/vmkvsitools

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
vmkvsitools

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
vmtar

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
vmware-autostart.sh

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
vmware-usbarbitrator

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29500582/viewspace-1360887/,如需轉載,請註明出處,否則將追究法律責任。

相關文章