Running Dog League Blog

Technology for Techs

Backing Up ESXi Configs Automatically

Just a simple script to back up ESXi configs to a file on a remote Windows Server:

Set ESXiPassword=[put your password here]
perl “C:\Program Files\VMware\VMware VI Remote CLI\bin\” –server [hostname of server] –username root –password %ESXiPassword% -s [path to .cfg file for backup]

Yes, it’s simple for a single server, but you can enter all of your servers in one place and backup all of their configs all at once.  Throw it into a batch script and run as a scheduled task.

64-bit Guest Requirements for ESXi

I learned the hard way that even if you can install a 64-bit OS on a computer, it doesn’t not necessarily mean that you can run guests in ESXi in 64-bit.

Essentially on an Intel Platform, it has to support EMT64 and VT(and the motherboard has to support it).  For AMD, you need Rev D AMD64 processors.

With Windows Server 2008 R2 supposedly being 64-bit only, planning ahead for the future makes some older servers obsolete a lot sooner than anticipated.

Reference Here:

Netflix Player 1.5 Firmware (How to Get Early and Review)

First of all, Roku has said that over the next couple of weeks they’ll be rolling out the new firmware update for the Netflix Player.   The biggest new feature is the fact that it now supports HD video, more specifically at 720p.   If you can’t wait for Roku to just add your box to the list, here’s the trick.

Just try to manually update your player’s firmware three times in a row.  On the third attempt, it will update the player to version 1.5.

Once you update the firmware, make sure to set your box to output to 720p.   I’m assuming that you’re running HDMI like me or component.  So far, I’ve only watched Quid Pro Quo in HD, and while it took a little longer to buffer than normal, but it actually looks pretty good.   There’s isn’t a lot of HD content, but it’s a good start.

If only they’d introduce support for Hulu and other sources, and I’d be a really happy camper with this box.  It’s still pretty awesome.

iSCSI connections on Core 2008

Setup is easy, initial config is pretty straight forward even without Core configurator(shame Guy had to take it down) , adding roles not much to it. Here is the Technet artical that got me off the ground. The remote management MMC snap-ins work actually well for VDS management and Firewall rule sets. But the iSCSIcli commands stumped me for a minute. I had the TargerPortals successfully added and could successfully ListTargets. I know the iscsi initiator was added from the LUN and correctly mapped over from the Net App Fas3020. But here is the iscsicli syntax that was throwing me off in bold. And yes T * * * * * * * * * * * * * * * 0 is correct.

iscsicli QAddTargetPortal <Portal IP Address>
iscsicli ListTargets
iscsicli QloginTarget <target_iqn>
iscsicli PersistentLoginTarget <target_iqn> T * * * * * * * * * * * * * * * 0

iscsicli ListPersistentTargets
iscsicli ReportTargetMappings

NetApp Snapshots with VMWare ESX/ESXi

 Without SnapManager for Virtual Infrastructure, which is released now, it is somewhat more difficult to do NetApp snapshots.   But if you are in a position where you must be creative about this, I’ve written a script to do so.   i’m sure that if you have the capital get SnapManager for Virtual Infrastructure it will be vastly superior to this.  Keep in mind this is covering a SAN based volume level snapshot, not the VMWare Snapshots, which are totally different things.   The SAN based volume snapshots are going to take up considerably less space and in no way impact performance.

There are essentially three different kinds of snapshots of virtual machines:  Hot, Warm, and Cold.   This holds true no matter if you are using VMWare Server or ESXi (or ESX for that matter)

Hot snapshots are ones that are taken while a virtual machine is running and serving data.    The advanatage of this is obvious – the backup of a virtual machine while it is running.   Many can be taken during business hours without clients noticing any differences.   The downside of them is that if you were to restore from a snapshot, it would be as if the server had the power cord was ripped out the back of it.    Whatever needs to be done for a consistency check of your data will have to be done.   Posts in the future will go into a script for this.

Warm snapshots are taken while the virtual machine is in the suspended state and all writes have been committed to the disk.   The virtual machine is only inaccessible for a short period of time (dependant on RAM and disk/cpu speed) and the hope is as long as the virtual machine is restored on a similar cpu architecture, the machine could be resumed successfully.    The pros of this is the downtime is minimal (but could be anywhere from a few seconds to a minute or more) and the snapshot is very likely to be consistent and useful.   The biggest con is that the machine has downtime.   Obviously this needs to be scheduled during nonpeak, nonproduction hours.

