Posts Tagged ‘Windows 7’

vSphere Client on Windows 7

Saturday, October 31st, 2009

One of the biggest niggles I had (and continue to have) with VMware’s ESXi hypervisor is that its management tool (the “vSphere Client”) won’t run on Windows 7. It installs well enough, but try and actually run it and you’ll simply be told:

vsphereerror1

Click the OK button there, and you’ll get told rather more mysteriously:

vsphereerror2

And that’s a clue (to the initiated, at least!) that it’s something wrong with the .NET framework on Windows 7 that is causing all the grief. The fix for this problem has been around for a while and is scattered on various websites in slightly different variations across the wide expanses of the Interweb, so I claim absolutely zero originality for what follows. I’m only repeating it here so I can find it easily in the future and in a version that worked for me!

You need to use a PC running some version of Windows which is not Windows 7 for what follows. I happened to have a VM running Windows XP kicking about the place: it had Service Pack 3 installed, but that was about the only update it had ever received. I didn’t fancy taking the usual ‘Windows Update’ route, because that would have taken for ever, so instead I visited Microsoft’s website and obtained the .NET Framework 3.5 downloader by itself. Run that once it’s downloaded, and the entire .NET Framework gets downloaded and installed (all 60MB of it). Then you visit Microsoft again and download the Service Pack 1 for the .NET 3.5 Framework bootstrapper. Run that, and after another 52MB, you’ve got the SP1 version of .NET 3.5 and you’re in business. (I realise this sounds a long-winded way of doing it: the alternative that several other sites take is to simply provide a link to download the relevant file that we need from their own private websites. But I prefer not to obtain my system dlls from non-authorised sources, and I suspect others might think likewise! Doing it this way, therefore, you can be sure that the files you’re about to copy to your Windows 7 system are kosher Microsoft ones).

Anyway, once you’ve got a non-Win7 .NET Framework 3.5 SP1 installed, find the C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727 directory and copy the system.dll file you find there to your Windows 7 box. It has to go in a very specific location (that will only exist after you’ve installed the vSphere client, so do that first if you haven’t already done so). That location is: C:\Program Files (x86)\VMware\Infrastructure\Virtual Infrastructure Client\Launcher\lib. If you’re not running the 64-bit version of Windows 7, that first bit will be plain old ‘C:\Program Files’, without the ‘(x86)’ bit, but since I am running everything 64-bit these days, the x86-version of the path is what I used. If the “lib” directory doesn’t already exist inside the Launcher folder, just create it and then copy the .dll to there.

In that Launcher directory, too, you’ll find a file called VpxClient.exe.config. Right-click that and open it in Wordpad. Welcome to the wonderful world of XML editing! The rules here are simple: you add these three lines to the file, immediately after the </appSettings> one and immedately before the final </configuration> one:

<runtime>
<developmentMode developerInstallation="true"/>
</runtime>

Make sure the double quotes around the word ‘true’ there are proper ones, not some fancy curly version that assorted web browsers or word processors might add to the mix. Save the modified version of that file which should end up looking like this in its entirety:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <system.net>
       <connectionManagement>
           <clear/>
           <add address="*" maxconnection="8" />
       </connectionManagement>
  </system.net>
 <appSettings>
   <add key = "protocolports" value = "https:443"/>
 </appSettings>
<runtime>
<developmentMode developerInstallation="true"/>
</runtime>
</configuration>

The new additions are highlighted there in red.

Finally, you need to add a new DEVPATH environment variable to your system. Click the Start “orb” button in your Windows 7 PC, then right-click the Computer menu option and select the Properties item from the context menu. Finally, click the Advanced system settings option from the left-hand pane. On the Advanced tab of the resulting dialogue box, click the Environment Variables button:

vsphereerror3

In the System variables section of the resulting screen, click the New button. Type in a new variable name of DEVPATH, and set its value to be the lib directory where you stored the system.dll file copied from your non-Win7 box. In other words, in my case, that would be C:\Program Files (x86)\VMware\Infrastructure\Virtual Infrastructure Client\Launcher\Lib:

vsphereerror4

