Windows 2008 R2 64bit unable to install to the selected location

Posted on May 27th, 2010 in Howtos, Hyper-V, VMWare, Windows Admin by Rodney

I’ve recently purchased a new server for our production environment and went to our preferred provider of hardware for a new server. The one stipulation I had was that is was VMWare ESX certified. I did my research and selected all my components and then purchased the server. However, after purchasing, the vendor sent me an email stating they were substituting some of the components on me. Of course, I panicked about the VMWare issue, as drivers for VMWare are not like Windows – you can’t get them from hardware sites, more often than not. Anyway, the vendor assured me the subs would still be ok.

Long story short, although they kept to the letter of the law on that, they didn’t keep to the spirit of the law, so to speak. All the components are VMWare certified – except the very expensive hardware RAID card cannot be used on the VMWare ESX OS partition. In otherwords, VMWare can still have the guests in a mirror, but the OS will be outside the RAID.

This left me with 3 choices:

  • 1. Have the VMWare OS outside the RAID and hope the disk doesn’t fail. Not a great idea on a production server.
  • 2. Install Linux on the server and set up a RAID, then run VMWare Server 2 and put guests in that. Works ok but the disk I/O hit is significant and it’s not a bare metal solution.
  • 3. Switch to Hyper-V.

I’ve always been meaning to try out Hyper-V but a production-acid-test is not what I had in mind. None the less, I am an impulsive idiot, so I am going to do it. While it’s production, it won’t directly effect any of our customers and I can wear the headache myself, for the time being, if it’s not great.

So anyway, back to the topic of the post.

I began the installation of Microsoft Hyper-V server on the box and got as far as being asked for the RAID card drivers. After providing these, I was dismayed to see that Windows was telling me it was able to see the disk, create the partitions and format them but was still “unable to install to the selected location”.

This didn’t seem fair. I have a driver and OS that can see the disks, I can work with the disks but I can’t use them? This sucks!

Being the old school guy I am, I of course went looking for newer drivers but it turns out I already had the newest. I was almost ready to give up and go for option 2 above, when I came across a little trick.

It turns out that this error message is kind of Windows’ weird way of saying “please put the Windows CD back in the drive and remove the driver CD”. It actually turns out all you need to do to continue is pull out the driver disk and put the Windows 2008 R2 DVD back in the drive, then rescan the disks. Hey Presto! You can now install to the partitions.

Personally, I find this a little silly but at least I can move on and try out my Hyper-V set up now.

I’ll let you know if I live to regret it.

PS: I understand this issue only effects 64bit installations of Windows 2008 / Windows 7. I may be wrong on this but have never tried a 32bit install and have no plans to do so.

VMware Server 2 Guests randomly fail CentOS 5.4

Posted on November 17th, 2009 in VMWare by Rodney

I recently ran a yum update on my CentOS 5.2 server, which I use to run VMware guests – really you could call it my VMware server. Every time I do this, I think to myself “should I really be doing this? Do I really need the newest kernel on this box that works perfectly?” Then I do it anyway and hope for the best.

This time, however, things did not go for the best.

Immediately after updating and rebooting, VMs went to hell. Guests would suddenly stop for no reason, the web interface kept failing and not responding (although the vmware-hostd service would continue to listen on the ports). I assumed it must be kernel related and dropped back to the last one – but to no avail.

Having no time to fix the issue, and all my VMs on a separate set of disks, I simply reinstalled CentOS from scratch, using the very latest version – 5.4. I thought to myself, “this will surely fix the problems – it’s a fresh OS”. Wrong

Long story short – glibc-2.5-42, which incidentally ships with CentOS 5.4 out of the box, is incompatible with VMware.

Here’s how to get VMWare working on your CentOS 5.4 host:
1. Go to /etc/yum.repos.d and copy the file CentOS-Base.repo to a new file. I chose CentOS53-Base.repo.

2. Edit this new file and rename all instances (in [ ] brackets) with a new name. I.e.
[base] becomes [base53]
[updates] becomes [updates53]
etc

3. Replace every instance of $releasever with 5.3.

4. Save the file. Now downgrade glibc:
yum downgrade glibc glibc-common

5. Edit the /etc/yum.conf file and exclude these libraries from future updates, until this is resolved. Do this by adding the following line:
exclude=glibc glibc-common glibc-devel glibc-headers nscd

6. Reboot and re-run vmware-config.pl.

Everything should now work, once more.

Improving VMware Server Performance

Posted on November 15th, 2009 in VMWare by Rodney

There’s lots of information around, relating to how to improve VMware performance; some of it useful and some of it not so useful.

For example, it does help to be reminded to defrag your guest OS virtual hard disks – but being told that fibre channel is faster than DAS is a little pointless, when you’re trying to improve the speed of your personal VMware box and don’t have the budget for such things.

