Microsoft Windows and all that goes with it

FreeNAS on Hyper-V

Illustration

For small server installation, I decided to use FreeNAS. Intention was to put it in Hyper-V alongside other (mostly Windows) machines and have FreeNAS handle all file sharing between them. Since it was just internal element and there was no DHCP in internal network, fixed IP was to be used.

Only problem with whole setup is that it doesn’t work. Whenever I tried to access FreeNAS machine, it seemed not alive. When I reset LAN IP address in it’s console menu (option 2) it was live again only to be silent on next reboot. That meant that every time NAS is restarted, manual intervention would be needed to make it accessible. Not exactly a comfortable setup.

Fortunately, solution is quite simple. First setup FreeNAS’ IP from console window. Once that part is completed, you will have access to web GUI where second part will take place.

In “System” -> “Advanced” menu go to “Command scripts” and there add two commands:

ifconfig de0 down
ifconfig de0 up

Type for both commands should be set to “postinit”. This will ensure that network adapter is reset on every reboot.

Once done with this, save and shut whole system down. Power it back for testing. If you did it correctly, you should have FreeNAS available.

XP Mode Is Done

Illustration

Only days separate us from being able to download final release of Windows XP mode. As of yesterday, it has hit RTM milestone.

Those that already have RC installed should not see big difference and hopefully seamless upgrade will be possible.

Wireless in Windows Server 2008 R2

Illustration

If you use/test Windows Server 2008 R2 on your laptop, you will notice that your wireless adapter is disabled by default. And you will also notice that you cannot enable it no matter how many times you try. Problem is that wireless connection requires Wireless Zero Configuration service running and that one is not installed by default.

Illustration

Only step that is required is adding “Wireless LAN Service” feature. Just go to “Server Manager”, select “Features” and after you click on “Add Feature”, you will get list with quite few features to select from. Only one that we need is “Wireless LAN Service”.

After quick installation (no reboot is required), your wireless is available once more.

Password Hint

Illustration

During installation of Windows 7 there is one point where you get asked for password. Thing that did surprise me is the fact that it requires password hint to be filled. While I do see use and benefit of it, especially for accounts that are used only occasionally, I cannot understand why that hint was made required parameter.

Even worse, if you chose not to have password and add it only later, password hint is not mandatory any more. Seems like a little inconsistency to me.

Shutdown Event Tracker

I have dual-boot installation of Windows Server 2008 R2 in order to play with Hyper-V. I run it only occasionally and thus I am quite annoyed with shutdown event tracker. While I can understand benefits in normal scenarios, it is quite unnecessary for test installations.

Problem here is that there is no obvious check-box that would disable it. However, Group policy comes to rescue.

Open Start menu and select Run (or hit ) and type gpedit.msc. Press OK and that should open Local group policy.

Go to “Computer Configuration” > “Administrative Templates” > “System” and on right side you should see “Display Shutdown Event Tracker”. It’s common state is “Not configured”. That configuration will cause server OS (Windows Server 2008 R2) to display it while client OS (Windows 7) will not.

Setting this value to “Disabled” removes this annoyance.

Programming With Remote Assistance

Illustration

I needed to do some programming on other PC and Remote Desktop was obvious solution. However, since it wasn’t my computer, I felt uneasy doing something while other person could see it. Next best choice was Remote Assistance.

If you intend to write code via Remote Assistance be aware of some issues:

1. Mailing invitation doesn’t work every time.

For some reason, mail invitation works in aproximatelly 50% of cases. I could blame corporate firewalls and proxies, but it seems to me that, if you are going to have such feature, you need to anticipate those problems.

2. You need to work in window.

For some reason, you cannot go into full screen in order to see other side. You will stay in window and, since there is chat window and some status around, destination needs to be a lot smaller. My home resolution was 1280x1024 and I could manage only 800x600 on other side. Second solution would be to scale window, but it is very hard to program if all you see is bunch of pixels.

3. Escape key is used for disconnect

Every time you hit escape key, you will disconnect remote control mode. In order to continue working other side will need to approve you again. And again. And again. If you are used to close windows with escape key (e.g. Intellisense windows), you will disconnect a lot.

Reasoning behind that “feature” was understandable. Allow user to disconnect at any time if he/she sees suspicious behaviour of repair-man. However, that does not explain why it disconnects when remote side hits escape button also. I doubt that there is scenario when remote side wants quick way out - especially mapped to escape key.

I did solve it after ten or more disconnects. I took screw driver and popped it out.

Conclusion

While I cannot say that I enjoyed this much, it was enough to get job done. I assume that with this solution it is as good as it will get.

Disabling Password Complexity Requirements on Hyper-V Server 2008 R2

Illustration

Microsoft’s Hyper-V Server 2008 R2 is a great product. It is free, it has small disk footprint (< 4 GB) and you can control every aspect of it from another computer with Management Console. Or to be more precise, every aspect except for one.

If you decide to make standalone Hyper-V Server install (without adding it to domain), you have small problem with password selection. Every password needs to pass complexity requirements. While those requirements are not too harsh, they are quite annoying if all that you want to make is test installation with your common password (and everybody has one of those).

Everybody who installed Windows Server knows solution - just use Local Security Policy. It will not work here since MMC is not supported on Hyper-V Server 2008 R2 and Local Security Policy is probably only MMC snap-in that cannot be used on remote computer.

Rescue comes with secedit.exe. Whole purpose of this command is to export and import security policies, but in unfriendly manner.

First step is to export our current policy:

secedit /export /cfg X:\new.cfg

The task has completed successfully.
See log %windir%\security\logs\scesrv.log for detail info.</pre>I would recommend putting this file on USB or network drive since Hyper-V Server 2008 R2 doesn't include unicode text editor (notepad.exe works only with ANSI). Once you do manage to open file in normal editor, you will be presented with good old INI format. We are interested in PasswordComplexity value within [System Access] section.
[System Access]
MinimumPasswordAge = 0
MaximumPasswordAge = 39
MinimumPasswordLength = 0
PasswordComplexity = 1
PasswordHistorySize = 0
...

Value should be changed to 0 in order to disable complexity check.

After this edit, it is time to go back to our server and perform configuration:

secedit /configure /db C:\Windows\security\new.sdb /cfg X:\new.cfg /areas SECURITYPOLICY

The task has completed successfully.
See log %windir%\security\logs\scesrv.log for detail info.

There are no restrictions on location of your security database, but I like to place it in C:\Windows\security. It seems like logical location to me.

Areas parameter controls which security areas will be configured. While one could import all areas with this, there are two reasons why this should be avoided. First reason would be that, by default, you cannot import everything - Hyper-V server will return error since some settings are non-existent there. Second one is just plain common sense. Why would you risk stability of your system by importing stuff that you never intentionally wanted to change?

Once this operation is completed, you can press and change password to whatever you wish.

Windows Virtual PC and FreeNAS

Illustration

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.