Click OK as many times as it makes the various dialogues and their pop-up boxes disappear, and you should then be able to run the vSphere Client on your Windows 7 PC without a drama. As is apparently pretty standard no matter which version of Windows you’re running on, you’ll receive an initial ‘certificate warning’, but the correct response there is to select to install the certificate and then click the Ignore button:

vsphereerror5

Once that’s done, you’re definitely in the business of managing your shiny new ESXi server.

Virtualisation Bonanza

Tuesday, October 6th, 2009

It’s been a “long weekend” here in Sydney: today is a public holiday (though the occasion for it escapes me… perhaps something to do with Labour Day? Who knows!)

I’ve spent most of the day finalising my server setups. Now that my new desktop has arrived, my old quad core becomes The Other Half’s PC, and TOH’s old PC becomes my new ’spare server’. It’s not bad as these things go: dual core Core 2 Duo, 3GHz, 4GB RAM, 1TB hard disk space. So I thought I’d try a bit of free (as in zero cost) bare-bones virtualisation and see how I got on.

I started with Citrix Xen Server 5, then Citrix Xen Server 5.5 (the current release). I moved on to Vmware’s ESXi 3.5 and then Vmware’s ESXi’s 4.0 (again, the current release). I tried Hyper-V (Microsoft’s offering in this virtual space). And I wrapped up with a dabble with Oracle’s own VM-Server, version 2.5.

I’ll save the gory details for a later post, because it’s worth doing a proper side-by-side comparison of these things. But the short story is: Xen Server 5.0 installed extremely well, but when trying to create a Centos 5.3 x86_64 virtual machine, the Centos installer lost contact with the Xen Server’s DVD drive immediately after booting, rendering further installation impossible. Call that the deadest of dead-ends, then! This didn’t happen with the more recent Xen Server 5.5, however, and I was therefore able to install the Xen Server, its Windows client tools and create a Centos 64-bit virtual machine in precisely 27 minutes flat… which is amazing, I think, as these things go (especially as I was cooking dinner at the time). The only slight problem was that the Centos installation refused to install graphically and subsequently refused to run X at all… so it was a command-line only affair. That’s not the end of the world, of course, since it’s possible to run an X server on your Windows machine and have a graphical experience of a console-only virtual machine. But it’s not ideal.

ESXi Server was an extremely quick install, but it’s another 100MB download to get hold of the Windows remote administration client which is mysteriously called V-Sphere …and which, as it turns out, doesn’t actually run on Windows 7! There are workarounds: they involve downloading a dll which could contain absolutely anything from a website whose trustworthiness you have to take on, er, trust. And then you have to hack around a few XML files and keep your fingers crossed. Eventually, it does all work, but the experience is deeply, deeply nasty and not one I’d recommend.

Hyper-V was a success, in the sense that I had a working Centos 5.3 virtual machine within an hour and a half… but the graphics were all messed up, with the Centos machine needing to be set to an 800×600 display before it would display correctly on an old 1280×1024 monitor. Set it actually to display at 1280×1024 and it looked more like 3856×1900… very, very large and unusable! If you didn’t mind working in a tiny screen, or forever scrolling around an enormous one, I suppose you could call it workable. But yet another download (this time, 200MB+) was needed to get the Remote Server Administration Tools for Windows 7 installed… only then to discover that no matter what one did, you just kept being told that you lacked the permissions necessary to administer the virtual server. Apparently, if you faff around with assorted Group Policies and DCOM permissions, you might get it all working, but I never did. So, if you don’t mind running everything direct off the virtual server itself, no problemo. But if you want to manage it from your Windows 7 desktop, forget it, basically.