So with this in mind, I’ve collected bits and pieces that I have found made a big difference to performance, without having to spend money on hardware.

Firstly, the Guest OS:
1. As mentioned above, where appropriate, always keep the virtual disks de-fragmented.
It does make a small improvement to performance and disk size. Obviously, the more fragmented the disk, the worse the performance and the bigger the file size.

2. Use the minimum number of CPUs per guest OS.
Contrary to “real” computers, more processors does not equal more power. In fact, it can equal less power. If you have a dual or quad core host system, synchronising your cores across the guest OS, with the host OS’s use of them is actually likely to degrade performance, not enhance it. A CPU can only process one thing at a time (albeit pretty damn quickly), so each instruction has to queue and be run in synchronisation. It’s likely that if you try your guest with just one CPU, it will perform better than if you try it with two. Especially if you are using more virtual CPUs than you have physical.

3. Always choose the SCSI disks over the IDE.
As can be seen here, a virtual IDE controller will use more CPU load than a virtual SCSI controller.

4. Always install VMware Tools on the guest OS.
It allows the guest to stay in better communication with the host and will help.

5. Pre-allocate disk space.
It’s faster but it makes the storage requirements more of a problem. Your call.

6. Disable anything you don’t need.
A guest VM does not need visual pretties, high res wallpapers, screensavers, etc. Turn them off. You don’t need a fancy Matrix-style screensaver that requires 40% of the CPU and 512MB of RAM, on a screen no one can even see. Any services you don’t need, as well.

7. No RAID.
There is no sane reason why the guest OS needs virtual disks in a virtual RAID. This makes no sense – they’re almost certainly just files stored on the same physical disk or RAID anyway – let the Host OS worry about RAID.

8. Don’t use Snapshots.
They really slow Guest OS systems down.

Speeding up the Host
There’s only so much you can do on the guest, to make an impact, if the host is running slow. So let’s address what we can, there, as well. You’re likely to find a bigger impact on the Host than the guest.

1. Set up the hard drives in the most efficient, fastest fashion.
Obviously, a slow software RAID is going to degrade performance – but you may not have a choice. I myself use a software RAID-1 on my VMware Host because I am willing to sacrifice some performance for peace of mind and i don’t have the money for a real RAID card – but I acknowledge the performance will be degraded.

2. Don’t over use resources.
You have a finite amount of RAM and number of CPUs. Deal with it. Don’t allocate 10 VM guests, with a CPU and 2GB of RAM each on a dual core PC with 4GB of RAM and then complain things are slow. If you care about performance, then allocate 1 CPU to the Host OS, and 1 CPU per guest. Ensure the Host OS has enough RAM to do its job and don’t allocate more RAM than you have, physically.

3. The Host OS must be minimised.
The Host OS should not need to run a web server, etc, etc. It should be a VMware server. That’s all it should be doing. Don’t install junk you don’t need and, if possible, don’t use Windows as the Host OS. This is because you can squeeze a lot more performance out a Linux host, with a much smaller footprint. You won’t need to run anti-virus products, etc, which all hog memory and CPU cycles.

4. The Host OS should be maximised.
Maximise the performance of the Host OS and the way VMware Server 2.x interacts with it. See below for practical ways to do this, right now, with next to no effort. They make a very noticeable performance.

5. Disable power management on your Host OS.
If you’re running Linux, compile the kernel to use noapic, (you may need to do this anyway, on an AMD chip). See the link (also on this blog) as to how to do this.

6. Synchronise the CPU speed on the Guest and Host systems.
See this entry (on this blog) as to how to do this.

7. Set the Host system BIOS up for maximum performance.
There will almost certainly be an option in your BIOS for maximum performance. Basically, this sets the CPU timer to be constant, not cycling down to conserve heat / power, etc.

8. Separate physical disks for OS and VMware Guests.
This way, the OS read / writes don’t interfere with the VMware guest disk I/O. Obviously, the faster the disks, the better.

9. Make some config changes to your Host VMware Server.
Out of the box, VMware works fine – but performance isn’t great – especially disk I/O. The below changes make significant improvements over default performance.

Changes to the VMware configuration (assuming Linux Host OS).
1. Edit the /etc/vmware/config file. Add the following:
tmpDirectory = "/tmp/vmware"
mainMem.useNamedFile = "FALSE"
sched.mem.pshare.enable = "FALSE"... Read more
MemTrimRate = "0"
MemAllowAutoScaleDown = "FALSE"
prefvmx.useRecommendedLockedMemSize = "TRUE"
prefvmx.minVmMemPct = "100"

Basically, what we’ve done here is set a new temporary directory for VMware to use (we’ll come to this in a minute). Then we’ve told it use no more memory than we actually have and to stop sharing it between guests (much faster), not allow memory trimming and cut out sharing of certain resources.

