Tag : vma

Powerchute Network Shutdown – ESXi/vMA install


1. Download VMA (vSphere Management Assistant)

1. Highlight VM Host> File> Deploy OVF Template> Browse to VMA Folder and Select the OVF> Next> Accept Licence> Next> Keep Default Disk Configuration> Next> Finish

1. This will create a new VM on the host.

1. Using the VIC attach a CD Drive to the VMA Virtual Machine

1. Start the Virtual Machine

1. Follow the Wizard (Default Option is show in Brackets)

Step1) Configure IP Address, Subnet, Gateway/DHCP or Static

Step2) Configure DNS Servers/DHCP or Static

Step3) Configure Hostname for the VIMA VM ie VIMA.domainname.local

Step 4) Confirm the settings

1. The VM will now apply the settings and restart the VM Network

1. Enter a password for the vi-admin account

1. Open a terminal emulation application such as Putty and Connect to the VIMA Vm using its IP Address on port 22 (SSH)

1. Login as vi-admin, using the password you created in the previous step

1. When you are connected you will be presented with a terminal.

Enter the following string into the terminal window

Vifp addserver “name of server” or “IP Address” (name of server preferred)

1. Enter the password for the host when prompted (Vmware Host Root User Password)

1.Enter the following string into the terminal window

Vifp listservers

1. This should return the IP Address and name of the Vmware Host that you just added

1.Enter the following string into the terminal window to enable FastPass to the Host

1. Vifptarget -s “SERVERNAME – Vmhost Server”

1. To confirm the above step has worked type

Vicfg-nics –l

This should return a list of NICS

1. Install the UPS, configure the Network management card and configure your settings with the UPS Management Console (browser)

1. Insert your media into the VMHost and attach it to the VMA Virtual Machine (ie CD)

1. Connect to the VMA management console via Terminal Emulator

1. Login to the Management Console

1. Create a mount point : sudo mkdir /mnt/cdrom

1. Change the permissions on the mount point: sudo chmod 666 /mnt/cdrom

Type: sudo mount –t iso9660 /dev/cdrom /mnt/cdrom

Type: cd /mnt/cdrom/ESXi

Type: sudo cp /etc/vma-release /etc/vima-release

Type: sudo ./install.sh

1. Accept the licence agreement

1. Press enter to keep default PowerChute Instance

1. Press enter to keep default installation directory

1. Confirm the installation

1. This will install the Java Runtime

1. Type: CD /opt /APC/PowerChute/group1Enter

1. Type: sudo ./PCNSConfig.sh

1. Enter your root Password

1. Select your UPS Configuration Option

1. Enter the Management Card IP Address

1. Select yes at the do you want to register these settings

1. Select Yes to starting the Powerchute Network Shutdown Service

1. You will then be show a configuration

  1. Download VMA (vSphere Management Assistant)
  1. Highlight VM Host> File> Deploy OVF Template> Browse to VMA Folder and Select the OVF> Next> Accept Licence> Next> Keep Default Disk Configuration> Next> Finish
  1. This will create a new VM on the host.
  1. Using the VIC attach a CD Drive to the VMA Virtual Machine
  1. Start the Virtual Machine
  1. Follow the Wizard (Default Option is show in Brackets)

Step1) Configure IP Address, Subnet, Gateway/DHCP or Static

Step2) Configure DNS Servers/DHCP or Static

Step3) Configure Hostname for the VIMA VM ie VIMA.domainname.local

Step 4) Confirm the settings

  1. The VM will now apply the settings and restart the VM Network
  1. Enter a password for the vi-admin account
  1. Open a terminal emulation application such as Putty and Connect to the VIMA Vm using its IP Address on port 22 (SSH)
  1. Login as vi-admin, using the password you created in the previous step
  1. When you are connected you will be presented with a terminal.
  1. Enter the following string into the terminal window
    1. Vifp addserver “name of server” or “IP Address” (name of server preferred)
  1. Enter the password for the host when prompted (Vmware Host Root User Password)
  1. Enter the following string into the terminal window
    1. Vifp listservers
  1. This should return the IP Address and name of the Vmware Host that you just added
  1. Enter the following string into the terminal window to enable FastPass to the Host
    1. Vifptarget -s “SERVERNAME – Vmhost Server”
  1. To confirm the above step has worked type