Oracle’s own virtualisation server was slick enough… but incredibly fiddly to use, with the need to pre-provision everything (such as the Centos installation disks) made incredibly difficult. (Think of it like having to pre-declare all your variables before being allowed to use them!) It doesn’t help that there’s still no Windows client software for remote administration of the virtual machines: so you’re reduced to creating a virtual Linux machine on your Windows desktop so you can administer a virtual Linux machine on your Oracle VM Server! Pathetic, to be honest, and far more trouble than it’s worth. Especially since installing the ‘client’ software involves an incredibly adventurous and lengthy install of a complete Oracle XE database server, plus a mountain of Oracle Application Server componentry. I kept seeing visions of sledgehammers and nuts, to be honest. After all that, there’s not even the facilty to just say, ‘please install from the DVD what I’ve just installed in the Virtual Server’s physical DVD drive’. Oh no. Nothing that simple. Various import options are available to make an already-obtained ISO usable as a VM installation source, but none of them worked for me. My server just sat there, promising me mountains of virtual pleasure, but denying me any of it. Meanwhile, I’d been forced to create an additional amply-apportioned virtual server simply to act as the managing remote client for the server I’d intended to create. Bizarre in the exteme.

Short story, then: Windows Hyper-V works, but remote administration is a bugger. Xen Server works incredibly simply, swiftly and elegantly…but without X, it’s a more complex command-line only experience (update: but this can be fixed!). ESXi is OK, but seems fiddly, and doesn’t have a good Windows 7 client. And Oracle’s own Virtual Server offering is a complete load of unmanageable nonsense as far as I’m concerned.

A detailed write-up to follow, in other words. Meanwhile, a lot of fun, even more frustration… and some surprising outcomes. (I had expected Oracle’s offering to be a lot more elegant than it was, for example!)

Fixing Samba

Thursday, October 1st, 2009

I’m not sure how long this has been necessary, but Windows 7 appears to have broken Samba. Maybe Vista did it before; maybe it’s been this way for a long time. Sharing a Windows share to a Centos machine is not something I’ve done a lot of lately, so I can’t say for sure. But this evening, I wanted to install 10gR2 on my new Centos 5.3 x64 machine -when you buy a new PC, your original PC becomes The Other Half’s PC, and TOH’s PC becomes a new Centos server. And then the music stops! The 10g installation software is now sitting on my Windows 7 file system, shared with one of those Microsoft wizard-y things. Over on the Centos box, I typed the straightforward command mount -t cifs -o username=dizwell //10.42.43.2/software /mnt. Pretty ancient stuff, and it’s always worked before. But not tonight. Tonight I was told:

mount error 12 = Cannot allocate memory
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

Well, if I’d taken the advice offered by that error message, I might have been there a long time! Because it turns out it’s not a cifs (the ‘proper’ name we give smbfs these days!) issue at all, but a Windows one. Specifically, it turns out that if you look at your Windows event log (easier said than done in Windows 7!! It’s buried away in Control Panel -> System and Security -> Administrative Tools -> Event Viewer), in the Windows Log -> System branch, you’ll see the red exclamation-marked Error with a source of “srv”. Drill into that, and you’ll see the message:

The server was unable to allocate from the system nonpaged pool because the server reached the configured limit for nonpaged pool allocations.

The fix for that is to fire up the Registry Editor (click the Start Orb, type in regedit in the search programs and files window and press Enter) and navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\LanmanServer\Parameters. Once there, I had to create a new DWORD (32-bit) Value, called IRPStackSize, setting its value to Decimal 15. Reboot the Windows machine at that point, and when it comes back up, exactly the same mount command as issued previously on the Linux machine will now work just fine.

Update: Google reports this same issue going back to at least 2006, so it’s definitely not new. I also found there reports that suggested it was the reboot of the Windows box after the registry change that was the key to the “fix”, rather than the registry change itself. And I also found this site suggesting a completely different registry fix for the same problem. The fact that two different registry entries appears to ‘fix’ the problem does suggest to my mind that it’s the reboot that’s the key, not the registry alteration, but that’s up in the air I guess. For the record, my LanmanServer\Parameters\Size key was set to 1 and remained so despite my change to the IRPStackSize value, and yet my mount command worked just fine second time around. Go figure!

Confessions

Saturday, September 26th, 2009

