Thursday, December 16, 2010

VMware View, VDI, Windows XP Pro optimization

I have to do a fairly big VDI installation and I wanted to make sure I did all I could to optimize the Windows XP template that is going to be used.

In order to make the performance the best it can be, you need to:

  • Align the guest OS disks on a 64k boundary
  • Use 32K cluster sizes when formatting the disk.

However, you can’t do either by default when installing Windows XP. By the way, this is not an issue when installing a Windows 7 machine as it correctly aligns the disk during installation.

Why is alignment important?  Read this: http://www.yellow-bricks.com/2010/04/08/aligning-your-vms-virtual-harddisks/

The short answer is that if the disks aren’t aligned, some sectors will cross sectors that wouldn’t have to if they were aligned and this causes extra disk access in order to read that sector. Depending on your application, you could get up to a 30% improvement in performance.

With regard to 32K cluster sizes, I have found that Windows XP under VMware vSphere has better performance using this cluster size….but test for yourself.

One annoying thing is that you cannot boot from a partition that has 32K Cluster sizes on Windows XP.  What you have to do is create a small 100 MB (yes megabyte) partition that has standard 4k cluster sizes and then a 2nd larger partition of whatever size you like that has 32k cluster sizes. During the installation, pick the larger partition to install onto. The installer will automatically use the smaller disk as the “boot” partition, but Windows will be installed onto the larger disk. As a side effect, you will end up with your main drive being D: instead of C:. If this is a problem for you, then forego changing the cluster sizes and just do the disk alignment.

In order to do both these tasks in one go, the simplest solution is to create a new VM for use with Windows XP. ESX will create a IDE disk by default – you don’t want this as you cannot resize a IDE disk. Also, the SCSI driver will outperform the IDE driver. So…after you have created the VM, go back into the settings for the VM, delete the hard disk and then add a new one. Choose SCSI and change the type to be LSI Parallel. Save your changes.

Now….use a Windows 2008 VM and add a new hard disk….add an existing disk and choose the hard disk that you just created in the step above (the Windows XP disk). It will now become a new extra disk on the Windows 2008 VM. We will now use the Windows 2008 VM to partition and align the disk correctly.

First, open a command prompt in the Windows 2008 VM. Type in diskpart

If you want to only do the alignment, and not the 32K cluster size fix, then skip this first step and only perform the “2nd partition” command below. Then LIST DISK and then SELECT DISK 1 (or whatever number the correct disk is). Next, type create partition primary size=100 align=64

You just created the 100 MB “boot” partition. Make sure you have the right disk selected or you will destroy your Windows 2008 VM disk.

Now type: create partition primary align=64

You have now created a 2nd partition that uses up all the rest of the space.

Now use the Disk management tools in Windows 2008 to format both partitions – make sure to use a 4K cluster size (the default) on the 100 MB partition. Then use the 32K cluster size on the larger disk if you want to use that option, or the 4K cluster size if you don’t.

Detach the disk from the Windows 2008 VM and power on the Windows XP VM with a installation ISO attached to the CDROM. Make sure you press F6 during the boot and use the LSI.FLP image in the floppy drive for the LSI Driver. When you get to the part where it asks you about the hard disk, choose the option to leave the filesystem intact (no changes) and choose to install on the larger disk.

That’s it! You now have a properly aligned Windows XP template with 32K cluster sizes for optimal performance.

Enjoy!

Jim

Free Antivirus from Microsoft–no really!

K…I know what you are thinking….Microsoft Defender….it’s crap….

This is not that product. I don’t know more people don’t know about this and I think Microsoft is keeping it quiet because they don’t want to make the Anti-Virus companies angry.

But you can get effective anti-virus and spyware protection free with no ads supported and updated regularly by Microsoft!

It is called Microsoft Security Essentials: http://www.microsoft.com/security_essentials/ 

