User Tools

Site Tools


os:esxi:cli

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Last revisionBoth sides next revision
os:esxi:cli [2015-07-25 23:07] rootos:esxi:cli [2015-07-27 21:23] root
Line 19: Line 19:
 </code> </code>
  
-===== Poweroff or kill a VM =====  +===== Poweroff or kill a VM =====
  
 **Attention**: This is a power off, not a guest shutdown. This is not the prefered way to shutdown your VM's. **Attention**: This is a power off, not a guest shutdown. This is not the prefered way to shutdown your VM's.
Line 61: Line 61:
 ~ # esxcli vm process kill --type=force --world-id=35930 ~ # esxcli vm process kill --type=force --world-id=35930
 </code> </code>
 +
 +
 +
 +===== Create logical RAID 1 drive with two new disk =====
 +
 +//Environment: HP Proliant MicroServer gen8 with ESXi 6.0.0 HP customized ISO//
 +
 +First, check if the system detected the new disks.
 +
 +<code>
 +~ # esxcli hpssacli cmd -q "ctrl slot=0 pd all show"
 +
 +Dynamic Smart Array B120i RAID in Slot 0 (Embedded)
 +
 +   array A
 +
 +      physicaldrive 3I:0:3 (port 3I:box 0:bay 3, SATA, 1500.3 GB, OK)
 +      physicaldrive 4I:0:4 (port 4I:box 0:bay 4, SATA, 1500.3 GB, OK)
 +
 +   unassigned
 +
 +      physicaldrive 1I:0:1 (port 1I:box 0:bay 1, SATA, 3 TB, OK)
 +      physicaldrive 2I:0:2 (port 2I:box 0:bay 2, SATA, 3 TB, OK)
 +
 +
 +</code>
 +
 +
 +In this example, there are two unassigned disks (1I:0:1,2I:0:2). With the following command, a new logical disk (array B) is created with this two disks in a RAID 1 mirror.
 +
 +<code>
 +~ # esxcli hpssacli cmd -q "ctrl slot=0 create type=ld drives=1I:0:1,2I:0:2 raid=1"
 +</code>
 +
 +The command above can be shortened because the two used disks are the only unassigned disks. The keyword **all** can be used instead of a list with the disks.
 +
 +<code>
 +~ # esxcli hpssacli cmd -q "ctrl slot=0 create type=ld drives=all raid=1"
 +</code>
 +
 +Now, the result can be checked.
 +
 +<code>
 +~ # esxcli hpssacli cmd -q "ctrl slot=0 pd all show"
 +
 +Dynamic Smart Array B120i RAID in Slot 0 (Embedded)
 +
 +   array A
 +
 +      physicaldrive 3I:0:3 (port 3I:box 0:bay 3, SATA, 1500.3 GB, OK)
 +      physicaldrive 4I:0:4 (port 4I:box 0:bay 4, SATA, 1500.3 GB, OK)
 +
 +   array B
 +
 +      physicaldrive 1I:0:1 (port 1I:box 0:bay 1, SATA, 3 TB, OK)
 +      physicaldrive 2I:0:2 (port 2I:box 0:bay 2, SATA, 3 TB, OK)
 +
 +
 +~ # esxcli hpssacli cmd -q "ctrl slot=0 ld all show"
 +
 +Dynamic Smart Array B120i RAID in Slot 0 (Embedded)
 +
 +   array A
 +
 +      logicaldrive 1 (1.4 TB, RAID 1, OK)
 +
 +   array B
 +
 +      logicaldrive 2 (2.7 TB, RAID 1, OK)
 +
 +
 +</code>
 +
os/esxi/cli.txt · Last modified: 2015-07-27 22:12 by root