Friday, September 30, 2011

Handy naviseccli Commands

I have been meaning to document this for ages.  I often find myself supporting clients who are located on the other side of a horribly slow WAN / VPN / 2 Cans and a piece of string link.  Slow as in even Navisphere Express times out in the web browser.  That’s when a ninja-admin such as myself whips out his command-line fu.  All commands below are to be entered on a single line and substitute %username% and %password%

Physical Container-Front End Ports Speeds

naviseccli –h <ip address> port –list -sfpstate
naviseccli –h <ip address> –set sp a –portid 0 2
naviseccli –h <ip address> backendbus –get –speeds 0

SP cache details
naviseccli -scope 0 -user %username% –password %password% -address <ip address> getcache

Get all the details of the LUN’s on the array
naviseccli -scope 0 -user %username% –password %password% -address <ip address> getlun

Review IO Ports on an array
naviseccli -h <ip address> -user %username% –password %password% -scope 0 ioportconfig -list |more

All details from the Array
naviseccli -scope 0 -user %username% -password %password%-address <ip address> getall

SP Reboot and Shutdown GUI
naviseccli –h <ip address> rebootsp
naviseccli –h <ip address> resetandhold

Apart from being faster than the GUI, knowing the naviseccli commands also allows you to incorporate them in scripts, pipe the output etc.  In other words it’s a very nice string to have in your bow!

Hyper-V 3.0 is full of win!

There has been a lot of movement in the virtualization space recently, what with the release of vSphere 5 and Microsoft giving us a sneak peek at the upcoming Hyper-V 3.0.  All in all it seems that Hyper-V is a very rapidly maturing product, and Microsoft is adding the features and scalability so craved by enterprises.  Indeed, it also appears that they are pulling ahead of vSphere in certain areas.

The table below highlights some key performance maximums

  vSphere 5 Hyper-V 3
Max Nodes per Cluster 32 63
Max VMs per Cluster 3000 4000
Max CPUs per VM 32 32
Max RAM per VM 1 TB 512 GB
Max VM Disk Size 2 TB 12 TB
Max Processor Cores per Host 160 160
Max RAM per Host 2 TB 2 TB

In addition to that Hyper-V 3.0 will also bring the following to the table:

  • Live storage migration
    • This allows you to move you VHDs to another volume whilst the VM is online.  The volume need not reside on shared storage
  • Hyper-V Replica
    • This allow replication via LAN, for incredibly easy and cost-efficient DR
  • Native NIC teaming support in Windows Server 8
  • Storage De-Duplication
  • Offloaded Date Transfer (ODX), which basically offloads the grunt storage work to an ODX-enabled SAN
  • Virtualization-Aware Domain Controllers
    • You now can now make and revert to snapshots of a virtualized domain controller
    • Domain controllers running as a VM can also be cloned

This is some of the more important features Hyper-V 3.0 has to offer.  It is quickly turning into a very viable and cost-effective alternative to vSphere.

Wednesday, August 24, 2011

Start-up Sequence for VM’s in a Hyper-V Environment

I’ve had customers phone me several times with regards to powering up their servers after an outage.  If not done properly you can run into a situation whereby you cannot log onto a host to start a VM, because the virtualised DC is still down.  Not good.

So, if me or my clients are recovering from a shutdown I usually do the following:

  1. Power on the Hyper-V server hosting the VM that holds the PDC emulator FSMO role.  The VM should preferably also be a GC and DNS server and refer to itself for either primary or secondary DNS
  2. Sign on to the Hyper-V host using a Local Administrative Account.
  3. Start the VM.
  4. Log out of the Hyper-V host once the VM has booted successfully.
  5. Log into the Hyper-V host using a “proper” Domain Account.
  6. Start any other virtualised DC’s / GC’s you might have.
  7. Ensure you have at least one DC / GC running in each AD site.
  8. Boot up the rest of your environment

Another option (pointed out to me in the comments section), is to set startup delays on your VM’s so that your DC’s starts up before your other servers.  This seems very basic, but it’s amazing how quickly common sense goes out of the window when the pressure is on to get an environment up and running. 

Another way of dealing with this (my preferred way) is to have the PDC FSMO role on a physical machine.  If you go this route also ensure that your physical machine is a GC.

Friday, July 22, 2011

Publishing Remote Desktop Gateway (RDG) with TMG 2010