Terrible name, but the product works really well. It performs its actions in the background with no fuss and I haven’t even noticed any performance issues. I have been using it for about a month now and it has even caught a few viruses in that time.

So…ditch the Anti-Vir or the AVG you have been using and give this new one a try!

Jim

Sunday, December 5, 2010

Backups, Livedrive, FTP and Robocopy

So backups are important….right?  Really important.

If you don’t have backups, then you could easily lose your data. Hard drives will fail…it is not a question of “if”, but “when”.

For myself…I have been using Livedrive for a few years now.  Other than the occasional glitch (nothing major), it has worked well. One feature that doesn’t work well for me is the “Briefcase” – this is supposed to be a Local Drive letter that shows up on your local machine (usually drive L: ) and lets you access your Livedrive through normal Windows means.

I have several problems with it….1) I think I have too many files to let this work effectively and 2) the date/time stamps and 3) the use of *.ld files

  1. This one is obvious – I have TB of data and they allow unlimited, so I am going to use it
  2. I was using their FTP service to upload the files and as a result all the files are uploaded, but have the wrong date/time stamp in comparison to the originals
  3. They only show the *.ld files and not the name of the real file

So…I figured I would use Robocopy (it comes standard with Windows 7 and Server 2008) to keep things in sync. Robocopy allows me to copy only the changed files over to the Livedrive, so it is fast and efficient …but like I said, the date/time stamps are wrong, so Robocopy wants to copy everything over!  Ugh. Plus, it sees the *.ld files as “Extra” on the destination side, so it wants to delete them.

I found a way to fix this and make it work the way it should.

I use their FTP service already, so I grabbed a copy of Webdrive. This program turns a FTP site into a drive letter, but it uses standard FTP commands, so no funny business. Secondly, if you check the reference for Robocopy, you can see some advanced features – specifically, /TimFix, /XO and /XN.

So…to get things in sync, assuming a mapped drive of S: for my server and a W: for my Webdrive, I ran:

robocopy S:\Photos W:\Photos /E /TimFix /XO /XN

This updates all the Timestamps on the destination without actually copying anything over.  /TimFix says: FIX Timestamp on all existing destination files, including skipped files.

Perfect! Now the two systems are in sync and I can use standard Robocopy commands to upload new/changed files to Livedrive:

robocopy S:\Photos W:\Photos /E

This will copy only changed or newer files (including subdirectories) over to my Livedrive.

Thus I have a copy locally and a off-site backup in case something happens.

Jim

Thursday, December 2, 2010

Exchange, Outlook 2007, Outlook Anywhere and Self Signed Certificates

To all those people that say you Can’t use a self-signed cert and be able to connect to Exchange using Outlook Anywhere, I say pfffff***.

I just did it. See near the bottom for instructions – basically you need to import the self-signed cert into your Trusted Root Certification Authorities.

In case you don’t know….Outlook Anywhere allows you to connect your Outlook Client to Exchange over the internet without having to VPN in or anything. It is still secure because it tunnels everything over the HTTPS connection that you would use if you were using OWA (Outlook Web Access). This means you can get internet somewhere and just start up your Outlook and get connected and have full functionality! It’s great!

If you don’t want to buy a SSL Cert, you can use the Self-Signed one that your Exchange installed – it is just as secure – and you know it is safe (even if your computer doesn’t) because you are the one that signed/created it!

Anyway….after you get Exchange setup with Outlook Anywhere (on 2010, you just have click a check box!), you need to setup your Outlook client. There are lots of examples on the web on how to do this part, but here are some quick ones:

