Hyper-V Server 2008 R2
New Hyper-V Server is finally out. While it was already available for MSDN subscribers, not everybody can download it.
What are you waiting for?
I already wrote a little about new, Windows 7, edition of Virtual PC. I was mostly satisfied with changes but I did notice that it was quite simplified.
Unfortunately one of things that was removed was support for operating systems different. Naive version of me though that this was due fact that Virtual PC is compatible with them out-of-box. I was wrong.
While in good old Virtual PC 2007 SP1 you got asked upon creating of virtual machine whether you want to use Windows or “Other” inside of it, that question is gone now. And while I could install FreeNAS in Virtual PC 2007, there is no way of installing it in new Virtual PC. Installation just hangs.
I cannot say that this is purely Microsoft’s fault since FreeBSD has few issues with hardware handling itself, but it is very annoying when something that worked before just stops working. Even worst, code that handles FreeNAS is probably still somewhere deep inside of Virtual PC. It is purely design decision that caused it not to be accessible from user interface.
While on real systems I use Hyper-V Server for running *nix-like thingies (and that works great), that is not real option (since it does not exist) for testing on my laptop machine with Windows 7. On it I am currently playing with VirtualBox. This tool does have unsure future (Oracle-Sun trading) and sometimes I need to go to command line to accomplish simple things (VHD support), but it does allow me to install whichever OS I want.
New Hyper-V Server is finally out. While it was already available for MSDN subscribers, not everybody can download it.
What are you waiting for?
I always had a thing for file servers. Usually, I would just take some old machine, throw few hard drives inside and consider it done. However, as I got married, noise of computers became issue. I was just something I didn’t notice before - all my “servers” were noisy like hell. In order to keep wife happy, I decided to invest a little into small machine without any fans. My final decision fell onto PC Engine’s alix1d system board with box1c. While this is not most powerful machine, I considered it’s 500 MHz CPU and 256 MB of RAM enough for a task at hand. I just slammed small 2.5" hard drive inside of box and it was ready to serve.
My first idea was to install Windows Home Server, but there were two problems with it - MSDN subscription didn’t cover it at the time and it’s system requirements (1 GHz processor / 512 MB of memory) were too high for this machine to handle. After some testing, my initial installation was done with Windows Server 2003 and I had it going for quite a while (more than a year actually). However, Windows were not lively on this machine (probably has something to do with slow processor and not enough memory). Since that machine was used only to share files, my though were on giving it a little boost by installing Windows XP on it.
At that time I was preparing setup for one Hyper-V server and in order to do file sharing I decided on FreeNAS. This free solution was quite good for NAS tasks at hand especially because it could fit inside of 128 MB of RAM. That way, I would give it enough to work with and impact on other Hyper-V machines would be minimal. It took me a while to notice that it could be solution for my problem also.
Since my machine has support for Compact Flash, I decided to install FreeNAS on it. With Windows 2003 on hard drive, this would also mean that my original installation will be left intact and a backup solution in case of any problems.
I decided on version 0.7 RC1 which was latest version that I already tested to work in Hyper-V so that gave me confidence to try it on real machine. I was surprised with CD booting process that was painfully slow and after a while it would just stop at:
Using device=/dev/fd0 fstype=msdos to store configuration.
It would stay there no matter how long you wait. Upon pressing Ctrl+Alt+Del it would complain about parsing errors in config.xml and go into shutdown. My first thought was that there is some error on CD. However, same thing repeated with other CD’s with different versions. Only than it occurred to me that I should run it in safe mode.
Once I selected safe mode, CD install was still slow, but it worked. However same issue occurred with booting process on installed version. Only difference was that it was left hanging at:
Starting devd.
Safe mode still helped but since this machine was to be left unattended, it wasn’t really a solution.
Next step was to disable things in BIOS one-by-one and culprit was found in ACPI power management. Once that was turned off, booting process went without a hitch.
I have it installed for a month now and I must say I am satisfied. Temperature of hard drive went from 50°C to 40°C just because of using flash media as system drive and having data drive sleep most of time. While level of comfort is little bit different (scripting in tcsh vs. programming in C#) and, although sometime I miss my remote desktop, this little guy does it’s duties well.
I am always puzzled with airplane boarding times. On each step of a way you are warned that this is essential for timing. Then you come to the gate and wait. And wait.
Since this delay happens so often, one could expect airliners to move boarding time a little. But, of course, boarding time for aircraft with 50 seats and for one with 100 is completely the same.
In this era of computers, is it so hard to check old boarding data and optimize process a little?
P.S. Here I must note one single exception - Malév. That Hungarian airliner is always boarding on time. Why other cannot do the same?
HRESULT (a.k.a. SCODE) is one of data types you will see when playing with COM objects.
Although data type is called result handle, it is not handle to anything. While this may seem like nitpicking, there is one very important difference in case of 64-bit systems. This value is always 32 bits in length (UInt32) while true handle would be either 32 or 64 bits (IntPtr).
Another thing that may strike as unexpected is that result of successful operation is not necessarily 0 as you may expect from your Windows API experience. This value has total of seven sub-types but in reality only three are used.
Severity
If only check whether operation was successful is needed, you can just see state of first bit (31) (SEVERITY_SUCCESS or SEVERITY_ERROR). If that bit is cleared, you are fine. In case of trouble, that bit is set:
bool IsSuccess(uint error) {
return (error & 0x80000000) != 0x80000000;
}
If you have successful operation, you usually don’t care about other two fields. They are usually only handy when error occurs.
Facility
Second field is facility code that occupies bits from 16 to 26, so some bit-magic is needed:
ushort GetFacilityCode(uint error) {
return (ushort)((error & 0x07FF0000) >> 16);
}
If you get facility with number less than or equal to 8, you are pretty sure that it originated from Windows. If you have SEVERITY_ERROR and facility value is 0 (FACILITY_NULL), developer was too lazy to assign facility code.
Error code
Third field is most useful one. Bits from 0 to 15 give you real error code:
ushort GetErrorCode(uint error) {
return (ushort)(error & 0x0000FFFF);
}
In case of errors that originated somewhere in Windows API (and that is a lot of them) this will give you System error code (e.g. ERROR_FILE_NOT_FOUND). Even if error originated from some custom source, you can be almost sure that they reused it for same purpose. From this code you can pretty much deduce where problem lies.