Thursday, 14 November 2013

VMware - Checking on snapshots

The backups failed one night and left a number of snapshots marooned.

(The backup process snapshots the NetApp volume, backups up the VMs, then deletes the snapshots).

To check which machines were affected I created and ran a Powershell script.

First of all I downloaded the VMware PowerCLI from here, you will need an VMware account to download.

Then opened up the PowerCLI to run the following commands:

Set-ExecutionPolicy RemoteSigned

Connect-VIServer vCenterServerName

get-vm | get-snapshot | format-list

This produces quite an in depth list of information, but a little too much as all I'm after is the name of machines with snapshots so I can check them for the backup snapshot. The date and description (as the backup names them as "SMVI Snapshot generated for.......")

Format list will give you the following objects:
Description
Created
Quiesced
PowerState
VM
VMId
Parent
ParentSnapshotId
ParentSnapshot
Children
SizeMB
IsCurrent
IsReplaySupported
ExtensionData
Id
Name
Uid

So my actual query was this which ends with an output option to a text file:

get-vm | get-snapshot | format-list vm,date,description | out-file c:\snapshot.txt

If you want to narrow your search down to a specific container as listed in "VMs and Templates", for example "Citrix" where all your Citrix servers are collected then amend the "get-vm" part of the query:

get-vm -location ”Citrix” | get-snapshot | format-list vm,date,description | out-file c:\snapshot.txt

 







Thursday, 7 November 2013

VMware - vSphere DB queries

Looking for who kicked off a snapshot sometime in the past?

VMware KB2009075 gives you an idea on how to find out.

Will post more once I have played around with it a bit longer!

UPDATE - 14th November 2013

My amended query from the VMware default (as I'm looking for actual 'user' accounts and not system) is.

select task_id, parent_task_id, start_time, username, complete_time, entity_name, descriptionid, complete_state
from VPX_TASK
where USERNAME != ''
and USERNAME NOT IN ('DOMAIN\backup','DOMAIN\anotherservice')


I'm looking at narrowing the search down to a date which will require further investigation. 
Sites that might help with that are:
http://www.w3schools.com/
 

Monday, 21 October 2013

Solaris - Patching using PCA

Since we haven't got Ops Center running in OEM as yet, but are planning to, I ignored the automated checking only because I was told the OpsCenter deployment was imminent...... Saying that I recently stumbled across the PCA product, that some kind chaps have developed a number of years back and have maintained it ever since, of which the best part is that it works even now that Solaris is an Oracle product.

I downloaded the PCA file text (which requires Perl to run) from the site and amended the file so it was executable as per the instructions on the site.

# chmod +x pca


The severs I work on don't have internet access so I have to use the patchdiag.ref file text which is also available from the site (and changes on a regular basis, so go back and check periodically for updates).
Save the file to:

# /var/tmp

Then run the PCA script

# ./pca





Which produces something like this - usage guide is also on the website.

Very useful stuff!

Wednesday, 18 September 2013

ESX - VisualEsxtop

New tool is available from the VMware fling site for seeing ESX performance stats

http://labs.vmware.com/flings/visualesxtop

(Just remember flings aren't supported!).

Install instructions can be found at:

http://blogs.vmware.com/kb/2013/09/using-visualesxtop-to-troubleshoot-performance-issues-in-vsphere-2.html

Friday, 13 September 2013

Solaris - using Telnet

Telnet usage:

Check to see if it is running:
# svcs -a | grep telnet
online          8:43:36 svc:/network/telnet:default

If the response back is offline then bring it online:
# svcadm -v enable -r telnet

Now you can use telnet:
# telnet <IP or name> <port>

Example:
# telnet solserver1 135

To exit the session:
CTRL followed by ]

To quit from the telnet> prompt:
q

Further information can be found at:
# telnet man
http://www.unix.com/unix-dummies-questions-answers/1215-how-use-telnet.html

Wednesday, 7 August 2013

Solaris - DMI error

We kept getting the following error on a number of servers (all running Solaris 10 update 10):

snmpXdmid: Registration with DMI failed. err = 831

After hunting around I found that the error is related to one of two issues:
1. Missing patch (138361-02 or later), or
2. Database files need clearing out

Having checked that the patch was there:
# patchadd -p | grep 138361-02
Response:
Patch: 138361-02 Obsoletes: 128415-01 137019-02 Requires: Incompatibles: Packages: SUNWsacom SUNWsadmi

(Checked MOS to see if this was the latest patch, which it was).

Which left clearing down the snmpXdmid database:
# svcadm disable dmi
# rm /var/dmi/db/*
# svcadm enable dmi

Once cleared down the error disappeared......

References:
http://docs.oracle.com/cd/E19082-01/819-2379/swmgrpatchconcepts-30/index.html
https://forums.oracle.com/thread/2242176



Friday, 2 August 2013

Azure - Accessing the first VM from work

Well, we have gone and bought some Azure time/space and as one of the Consultants said "It's like leaving some money behind the bar". If that's the case, I'll have a Guinness......

First of all getting access seemed a bit long winded - someone has to gain access to the account and then delegate some sort of server admin role so VMs can be created.

Deploying a VM is pretty easy - New > Virtual Machine > Quick Create (or From Gallery).

Once the VM created you click on the Connect icon down the bottom of the screen and a RDP shortcut is downloaded.

Double clicking on the shortcut, at work, produced the normal failure to connect due to Firewall rules.....

What we needed to do was:

1. Double click on the machine name.
2. In the new Window click on Endpoints links.
3. Change the *PUBLIC PORT to 3389 (same as the PRIVATE PORT).
4. Change the Firewall rules so that 3389 is open to (and from) the *MS Datacentres IP ranges that we use.

* By default MS Windows Azure assigns a port in the dynamic range (49152–65535) for Remote Desktop
* A list of IP ranges per Datacentre can be found here