Vicfg-nics –l

This should return a list of NICS

  1. Install the UPS, configure the Network management card and configure your settings with the UPS Management Console (browser)
  1. Insert your media into the VMHost and attach it to the VMA Virtual Machine (ie CD)
  1. Connect to the VMA management console via Terminal Emulator
  1. Login to the Management Console
  1. Create a mount point : sudo mkdir /mnt/cdrom
  1. Change the permissions on the mount point: sudo chmod 666 /mnt/cdrom

Type: sudo mount –t iso9660 /dev/cdrom /mnt/cdrom

Type: cd /mnt/cdrom/ESXi

Type: sudo cp /etc/vma-release /etc/vima-release

Type: sudo ./install.sh

  1. Accept the licence agreement
  1. Press enter to keep default PowerChute Instance
  1. Press enter to keep default installation directory
  1. Confirm the installation
  1. This will install the Java Runtime
  1. Type: CD /opt /APC/PowerChute/group1             Enter
  1. Type: sudo ./PCNSConfig.sh
  1. Enter your root Password
  1. Select your UPS Configuration Option
  1. Enter the Management Card IP Address
  1. Select yes at the do you want to Register these settings
  1. Select Yes to starting the Powerchute Network Shutdown Service
  1. You will then be show a configuration

vMA

vMA or virtual management assistant provides a way to manage a ESX(i) host or vCenter server through the command line.

Remote commands are vicfg rather than esxcfg like on a local ESX host. Using vicfg allows you to manage ESXi hosts through the command line as direct console access is not available like on ESX.

vMA includes
vCLI
vSphere SDK for Perl & for Java (although last time I checked this was still experimental)
vSphere API

When logging into the vMA use vi-admin user account.

Each command you run needs a command name (i.e. vicfg-nics), authentication parameters (i.e. ESX host username), which ESX(i) (vihost) to run the command and any other options for the command.

You can create a session file for secure password hashing. Using this creates access tokens.
Example:
Save_session.pl –sessionfile <sessionfile> –username <username> –server <vcenter_server> password:<password>

For access for up to half an hour, use
Vicfg-nics –sessionfile <sessionfile> –vihost <hostname> –list

Commands & Examples
vicfg-nics | Manage physical NICs
vicfg-vswitch | Manage virtual switches
vicfg-vmknic | VMkernel NIC
vicfg-dns | Specify DNS configuration
vicfg-route | Manage default IP gateway
Vicfg-ntp | Specify NTP server

Options
-a Set the NIC to auto negotiate
-d half¦full Duplex options
-s <val> Speed for NIC (val is 10,100,1000,10000)
-l Lists the NICS
-L Link
-A Add
-D Delete a port group
-d Delete a virtual switch
-U Remove an uplink from a vSwitch (unlink)
-Q Remove an uplink from a dvSwitch
-IP Assign IP address
-m Set MTU
-n Set netmask

Create a virtual switch
vicfg-vswitch <comm-params> -a <vswitch name>

Add a port group to a virtual switch
vicfg-vswitch <comm-params> -A <portgroup> <vSwitch_name>

Link an uplink to a virtual switch
vicfg-vswitch –L <vmnic> <vswitch_name>

Link an uplink to a distributed vSwitch
vicfg-vswitch –P <vmnic> -v <dvport> <dvswitch_name>

Set Max MTU size
vicfg-vswitch <comm-params> -m 9000 <vSwitch_name>

VLANS
vicfg-vswitch –v <VLAN_ID> -P <portgroup> <vSwitch_name>

Remove a VLAN ID
vicfg-vswitch <comm-params> -v 0 –P <portgroup> <vSwitch_name>