VMware ESXi – Configure software iSCSI adapter via Command Line

VMware ESXi – Configure software iSCSI adapter via Command Line

I have rack server Dell PowerEdge with 4 port integrated NIC cards, while 2x ports is for VMs and Management, 1 port is dedicated for vMotion traffic and last 1 port i would like use for iSCSI. First of all, enable SSH service on your ESXi node and log on it (for example use my favourit client Putty).

  • VMkernel adapter for iSCSI is vmk2.
  • iSCSI targets are: 192.168.241.205 ; 206
# Enable software iSCSI adapter
esxcli iscsi software set --enabled=true
Software iSCSI Enabledesxcli iscsi adapter list

Adapter  Driver     State   UID            Description
-------  ---------  ------  -------------  ----------------------
vmhba38  iscsi_vmk  online  iscsi.vmhba38  iSCSI Software Adapter

# add iscsi adapter (requires at least one VMkernet NIC) 
esxcli iscsi networkportal add -n vmk2 -A vmhba38

# check iSCSI port bindings
 esxcli iscsi networkportal list
vmhba38
   Adapter: vmhba38
   Vmknic: vmk2
   MAC Address: b8:ca:3a:60:6c:b7
   MAC Address Valid: true
   IPv4: 192.168.241.22
   IPv4 Subnet Mask: 255.255.255.0
   IPv6: fe80::250:56ff:fe6b:155c/64
   MTU: 1500
   Vlan Supported: true
   Vlan ID: 31

# add dynamic discovery target (adds 204 and 205 on port 3260 and device vmhba39)
esxcli iscsi adapter discovery sendtarget add -a 192.168.241.204:3260 -A vmhba38 | esxcli iscsi adapter discovery sendtarget add -a 192.168.241.205:3260 -A vmhba38 

# after setup is complete, perform rediscovery and rescan all storage devcices
esxcli iscsi adapter discovery rediscover


 

(Visited 3 166 times, 1 visits today)

Napsat komentář

Vaše e-mailová adresa nebude zveřejněna. Vyžadované informace jsou označeny *