The new PC has finally arrived! It’s insanely fast and (which is even better) amazingly quiet: a mere whisper from somewhere under my desk. It was beautifully assembled by the lads at Auspcmarket.com.au, too, so if you live Oz-side, I thoroughly recommend them. Comparing their prices with those from, say, Arc or Zip Computers, they are always more expensive. But they deliver for free (at least, in metropolitan areas, which is why I always get them to deliver to work) and, if this PC is anything to go by, they take great care and enormous pride in building the thing nicely. Spare cables tied back, everything mounted/installed correctly, in-use cabling discretely hidden and tucked out of site. The nicest build job I’ve ever seen, come to think of it… which means, I don’t care if their competitors are a bit cheaper. They’re worth it (and no, this isn’t a cash-for-comment slot!). When you see how well this stuff can be done, it’s no wonder that I haven’t built my own PCs for a good four or five years, that’s all I can say!

Anyway, it’s now time for a confession of sorts: I’ve installed Windows 7. I just couldn’t be bothered stuffing around trying to get Ubuntu to handle Blu-Ray. I like Ubuntu enormously, but at the end of the day, I shall be just a little bit more productive with Windows 7, despite being just a little less free. Those who are prepared to trade liberty for productivity probably deserve neither, to paraphrase my old mate Ben Franklin -which is no doubt true, but I could honestly see no practicable alternative. Backing up my movie collection to disk is what I do; backing up my Blu-Rays to disk is something I really want to do. Ubuntu wasn’t going to cut it; end of story, really. Can you tell I’m “conflicted” about it? Well, I am. No two ways about it: open source is where I would like to be, and Ubuntu is a damn fine operating system. However, E.M. Forster put it this way at the end of A Passage To India:

‘Why can’t we be friends now?’ …. ‘It’s what I want. It’s what you want.’ But the horses didn’t want it – they swerved apart; the earth didn’t want it, sending up rocks through which riders must pass single-file; the temples, the tank, the jail, the palace, the birds, the carrion, the Guest House, that came into view as they issued from the gap and saw Mau beneath: they didn’t want it, they said in their hundred voices, ‘No, not yet,’ and the sky said, ‘No, not there’

Some other time, then!

All that said, I like Windows 7 (and have done since the Beta appeared in January of this year). I’m running the production version, which isn’t due to hit the retail channels for another month, thanks to my MSDN subscription. It’s fast(ish), and slick (sort of) and more than acceptable. It also runs everything I need it to do, including the stuff that lets me back up my DVDs and Blu-Ray disks. It’s still Windows, however: which means, it lacks a lot of things I’ve come to rely on (drop-down console, for example; multiple virtual desktops, for another). These things can be rectified, of course, but it would be nice if you didn’t have to “rectify” Microsoft’s latest and greatest. Virtual desktops ought to be a basic feature of any OS these days, I’d say. Similarly, there’s all the DRM stuff to deal with, for which workarounds exist, but which -morally, I suppose- there shouldn’t be a need. So I definitely have a “dirty hands” feeling, but I also know it all just works, without much effort or imagination (just a lot of driver disks and extra software downloads and installations!)

Fundamentally, it’s less fun to use than Linux. But it’s also more straightforward in many respects.

I’ll be documenting some of the workarounds I’ve mentioned in the next few posts. Meanwhile, forgive an apostate his weaknesses…

Curses!

Friday, August 28th, 2009

I am lucky in my place of employment: I am pretty much free to run whatever operating system I like and install whatever applications I feel the need for, without anyone getting upset and whispering the dread acronym ‘SOE’ in my ear. For the past three months, therefore, I’ve been running Ubuntu 9.04 on my work PC, just as I do at home. It’s worked beautifully for the most part: I occasionally get sent spreadsheets with more than 65,000 rows which OpenOffice is therefore not capable of handling, but nothing a VirtualBox XP virtual machine with an Office 2007 installation couldn’t fix. Similarly, Thunderbird is not a particularly great Microsoft Exchange client, but in its IMAP mode, it served well enough for my purposes. Perhaps the stickiest moment I had was getting an appropriate PL/SQL development tool working: as I’ve documented in these parts before now, the in-house product of choice is PL/SQL Developer, which is a Windows-only product. I’ve tried hard to love the Java-based (and hence completely free and cross-platform) SQL Developer from Oracle, but it’s been a tempestuous affair and hasn’t progressed particularly well! So, PL/SQL Developer it more or less had to be… and, thanks to Wine, it worked pretty well.

