VMware Cloud Community
faster4233
Contributor
Contributor

Script asking for authentication??

Hi,

I'm trying to run a script using vMA to for the setup or our Equallogic SAN.  I'm trying to run the following script based on the example from Dell:

#!/bin/bash
#MPIO_Config.sh
echo "VM04 MPIO_Config Script.”

echo "Creating new vSwitch and Enabling Jumbo Frames"
esxcfg-vswitch –a vSwitch
esxcfg-vswitch –m 9000 vSwitch3

echo "Creating VMkernel Ports"
esxcfg-vswitch –A iSCSI1 vSwitch3
esxcfg-vmknic –a –i 172.18.0.41 –n 255.255.255.0 –m 9000 iSCSI1
esxcfg-vswitch –A iSCSI2 vSwitch3
esxcfg-vmknic –a –i 172.19.0.42 –n 255.255.255.0 –m 9000 iSCSI2

echo “Attaching NICs to vSwitch”
esxcfg-vswitch -L vmnic10 vSwitch3
esxcfg-vswitch -L vmnic11 vSwitch3

echo “Binding vmnics to VMkernel Ports”
esxcfg-vswitch –p iSCSI1 –N vmnic10 vSwitch3
esxcfg-vswitch –p iSCSI2 –N vmnic11 vSwitch3

echo “Binding VMkernel Ports to iSCSI Software Adapter”
esxcli swiscsi nic add –n vmk1 –d vmhba46
esxcli swiscsi nic add –n vmk2 –d vmhba46

The problem im getting is that the “Binding VMkernel Ports to iSCSI Software Adapter” section is requesting a username\password and i dont know what it wants.  I have tried the hosts root password, domain admin credentials and the vi-admin credentials but nothing works.  Does anyone have any idea what it wants?

Thanks for the help.

David

0 Kudos
2 Replies
lamw
Community Manager
Community Manager

If you are running the vCLI commands from vMA, you will need to specify the remote ESX(i) host including the username/password, this can be either "root" or some privileged that you can connect and make configuration changes.

From the looks of the script, they're expecting you to run this on the Service Console of ESX and/or Busybox Console of ESXi host and not via vMA. Can you confirm from Dell they do infact want you to execute this from vMA and not on the console directly?

faster4233
Contributor
Contributor

Hi,

Your post totally nudged my memory.  It is a CLI script but its meant to work with vMA. what i had forgotten is the manual states that i have to modify the problem lines for it to work properly.

esxcli has to be changed to point at the server on the problem part of the script.  So it should have read like the following.

echo “Binding VMkernel Ports to iSCSI Software Adapter”
esxcli --server x.x.x.x swiscsi nic add –n vmk1 –d vmhba46
esxcli --server x.x.x.x swiscsi nic add –n vmk2 –d vmhba46

Once changed it accepted the hosts admin credentials and worked perfectly.

thanks for the help.

David

0 Kudos