On the Exchange Settings screen, put in your INTERNAL EXCHANGE name (not the externally known one), and put in your user name.

  • Click More Settings.

  • In the Exchange Settings dialog box, select the Configure Outlook Anywhere check box and then select the Connect to Exchange Mailbox using HTTP check box.

  • In the text box that follows these check boxes, type the server name for the Outlook Anywhere proxy server. Do not enter http:// or https:// as part of the name. This will be the external name – should be the same as your OWA like this:  mail.yourdomain.com

  • Select Mutually authenticate the session when the system connects with SSL and enter the principal name of the proxy server. This will be like this: msstd:mail.yourdomain.com

  • Select whether or not to reverse the default way in which Outlook decides which connection type to try first, LAN (TCP/IP) or Outlook Anywhere (HTTP). The default is LAN (TCP/IP) first, then Outlook Anywhere (HTTP). If you expect users to connect when they are outside the corporate network more frequently than when they are inside the corporate network, we recommend that you configure Outlook to try Outlook Anywhere (HTTP) first.

  • Select an authentication method from the drop-down list. If in doubt, use Basic Authentication.

  • Click OK to return to the Exchange Settings dialog box, and then click Finish.

  • Now here is the tricky part – it all won’t work until you import your self-signed cert. To do this, start up IE and browse to your OWA where you will get the Cert error. Continue anyway.

    Then at the top of the browser window, you should see “Certificate Error”. Click this and then click, “View Certificates”. Next, click Install Certificate. Now choose “Place all certificates in the following store” and click Browse. Choose Trusted Root Certification Authorities and click Ok. Once you click Next and Finish, it should say Import Successful. Now if you close your browser, re-open it and go back to your OWA URL, you should no longer get the Cert warning.

    AND…best of all… your Outlook will now connect to your Exchange without a VPN connection!

    Enjoy!

    Jim

    Wednesday, December 1, 2010

    VMware View 4.5

    Two things: They took out the ActiveX control out of the View Client (hopefully they bring it back later on), and the View Security Server ONLY SUPPORTS RDP – NOT PCOIP.

    I setup a whole environment for a client and was testing away, only to find out that the Security Server (the part that goes in the DMZ and handles the Web redirects to the View Server) does not do PCOIP. The VMware docs do mention it, but only a single line that says that the Security Server will be ignored if PCOIP is picked as a protocol (which is the default too) on the View Client.  This is probably not the greatest arrangement and I am sure VMware is going to need to make adjustments – if only to allow the View manager to set a different default for the Security server than for the regular View server.

    Everything else with View 4.5 seems to work great.

    Jim

    Windows 7 – Took the plunge

    I have been resisting for a long time, but my work gave me a brand new laptop with Windows 7 Professional preloaded on it.

    So…rather than downgrade I thought I would finally get used to it and really take the time to give it a fair shake.

    Yes…they moved things and getting to some items is not as easy as it used to be, but they improved some things too.

    Like this Windows Live Writer – maybe this was around and available for XP too, but I didn’t know about it. I actually only found it by accident:

    I am away from home on work and my wife runs a little book publishing business (shameless plug – www.yournickelsworth.com). Anyway…she wanted me to update our website with a review of a book that she recently finished. She sent me a .DOC file and a massive 2MB .jpg file.

    I just got this new laptop (as I said) and I don’t have Word nor Photoshop – which I would normally use to massage into .HTML and then post onto the website. But, didn’t have any of those tools. So…..

    I knew that if I emailed the .DOC file to myself at my gmail account, I could view it as HTML, so I thought that that would be a good start. But it turned out to be easier than that. After receiving the email at gmail, I was able to edit online! Cool stuff. Then there is an option to “Share” with everyone…so I did that.

    Next, ...I figured out a way to resize the 2MB jpg even without Photoshop....I started editing it with the builtin Windows 7 tools, and I noticed an option to make it into a Blog post (this is where I found the Windows Live Writer thing). So, I posted it to my blog which automatically resized it and then I download that image and then added it to the Google Document I had been editing.

    And Voila…I now had a page that I could link to and share with everyone on the web. I added the link to my wife’s website and I was done.

    Now that I know how to post to my blog using the Windows Live Writer and how much easier it makes it, I will probably blog more often.

    Jim