Until yesterday.

I had occasion to write a procedure that would add an ê (e-circumflex) to certain fields of certain records. Not very complicated, written and compiled in a jiffy. The only thing was that it didn’t take long to notice that a lot of data was turning up with ¿ characters in them (upside-down question marks). So I opened the procedure in my Wine-cum-PL/Developer, and sure enough: there was my code saying to append ¿ to data. I assumed I’d had a typo fit, and edited the code to once again specify field=replace(field,’e',’ê’).  I hit F8 to compile the corrected code, and it all looked fine. Shut the procedure down, and re-open it… and the upside-down question mark was back once more!

So I opened up my XP virtual machine, and manually typed in a couple of test cases, such as these:

SQL> select 'Ø' from dual;

'
-
O

You might notice that the output is missing the forward-slash that the input contained. This is the sort of thing that happens when your Windows client is operating in classic ASCII mode whilst the database is running in, say, the WE8ISO8859P1 character set. Sure enough, a drop-down to the command prompt and a quick chcp later, and this was the result:

C:\>chcp
Active code page: 437

…and code page 437 is pretty much standard 7-bit ASCII for US Markets. Switch it to code page 850 (Multilingual Latin I), however, and the problem goes away:

C:\>chcp 850
Active code page: 850

C:\>sqlplus sys/password as sysdba

SQL> select 'Ø' from dual;

'
-
Ø

…and now the output and input match exactly. So, from my XP virtual machine, I knew that the tendency of my procedural code to forget the ‘extended’ character I’d typed was probably code page-related. Had I been running ‘true’ XP, I could have set code page 850 as my system-wide default and PL/SQL Developer would have picked up on that change and worked fine thereafter. But I was running PL/SQL Developer courtesy of Wine emulation (and yes, I know that Wine Is Not an Emulator, but let’s not get pedantic!)… and I was (and remain) unaware as to how one goes about setting a default code page for programs running via Wine. Probably there’s a configuration file edit to be made that accomplishes the trick, but if so, I didn’t know what it was… and Google wasn’t any help either.

In short, my principle development tool, on my OS of choice, was incapable of storing anything but plain ASCII characters in code… and I had a (pressing!) need to store ‘extended’ characters. The immediate fix was quite simple: fire up Oracle’s own SQL Developer and edit the procedure in that. Another paste-in of the correct ê character, a compile and a final re-open: the correct extended character was there, just fine. Problem solved. However, I was left in the position that if I ever re-opened that code in PL/SQL Developer and hit ‘compile’, the wrong character would be compiled back into the code. Effectively, therefore, PL/SQL Developer-via-Wine was now no longer usable.

So I did what all sensible people would do in that position, I like to think: install Windows 7 and say goodbye to my workplace desktop Ubuntu experiment. :-(

Well, there were probably a lot subtler ways of fixing the problem properly, and if you know how to set a default code page for Wine, I’m all ears. But Windows 7 did install impressively fast (24 minutes, all up), and it’s not a completely unpleasant OS to use… and PL/SQL Developer works out of the box, with the full panoply of Western European characters available, no problem, no sweat.

Sadly, I shall probably have to do the same at home this weekend, because I like to keep my work and home environments pretty much as mirror images of each other. So it looks like Windows 7 will win the war of my particular set of home desktops after all. I am however happy to report that my old laptop, which serves very effectively as a DNS server, as well as a router via the Bigpond Wireless Broadband account, will remain running Ubuntu (especially since the broadband and Internet connection sharing runs much better on Ubuntu than it ever did on Windows). Some small comfort, perhaps…

Windows 7 and the prospect of doom

Tuesday, August 4th, 2009

One of the big claims to fame for Windows 7 (apart from it being ‘Vista done right’) is that it finally provides an upgrade path for all those ancient (i.e., circa 2004!) machines still going strong and running XP. For example (and not being too picky about the examples found in a casual trawl of Google this morning):

  • Keith Combs talks about Windows 7 ‘breathing new life into old machines’.
  • Stuart in the UK finds running Windows 7 on an old machine ‘perfectly usable’
  • Dwight Silverman thinks that Windows 7 “runs quite nicely on older hardware”

And so on and on.

My experience is somewhat different.

I recently decided that I’d like to do the ‘home theatre PC’ thing properly: at the moment, we’ve got a Topfield for doing TV recording, a Squeezebox for doing audio playback and a Western Digital WDTV to do playback of MKV-encoded movie files. All works well, but there’s about 3000 light years of cabling to make that lot happen, plus 450 different remote controls (I exaggerate only slightly, hopefully for dramatic effect!)

Anyway, as proof-of-concept for the HTPC idea, I bought an el-cheapo WinFast DTV1000S TV Tuner card. Now, doing my usual Google research, I knew ahead of time that the DTV1000T worked well in Linux and that the DTV1000S didn’t. So, whilst I’m hoping eventually to do a Mythbuntu setup, this wasn’t going to be possible right now. Besides, when we finally go ‘into production’, I’m going to want a dual tuner card as a minimum… but, as I say, all I’m doing for now is testing the concept.

So, I installed my shiny new TV tuner card into a fairly ancient (2004?) Pentium 4 machine I have, courtesy of work’s disposals process. Not bad specs, all things considered: 4GB RAM and a 3GHz hyperthreaded CPU. The machine also uses a Netgear wireless network adapter and an old ATI Radeon graphics card.

Windows 7 installed flawlessly and reasonably quickly -with the only slight problem being that it used an 800×600 screen resolution, had no network connectivity and no audio. Out came the ancient CDs containing the relevant drivers, therefore: network, check; audio, check. Graphics? Well, there we entered the deep, dark caverns of blue screens. Every time the ATI installer started to do anything, the machine would crash. After the sixth attempt, I gave up.

Out comes my Athlon 64 3500+ of about the same vintage: only 2GB RAM and an ATI RX300 graphics card. Again, Windows 7 installed easily… and again, no network, no audio and no proper graphics. Audio driver installed from CD, check. ATI graphics drivers installed, check. This is looking good! Network drivers…. nope. The drivers installed OK, and there wasn’t a blue screen to be seen: but in the Device Manager listing, there’s a yellow exclamation mark superimposed on the network card’s entry and a pop-up message informs me that the device cannot work (yet it has worked perfectly well in XP before now).

The net result of all this palaver is that I can actually watch live TV on the Athlon box, via Windows 7’s pretty attractive Media Centre extension. It’s as slow as all buggery to change chanels and do anything useful (but this is merely proof of concept, so I’m grateful for the lesson that I need a dual core or better to get a decently-responsive HTPC), but it does at least work. But not much else about the PC is usable -for, without a network connection, TV program guides and minor things like OS patches are inaccessible.

I’m not saying it’s completely rubbish. But this claim that Windows 7 will breathe new life into ancient hardware is looking a bit of a joke to me right now. Hardware for which XP drivers are abundant and highly functional are suddenly mere chunks of inert plastic, silicon and assorted heavy metals in the presence of Windows 7. All those people with 5 year-old PCs thinking that an upgrade to Windows 7 will be a piece of cake are in for a bit of doom and gloom, I’m afraid: sure, Windows 7 will install quickly and without fuss. But all will then shortly be revealed: a bunch of perfectly reasonable hardware that ought to be functional but which most definitely isn’t.

I’m not sure I blame Microsoft for that, really: I have a deal here with The Other Half that I’m allowed to buy a completely new PC every 18 months, and that sort of rate of turnover seems realistic to me, given the rate of change in the IT industry generally. I wouldn’t, in other words, particularly wish to be running a 5 year-old PC, and it seems reasonable to me that the OS vendors wouldn’t necessarily support that sort of vintage hardware. I’m just saying that the hype that we’ve seen a lot of lately, that Windows 7 will ‘breathe new life’ into venerable hardware, is (on my limited experience) hopelessly optimisitc. People are still going to have to upgrade their hardware before the OS will provide what they’re used to from XP, I reckon. And yet another quick Google search suggests I might not be entirely alone in that thought!