Cold snapshots are taken in a similar fashion to a warm snapshot, but when the machine is completely shutoff and powered off.  This is the most consistent snapshot you can take are it is basically a snapshot of files.   With the Virtual Machine powered off, after restoring – you are just turning the computer back on from a powered off state.

So, onto the script.   This utilizes putty.exe and plink.exe in order to make ssh connections to the NetApp filer and the ESX/ESXi Server.   So, ssh has to be enabled on ESXi and the NetApp filer as well.   Check my earlier post on how to enable ssh on ESXi.     This is a batch script that relies on the VMWare Remote Command Line interface that must also be installed on the Windows host.

REM NAME: ESXi and Netapp Warm Snapshot Script
REM Renames Volume Snapshots on SAN, Deletes the oldes one, suspends the VM on ESxi, take snapshot, REM and starts VM Backup
REM Meant to be Run At Night One an Evening
REM All variables must be set below

set /a count=[enter number of snapshots to retain]
Set Guestname=[enter name of guest]
Set SANAddress=[address of san/filer]
Set ESXiAddress=[address of ESXi host]
set SANVolume=[name of volume on filer]
Set SANPassword=[password of san]
Set ESXiPassword=[password of esxi]
Set VMXLocation=[location of vmx file]
REM Begin the Script
set /a count=count-1
set /a counta=count
plink %SANAddress% -l root -pw “%SANPassword%” “snap delete %SANVolume% %Guestname%_snap.%count%”

