Configure Virtual Machine-FEX with Cisco VIC and Nexus 5K – Part 1

Sick and tired of managing physical and virtual network for your data center from different management interfaces? VMFEX is Cisco’s answer to your problem. Cisco Virtual Machine Fabric Extender (VM-FEX) technology extends cisco’s fabric extender technology to virtual machines. In simpler words, with VMFEX you will be able to manage both physical and virtual network ports from your Nexus 5000.
 
vmware-ciscoThe objective of this article is to help users setup a VMFEX solution very easily in their virtualized environment with Cisco Rack Servers. This document has been divided into 3 parts.

Part 1: Introduction and VIC configurations

Part2: Nexus 5000 configuration

Part 3: ESXi and vCenter configuration
Continue reading

ESXi bash script to automate Power ON VM if its Powered OFF

This script with the help of crontab will enable ESXi 5.1 to poll the VM state every hour to check if it is ON and if not power it ON.

1. SSH to the host.
2. Copy and paste the following content to the shell script (auto-poweron.sh) which is placed in a vmfs volume.

Eg :-
Having enabled ssh access to your ESXi server, ssh in as root.
~ #vi /vmfs/volumes/datastore1/auto-poweron.sh

[crayon lang=”shell”]
vmname=”testvm”
vmid=$(vim-cmd vmsvc/getallvms | grep “$vmname” | awk ‘{print $1}’)
stat1=$(vim-cmd vmsvc/power.getstate “$vmid” | grep “off”)
if [ “$stat1” == “Powered off” ]
then
vim-cmd vmsvc/power.on “$vmid”
fi
[/crayon]

3. Replace ‘testvm’ with the appropriate vmName.
Continue reading