2. Give VMware it’s own temporary location (swap) for files.
As you see above, we’ve defined a new location for VMware to keep it’s swap info, instead of in the regular file system. Aside from the above, we now need to make a location “/tmp/vmware“. We then create the following entry in /etc/fstab, so we can define this location as new file system:
tmpfs /tmp/vmware tmpfs defaults,size=100% 0 0
Now Linux knows this location is a temporary file system – think of it a bit like a swap file.

Once you make the changes above, you can expect to see a reasonable performance improvement, as opposed to a “vanilla” VMware Server 2.x environment. I can personally attest to a really noticeable disk I/O improvement, especially on Windows based Guest systems.

Running RRAS on a VMWare Windows Host Server

Posted on May 6th, 2009 in Howtos, VMWare, Windows Admin by Rodney

Recently, a client of mine who has a single Windows SBS server, had the urgent need for a SPAM filter to be installed. Having had lots of fantastic experience with ESVA in the past, coupled with knowing they had a very limited IT budget, I suggested firing up a VMWare appliance on their server (which is insanely over-powered for its task and can easily handle an ESVA VM session).

Installation went smoothly and would you believe in 4 days, the ESVA appliance has blocked… wait for it… 1,137,381 SPAM emails. A frikkin’ million! That’s over 250,000 a day!

After a day, however, people who work off site started to report they could no longer VPN in. It turns out that VMWare breaks Windows ICS, which in turn breaks RRAS (VPN).

I Googled around for a solution and went through the VMware forums but to no avail. Long story short – mail filter: good. VMWare on a SBS Domain Controller trying to run RRAS VPN: bad.

So tonight I decided I was going to resolve this one. And it turns out, a little trial and error was all it took. It’s actually very easy. Here’s how to get RRAS VPN working again, on a SBS 2003 Domain Controller, after installing VMWare Server 2.

1. Open the RRAS MMC Snap in.
Admin Tools > Routing and Remote Access

2. Right click on the server name and select properties.

3. Select the IP Tab

SBS 2003 RRAS Properties

SBS 2003 RRAS Properties

4. Go to the adapter and change it from:
Allow RAS to select adapter
to the adapter which you require the VPN connections to be made to.

The problem is, with the VMWare virtual adapters created by VMWare for use with Host Only Networking, the RRAS server is trying to connect people to these adapters. Of course, they’re in virtual (and false) subnets, so they go nowhere. Forcing the connection to the correct adapter takes the guess work out of the equation and resolves this issue.

Hope that helps!

VMWare guest clock too slow

Posted on October 23rd, 2008 in Howtos, VMWare by Rodney

Ok, so earlier we discussed the VMWare guest clock being too fast. That one could be fixed by setting the CPU frequency in the VMWare.conf file.

However one thing that’s driving me nuts for ages is why my 2.6 kernel guests are losing time. Really badly – like 1 minute every 2, almost. Of course, it’s been one of those “I’ll fix it later” issues but tonight I decided the time had come and I was going to fix it now.

Unlike the clock running too fast, this one requires work on the guest OS, not the host. We have to modify the grub.conf file (in Redhat varients, you’ll find this in /boot/grub/grub.conf), so the kernel boots with the following switches:

clock=pit noapic

E.g.

title CentOS (2.6.18-92.1.13.el5)
root (hd1,0)
kernel /vmlinuz-2.6.18-92.1.13.el5 ro root=/dev/md0 rhgb quiet
initrd /initrd-2.6.18-92.1.13.el5.img

would become

title CentOS (2.6.18-92.1.13.el5)
root (hd1,0)
kernel /vmlinuz-2.6.18-92.1.13.el5 ro root=/dev/md0 rhgb quiet clock=pit noapic
initrd /initrd-2.6.18-92.1.13.el5.img

This is, frankly, kind of annoying. In my case the box was only using one CPU so I don’t mind the NOSMP switch. I honestly couldn’t tell you if it’s essential, so you may wish to play with it. Some people report success with just clock=pit but others report that doesn’t help.

VMWare guest clock too fast?

Posted on June 6th, 2008 in Howtos, VMWare by Rodney

I have found my Windows VM sessions clock are often way out of whack. A bit of investigation found that this is actually related to the Linux OS host OS I am running VMWare on.

SO how to fix it?

VMWare have a thread on this issue.

Basically you need to:
1. Stop VMWare. This can be done as follows (assumption RedHat variant):
[root@selene ~]# service vmware stop
This will stop your VM services and any running sessions – so close them gracefully first.

2. Find your maximum theoretical CPU frequency.
[root@selene ~]# cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq
This will give a result something like: 2000000.

3. Edit your VMWare config file /etc/vmware/config and insert the following (with your CPU speed):
host.cpukHz = 2000000
host.noTSC = TRUE
ptsc.noTSC = TRUE

4. Restart VMWare (service vmware start) and you’re done.