if /i %count% GEQ 0 (
set /a count1=%count%
set /a count=count-1
if /i %count% EQU %counta% (
goto loop
plink %SANAddress% -l root -pw “%SANPassword%” “snap rename %SANVolume% %Guestname%_snap.%count% %Guestname%_snap.%count1%”
goto loop
) else (
perl “C:\Program Files\VMware\VMware VI Remote CLI\bin\” –server %ESXiAddress% –username root –password %ESXiPassword% %VMXLocation% suspend soft
plink %ESXiAddress% -l root -pw %ESXiPassword% “sync”
plink %SANAddress% -l root -pw “%SANPassword%” “snap create %SANVolume% %Guestname%_snap.0″
goto end

perl “C:\Program Files\VMware\VMware VI Remote CLI\bin\” –server %ESXiAddress% –username root –password %ESXiPassword% %VMXLocation% start soft


And for the Cold Snapshot script, it is identical, with exception that the word “suspend” is replaced with “stop”.    Let me also add that the path to the is going to be slightly different if you are running a 64-bit os (the Program Files (x86) folder).   Also, make sure to run through this at least once interactively at a command prompt because putty/plink will prompt you to save the key for each host you connect to.

So, this script is intented to run as a scheduled task inside of windows.   It will keep only as many snapshots as is entered in the variables, with the most recent snapshot always ending with “0″.  And, if it is not obvious, the script renames the existing backups appropriately, suspends (or powers off) the virtual machine, commits the writes to the hard disk, takes the snapshot, and then start the machine back up.

I can also post a script for VMWare Server running Windows if anyone is especially interested…just leave a comment on this post.

As soon as I’ve got the hot snapshots worked out, I’ll post the scripts out accordingly.


How to Get Your Family Off of AOL for Email

This may sounds about 10 years late, but I’ve got plenty of family that uses AOL for their primary email.  WIth all the other free options that are far more lightweight (gmail obviously), the only reason that people use AOL email is because they’ve had it for 10+ years and don’t want to retell the 10 people they send forwards to that their email address has changed.  I will admit to having an email address that I haven’t paid for personally ever (it was on my family’s account until it went free) that i’ve had since 1995.  I check it around once a year.

Until somewhat recently, AOL did not provide pop3 access to AOL and AIM email.    Without fanfare (or apparently I’ve missed it), AOL does now have pop3 access in addition to IMAP.

Why is this so important?   Gmail supports pulling from a pop3 server, so now you can stop logging into AOL for email.   And by you, I mean your less tech savvy family and friends that refused to make the change.  Gmail seems to already even put in all the settings for you so you don’t even need to manually do it.

Its for address and for addresses (obviously less common) if you wanted to use some other application.

So, here is my challenge to you – go out and convert all of your family and friends who still use aol email addresses and go to a better provider!

Hyper-V Now for Free?

Link Here for more Info:

Download Microsoft Hyper-V Server 2008 Today!

Licensing Microsoft Hyper-V Server 2008

  • Microsoft Hyper-V Server 2008 is a stand-alone product that will be available via the Microsoft Download Center free of charge.
  • Microsoft Hyper-V Server 2008 does not require CALs for the product itself.
  • CALs will be required for all Windows Server virtualized operating systems which are hosted on Microsoft Hyper-V Server 2008.
  • Microsoft Hyper-V Server 2008 will be available in the following languages:
    • English (EN-US)
    • German (DE-DE)
    • Japanese (JA-JP)
    • French (FR-FR)
    • Spanish (ES-ES)
    • Chinese Hong-Kong (ZH-HK)
    • Chinese Simplified (ZH-CN)
    • Korean (KO-KR)
    • Portuguese (Brazil) (PT-BR)
    • Chinese Traditional (ZH-TW)
    • Italian (IT-IT)
    • Russian (RU-RU)

I’m sure this is in response to VMWare releasing ESXi for free.   This is one of the few situations where we as consumers are really benefiting from this competition.   Unfortunately for Microsoft, VMWare’s ESXi is generally still a better option in most situations, especially the free version.  I haven’t loaded Hyper-V’s free offering yet, but from the description of it, it just sounds like Windows Server 2008 Core with the Hyper-V role.   Either way, still a good option.

IDE Hard Disks on ESXi!

Maybe I just took for granted that ESXi 3.5 wouldn’t work at all with IDE disks.  So much so, I went out and bought a 250GB SATA disk just for the expressed purpose of hosting my VMs on ESXi at home.

Apparently I was wrong.   This weekend I moved my VM Host from one computer to another, with its new home resting on a HP D330.  That process was as straightforward as could be.  I just moved the usb memory stick that was holding onto the ESXi hypervisor and installed the SATA disk in the new computer.  After configuring the network card to be part of the management network, I logged in and it detected everything just fine.

But i’m missing telling you something.  Just for kicks, I left the IDE hard drive in the system by itself and for some reason, ESXi let me add storage to it.  I can’t explain it – maybe this works for more people than just me.   The hard drive/controller shows up as “Block SCSI”, which is possibly how this is working.   I’ve created a VM on there and ESXi seems to be happily using it. 

Click on the screenshots below for an actual view of my configuration.   Has anyone else been able to reproduce this kind of behavior?  Maybe we all just took for granted when we read that ESXi wouldn’t work on IDE hard disks.  Maybe there’s a subset of hardware where you actually can use IDE hard disks.

Netflix Player Review

I ordered the Netflix Player by Roku a week or so ago and it finally came in last friday.  My inital impression is pretty positive.   It’s tiny – much smaller than even what you’d expect from seeing it online.   The setup is beyond easy – just plug it in to your TV and home network (wireless or wired).   The documentation says it supports wireless b or g – but I opted to go with the hard wired connection since it was inches away from the box. 

The HDMI connection was very straightforward since it is a single plug and carries audio/video.  The box only comes with rca cables, but truthfully since the audio/video isn’t high def, it probably doesn’t matter very much what you use for the hookup.   Officially, my TV reported the output at 480p.  If I need to free up the hdmi connection for something else, I doubt it will look much different.    Associating the box with your Netflix Account involves just typing in an activation code it tell you to use through your computer by visiting the Netflix website.

Keep in mind the Netflix Player does not allow you actually browse any of their current 12,000 titles using the remote and box itself.   Any if you didn’t know this already – you must have a Netflix Account that supports instant viewing – the plans I believe start around $8/month for this.   It simply lists out your titles that you have in your “Instant Queue” – something you may or may not have been using in your Netflix account.    This instant Queue becomes your selection list on the player itself.  So you have to select your titles using your computer no matter what first.

The box is fast, responsive – and updates nearly instantly.    The picture quality is just about the same as when I’d use the “Watch Now” feature through a computer onto the TV.  Netflix claims it is DVD quality, which honestly it is pretty close.   When you have a series selection, like a tv show, it groups them all together and lets you select which one you’d like to watch – along with giving descriptions for each episode.

Updating the firmware (the very first thing I did), is a breeze.  There’s an update feature in the software and it took less than a minute.

Only one problem so far – I had to reboot the box because all of the pause, rewind, and fast-forward features just stopped working entirely.   After a reboot, all was well.  We’ll see if this is an isolated incident.

All in all – thumbs up.  I wish Netflix’s Watch Now selection was a little bit better.   The biggest test it passed was the one that for me is the acide test for any new technology I want to implement in the house – the wife test.   She’s pretty happy with the box so far.  🙂

Alternative to Vmkfstool

If using vmkfstool to convert your VMWare Server’s vmdk file to an ESX or ESXi file is not as convenient as it could be, you’ve got an alternative you can run inside of windows to do the same thing.

In VMWare Server 2.0 (RC or beta at this point), there’s a nice command line tool to be able to do this.   AFAIK, while this utility is in 1.0, the ability to convert to ESX style disks is not.

C:\Program Files (x86)\VMware\VMware Server>vmware-vdiskmanager /?
VMware Virtual Disk Manager – build 101586.
Usage: vmware-vdiskmanager.exe OPTIONS <disk-name> | <mount-point>
Offline disk manipulation utility
  Operations, only one may be specified at a time:
     -c                   : create disk.  Additional creation options must
                            be specified.  Only local virtual disks can be
     -d                   : defragment the specified virtual disk. Only
                            local virtual disks may be defragmented.
     -k                   : shrink the specified virtual disk. Only local
                            virtual disks may be shrunk.
     -n <source-disk>     : rename the specified virtual disk; need to
                            specify destination disk-name. Only local virtual
                            disks may be renamed.
     -p                   : prepare the mounted virtual disk specified by
                            the drive-letter for shrinking.
     -r <source-disk>     : convert the specified disk; need to specify
                            destination disk-type.  For local destination disks
                            the disk type must be specified.

     -x <new-capacity>    : expand the disk to the specified capacity. Only
                            local virtual disks may be expanded.
     -R                   : check a sparse virtual disk for consistency and attempt
                            to repair any errors.

  Other Options:
     -q                   : do not log messages

  Additional options for create and convert:
     -a <adapter>         : (for use with -c only) adapter type
                            (ide, buslogic or lsilogic)
     -s <size>            : capacity of the virtual disk
     -t <disk-type>       : disk type id

  Options for remote disks:
     -h <hostname>        : hostname of remote server
     -u <username>        : username for remote server
     -f <filename>        : file containing password
     -P <port>            : optional TCP port number (default: 902)
     -S                   : specifies that the source disk is remote, by default
                            the remote options are assumed to refer to the
  Disk types:
      0                   : single growable virtual disk
      1                   : growable virtual disk split in 2GB files
      2                   : preallocated virtual disk
      3                   : preallocated virtual disk split in 2GB files
      4                   : preallocated ESX-type virtual disk
      5                   : compressed disk optimized for streaming

     The capacity can be specified in sectors, KB, MB or GB.
     The acceptable ranges:
                           ide adapter : [1MB, 950.0GB]
                           scsi adapter: [1MB, 950.0GB]
        ex 1: vmware-vdiskmanager.exe -c -s 850MB -a ide -t 0 myIdeDisk.vmdk
        ex 2: vmware-vdiskmanager.exe -d myDisk.vmdk
        ex 3: vmware-vdiskmanager.exe -r sourceDisk.vmdk -t 0 destinationDisk.vmdk
        ex 4: vmware-vdiskmanager.exe -x 36GB myDisk.vmdk
        ex 5: vmware-vdiskmanager.exe -n sourceName.vmdk destinationName.vmdk
        ex 6: vmware-vdiskmanager.exe -r sourceDisk.vmdk -t 4 -h \
              -u username -f passwordfile “[storage1]/path/to/targetDisk.vmdk”
        ex 7: vmware-vdiskmanager.exe -k myDisk.vmdk
        ex 8: vmware-vdiskmanager.exe -p <mount-point>
              (A virtual disk first needs to be mounted at <mount-point>)


Notice the “preallocated ESX-type virtual disk”?   So, all you should have to do is run

vmware-vdiskmanager.exe -r sourceDisk.vmdk -t 4 destinationDisk.vmdk

and it effectively does the same thing the vmkfstool does at the command line for ESXi.   So, if you don’t want to have to use the unsupported command line of ESXi (even though I like having it available.   This has been tested and absolutely works.   If you don’t have enough double the necessary free space on you ESXi server for the server you are adding, this is certainly convenient.

Also, as a followup to the earlier post as others have pointed out, you really don’t “HAVE TO” open up ssh to run vmkfstool, you can just hit ALT-F1 and type in unsupported at the command prompt.   Opening up ssh is purely optional, but definitely convenient.