vmware – powercli enable remote scripts

Neccesary commands to get vmware vsphere power cli scripts runnign in power cli;

(post installation of vsphere power cli extensions)

Set-ExecutionPolicy RemoteSigned
Set-PowerCLIConfiguration -InvalidCertificateAction “Ignore” -Confirm:$false

http://blogs.vmware.com/vipowershell/2011/06/back-to-basics-part-1-installing-powercli.html

Jumbo Frames on your vSphere ESXi box

Continuing on from this http://sigtar.com/2010/02/04/vsphere-and-multipathing-iscsi/

you may want to implement jumbo frames to your iSCSI backend…

Enable jumbo frames on your iSCSI target and switches then complete the following on the ESXi hosts (iSCSI initiators)…

This to list your current switch details and port group names…

esxcfg-vswitch -l

The following to allow jumbo frames onto your vswtich (insert your vSwich in following)

esxcfg-vswtich -m 9000 vSwitch0

Then create your kernel port groups that you want to use for iscsi, my commands looked like this… (repeat for each iscsi kernel port you have) — note : DO NOT ADD ANY VMKERNEL(s) from the GUI, instead use the steps below

esxcfg-vswitch -A iSCSI vSwitch0

If you are using a tagged vlan you will also need to add the vlan tag to the above port group

esxcfg-vswitch -v 192 -p iSCSI vSwitch0

esxcfg-vmknic -a iSCSI -i 10.0.0.101 -n 255.255.0.0 -m 9000

To confirm you have set the MTU (frame size) correctely, run the following….

esxcfg-vmknic -l

you should see your iSCSI kernel ports with a MTU of 9000 all going well. Confirm connectivity using

vmkping –s 9000 10.0.0.10

vSphere and Multipathing iSCSI

This is just a quick reference to create a multiplathing iSCSI setup…

Create two virtual kernel switches, one called “iSCSI-1” and the other called “iSCSI-2” (and so on if you have more nics)

Then per kernel portgroup ensure that only one of the nics is active. For the “iSCSI-1” portgroup configure it to override the virtual switch settings and move nic 0 to active and nic 1 to unused. For the “iSCSI-2” portgroup configure it to override the virtual switch settings and move nic 1 to active and nic 0 to unused.

Now you have to run some esxcli commands to gel things together…. alt-f1 on the esxi console and type “unsupported” followed by your root password. The following is the command i have to run to get both my portgroups to work together on the iscsi hba….  (you can check your vmk number from the networking config screen)

esxcli swiscsi nic add -n vmk1 -d vmhba33
esxcli swiscsi nic add -n vmk2 -d vmhba33

For each target then change the path selection method to “round-robin”.

Go back to storage adapters and click “rescan”

If you want all future iSCSI targets to automatically use round-robin you must also run the following from commandline…   (this is for our HP Lefthand, your “storage array type” may be different. Its listed under your target details). Basically sets round robin as a default for this type of array. In general you should do this first before presenting any LUNs etc, else you may have to bounce your box.

esxcli nmp satp setdefaultpsp –satp VMW_SATP_DEFAULT_AA –psp VMW_PSP_RR

Update : Hardware iSCSI nics

The process for hardware iSCSI initiators is similar to above, but you assign a single kernel port per nic. To find which nic belongs to which iSCSI initiator you must run this command from the CLI;

esxcli swiscsi vmnic list -d vmhba#

vmhba# is the name of the iSCSI adapter.

vSphere – ctrl-alt-del greyed out

This bug has hit me. Looks like users with roles like vm user / power user cannot send “ctrl-alt-del” via the console even though they have the correct permissions. Our users cannot use ctrl-alt-ins as they are connected via RDP to a machine that has the console installed.

Found this : http://communities.vmware.com/thread/220683;jsessionid=480C8A2C9B9EACA9FF2BB4E1BECA2D53?start=15&tstart=0

Looks like its a known bug and will be fixed in the upcoming VC4.0 update 1 sometime Q3 2009 :(

Luckily vSphere was setup in our pre-production environment – the machines i have running in production are still 3.5 with VC2.5.

ESX – network utilization

One of the best articles i have found on this subject is here : http://blog.scottlowe.org/2008/07/16/understanding-nic-utilization-in-vmware-esx/

There is some additional information here on setting up an etherchannel on the cisco side : http://blog.scottlowe.org/2006/12/04/esx-server-nic-teaming-and-vlan-trunking/

This can be handy if you need a single VM to use both physical nics in a load-balanced manner – both outbound and inbound. Of course its not really that simple though. This will really only add a benefit if the VM is communicating to multiple destinations (using ip hash – a single destination from a single VM with one IP will always be limited to the same physical nic).

switch(config)#int port-channel 1
switch(config-if)#description NIC team for ESX server
switch(config-if)#int gi0/1
switch(config-if)#channel-group 1 mode on
switch(config-if)#int gi0/2
switch(config-if)#channel-group 1 mode on

As per the article ensure you are using the same etherchannel method. The first command shows your current load-blance method, the 2nd command changes it to ip hash.

show etherchannel load-balance
port-channel load-balance src-dst-ip

Another solution is to use multiple iSCSI paths. This is newly supported within vSphere, see this post on setting up multiple paths : http://goingvirtual.wordpress.com/2009/07/17/vsphere-4-0-with-software-iscsi-and-2-paths/

Here is another good article on iSCSI within vSphere : http://www.delltechcenter.com/page/A+“Multivendor+Post”+on+using+iSCSI+with+VMware+vSphere

Some important points on using EMC Clariion with vSphere : http://virtualgeek.typepad.com/virtual_geek/2009/08/important-note-for-all-emc-clariion-customers-using-iscsi-and-vsphere.html

ESX 4 (vSphere) – installation issues

I’ve had a couple of installation issues with ESX4

One was particularly strange, the install process would freeze every now and again until i pressed a key on the keyboard. This was related to AMD’s power saving C1 mode – disable this in the bios to fix this problem.

Secondly it was a problem with my nic. Essentially i didn’t have card that was supported (realtek). After inserting a intel card all was well. This fires up a ambiguous error and cans the whole install. (lvmdriver error)

It was nice to see that my pata drive was supported – i’ve been using it for quick tests but was unsure if it was supported in vSphere. Note: i’ve got a flash card enclosure that i’m planning on using in the future, just awaiting the card.   (hopefully this saves me some power)

Citrix XenServer 5.5 – First impressions

I had decided to try out Citrix Xen Server at home since i work a lot with vmware during my working week and felt like a change. It all seemed well… That is until i had to deal with snapshots. I suppose i have taken for granted almost all other virtual host software that provides a simple “revert to snapshot” option. From what i can tell this is totally absent from Citrix XenServer 5.5.

There are comments from within Citrix that they are working on this as a feature, but it has yet to make it to fruition. Unfortunately for me with the type of work i do (testing / proof of concept etc) this is a deal breaker. Looks like i’m gunna have to try out vSphere at home. (currently only using 3.5 at work)

Least vSphere has thin provisioning now, so nothing (feature wise) i’ll be missing from Citrix’s Xen Server.

Updated : 28/07/2009

I’ve actually got no choice but to stay with Citrix Xen for now, looks like the sata controller and network chip on my motherboard is not supported by either 3.5 U4 or vSphere. Doh! (i should have checked the HCL but sometimes just like to try my luck)