I recently had the pleasure of creating an Remote Desktop Services (RDS), Remote Desktop Gateway (RDG) and RemoteApp environment for a client.  This was a bit more technical and involved than I originally envisioned, no thanks to the scant documentation that exists.  I will detail all that in a later blog post, for now I will focus on publishing your RDG, RDS and RA environment through a Microsoft TMG 2010 Firewall.

First we have to create an SSL Listener
  1. Specify an IP address for the Listener
  2. Enable both HTTP and SSL connections
  3. For HTTP to HTTPS redirection select redirect all traffic from HTTP to HTTPS
  4. On the Certificates tab select “Use a single certificate for this web listener” and select an appropriate certificate
  5. Authentication should be set to “No Authentication”
Now we create the actual publishing rule:
  1. Allow
  2. From Anywhere
  3. To – Your RDSG IP or Host – Forward original host header – request appears to come from TMG
  4. Traffic HTTPS
  5. Listener – Select the one we created earlier
  6. Public name – This is the Public DNS name
  7. Paths should be /rdsweb/* and /rpc/*
  8. Authentication delegation – “No Delegation, client may authenticate directly”
These were the steps I had to take to successfully and securely publish the client's RDSG to the internet.  Once again I found the existing documentation to be lacking in the extreme.  Hope this helps someone out there.

Friday, July 15, 2011

How to Prepare an Offsite replica with DPM 2010

Sometimes the need will arise to backup your DPM replicas to removable storage for whatever reason.  It might be so that you can recover your DPM server in case of a disaster or you might even want to use the replicas to seed another DPM server in a DPM 2 DPM 4 DR scenario.  Here is an extremely simple and effective way to accomplish that:

  1. On your DPM Server open an Admin Command Prompt
  2. Navigate to the DPM bin folder (usually C:\
    Program Files\Microsoft DPM\DPM\bin\)
  3. Execute dpmbackup -db
  4. Execute dpmbackup -replicas
  5. I prefer using robocopy to copy the data to USB (or any alternate) Storage like so: robocopy C:\Program Files\Microsoft DPM\DPM\Volumes\ShadowCopy\ %destination% /e /b
What the above does is creates snapshots of the replica volumes and then mounts those read-only snapshots under the \Program Files\Microsoft DPM\DPM\Volumes\ShadowCopy folder.  It is therefore a point in time replica which you can copy wherever you wish, be it disk or tape.  You can, of course, also use your favorite backup software to backup your replicas, just be sure to configure it to traverse mount points.

Tuesday, June 28, 2011

Installing Windows 7 / 2008 R2 from a USB Stick

Too much of my life is spent staring at install screens - no more I say!  That time is better spent looking at the blinkenlights, drinking coffee or browsing slashdot.  One way of significantly speeding up install time is using a USB device instead of CD/DVD media.  Here is how to create bootable USB Installation media for Windows 7 and Server 2008 R2.
  • Launch the DiskPart utility by typing diskpart at the Start Menu.  If your system does not have diskpart you can download it from here
  • Run the list disk command to, surprisingly, list the disks in your system
  • Now run select disk % where the "%" is actually the number of your USB drive (obtained above).
  • Run clean.
  • Now run create partition primary.
  • Let's set the partition to active by entering active
  • Now we format the drive with the FAT32 filesystem via the format fs=fat32 quick command
  • Run the assign command to assign a drive letter to our USB device
  • Copy the entire contents of the installation DVD to your USB device (a simple drag and drop will do)
  • Plug the USB drive into the target system and proceed with the (hopefully faster) installation.
Configuring the relevant BIOS options is left as an exercise to the reader. 

Thursday, June 23, 2011

Trend Micro OfficeScan Uninstallation

If you, like me, have ever been faced with having to uninstall Trend OfficeScan, only for it to ask for a long-lost password, you were pretty much out of luck.  Trend does have a KB article with manual un-installation steps, but that is an exercise in frustration.

Fortunately I recently happened across a "hidden" command that will take care of business.  You need to do the following:
  1. Open a command prompt and navigate to the folder where your Trend AV client is installed, usually c:\Program Files\Trend Micro\*****
  2. Execute the following command: NTRMV.exe -331
This takes care of all the nitty-gritty stuff, stopping the services, removing files and folders and removing all the relevant bits from the registry.
Another great thing about this approach is that it's much easier to script and / or deploy with your favourite management app.