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
Next revision
Previous revision
os:esxi:cli [2015-07-25 23:07] rootos:esxi:cli [2015-07-27 22:12] (current) 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>
 +
 +
 +===== Label new volume =====
 +
 +I added two disks to my ESXi which were used in my NAS before. I created a new array on the controller, started a rescan and tried to add new storage. The volume was listed but when I got ahead I got the following error:
 +
 +<code>
 +Call "HostDatastoreSystem.QueryVmfsDatastoreCreateOptions" for object "ha-datastoresystem" on ESXi "my_host" failed.
 +</code>
 +
 +It seems that the old partition table of my NAS annoys my ESXi host.
 +
 +Solution: relabel the device.
 +
 +The disk name is visible in the GUI.
 +
 +<code>
 +~ # partedUtil mklabel /vmfs/devices/disks/naa.600508b1001c73ca6d5fa78a068685e5 gpt
 +</code>
 +
os/esxi/cli.1437858442.txt.gz · Last modified: 2015-07-25 23:07 by root