Windows 2008 Hyper-V and Solaris 10

Update 8 April 2008 --- Microsoft broke the legacy network adapter in Hyper-V RC. Apparently Sun and Microsoft are working together to make Solaris work as a guest operating system, so hopefully this will be fixed in a future update.

This documents my experiments with OpenSolaris 10 (Solaris Express), Jan 2008 edition, getting it to run under Hyper-V (release candidate) on Windows Server 2008 (public product release).

The current (2008 Q1) release of Solaris 10 does not work on the release candidate of Hyper-V due to bugs in the Hyper-V BIOS (according to Sun). The 2008 Q2 release, which is otherwise known as Solaris 10 Update 5, will apparently work with Hyper-V, according to Sun. So at the moment I am limited to OpenSolaris 10 (January 2008 release) which is why I chose it and not the official Sun Solaris 10 product.

Creating The Virtual Machine
When creating the virtual machine,
don’t skimp the RAM allocated. It requires a minimum of about 900Mb and it will install significantly quicker with more than that, as otherwise it will swap, which is very slow. I gave it 1300 Mbytes and it did not appear to swap.
In the BIOS settings, set it to boot off IDE then CD, which will prevent it repeating the installation should you forget to eject the DVD image at the end of the installation process.
Remove the network adapter and add a ‘Legacy Network Adapter’ connected to your virtual network in Hyper-V that connects to the external physical network adapter.

Fetching the ISO
You can download the ISO image of OpenSolaris from http://www.opensolaris.org/os/project/indiana/resources/getit/, which will link through to www.sun.com to do the actual download. You will need to register on www.sun.com if you haven’t already done so.

Installation Choices
When you start it up, it will present a text menu of different installation choices. For the easiest and most reliable way to install, choose option 4 (interactive console session). Do not press Return!

Your network adapter should appear as device dnet0. When partitioning the hard disk, I would advise editing the default layout. Remove the /export/home slice altogether, and increase the size of the / slice to fill all available space left on the disk. By default, Solaris always gives you a tiny / partition, which causes endless trouble later when lots of space is needed to install patches and their back-out information. You really do want a / as big as possible.

Set it to manually eject the CD/DVD and manually reboot.

Install all the software. The OEM support is not necessary, but install everything else. The total installation should take around 2½ to 3 hours including all the time taken for you to setup the networking and disk layout, before the software installation process begins.

Note from Russ Blaine at Sun:
Just beware of one thing: Solaris doesn't work in 64-bit mode due to
Hyper-V bug #336932. After you install OpenSolaris, configure it to
boot 32-bit by removing $ISADIR from all paths in the grub entry.

Unfortunately I have set it to auto-reboot at the end of the installation process, so I’m going to have to try to boot single-user to change this, or modify the boot command-line at boot time to remove whatever $ISADIR might look like in reality, then edit it in multi-user mode if it gets that far.

Only Works in 32-bit Mode, not 64-bit Mode
So when it reboots, I choose “Failsafe” from the boot menu, and get into single-user mode. The new system it just built is available in /a, so I
At the end of the installation, before it reboots
TERM=vt100
export TERM
and then edit the /a/boot/grub/menu.lst file in the new installed system. Remove all mention is “$ISADIR/” from the boot entries in this file. If you don’t, it will crash as soon as it tries to boot. OpenSolaris only works in 32-bit mode, and the $ISADIR stuff will boot it in 64-bit mode.

Once you’ve fixed this, “reboot” and let it boot the default choice in the boot menu. Booting the first time will take several minutes.

Disabling Graphical Login Prompt
If you find it boots into graphical mode, and you are using it remotely via a Remote Desktop connection, you’re a bit screwed at this point as you have no mouse to do anything with. Let the machine settle, then reset it. Choose the “Failsafe” boot option which will eventually take you to a single-user prompt. You can’t edit the services database now, but you can edit the script that actually tries to start up the graphical login Happy So edit /a/lib/svc/method/svc-kdmconfig and change the file to do “exit $SMF_EXIT_OK” just before it sets the “TERM” variable. Then reboot and boot normally.

Once you have rebooted and logged in as root, you can stop it trying to do the graphical login at all:
svcadm disable /application/graphical-login/gdm
svcadm disable /application/graphical-login/cde-login

Verbose Reconfiguraion Boot
A verbose reconfiguration boot can be triggered by:
reboot -- -rv -m verbose
This works on Intel hardware by adding a temporary menu entry to the GRUB configuration. This extra entry will of course have the “$ISADIR/” strings in it, and so will fail to boot. So as soon as the GRUB menu appears on the screen, choose the “Failsafe” boot option. Say “y” when it asks you about mounting the real Solaris installation on “/a”. Once it has booted single-user,
TERM=vt100
export TERM
cd /a/boot/grub
vi menu.lst
and remove the strings “$ISADIR/” from the new section it added to the bottom of the list. Save and exit, then “reboot”. Then it will successfully boot in a very verbose mode, showing you exactly what it is starting and when. It will remove the extra GRUB menu entry automatically.

Outstanding Problems
I have still not managed to get any life out of the virtual legacy network adapter. Solaris is seeing and configuring the device, but not actually getting any packets in or out of it. Sad
Comments

Hyper-V beta Linux Integration Components

Update 31st March 2008: Microsoft have released the RC version of the Linux Integration Components and they are available at https://connect.microsoft.com/Downloads/Downloads.aspx?SiteID=495.

Currently, Microsoft have not made any version of the Linux Integration Components available for Windows Server 2008 Hyper-V virtualisation.

So, as a temporary solution until they get the new version out, I have made a copy available at
http://www.jules.fm/hyperv_linux.zip

I don’t think Microsoft can complain much about me doing this, it’s just a temporary solution for the few people who need it now and cannot wait until the new version is released.
Comments

Activating Windows Server 2008

Microsoft Windows [Version 6.0.6001]
Copyright (c) 2006 Microsoft Corporation. All rights reserved.

C:\Users\Administrator>cscript \windows\system32\slmgr.vbs /ipk VPWVT-.....-.....-.....-.....
Microsoft (R) Windows Script Host Version 5.7
Copyright (C) Microsoft Corporation. All rights reserved.

Installed product key VPWVT-....-.....-.....-..... successfully.


C:\Users\Administrator>cscript \windows\system32\slmgr.vbs /ato
Microsoft (R) Windows Script Host Version 5.7
Copyright (C) Microsoft Corporation. All rights reserved.

Activating Windows Server(R), ServerEnterprise edition (bb1d27c4-959d-4f82-b0fd-c02a7be54732) ...
Product activated successfully.


C:\Users\Administrator>

As easy as that Happy
Comments

Entourage 2008 and Exchange Server 2007

Out of the box, even with an Exchange 2007 server installation including support for Exchange 2003 and earlier (ie. a “legacy” install), Entourage 2008 simply does not connect to the Exchange 2007 Server. That’s pretty poor in my view, they are both the latest versions of Microsoft’s own products, and it just does not work. Pretty crap Sad

Hopefully this note will help you get them working together properly.

Start up an Exchange 2007 Management Shell from the Exchange 2007 Programs menu, and the IIS manager from “Administrative Tools”.

Delete the Exchange subweb from IIS on the Exchange 2007 server.
This only deletes it from IIS, it doesn’t take it out of the Exchange 2007 Active Directory data.
So when you try to create it with New-OwaVirtualDirectory, it will give an error saying it already exists.

So do this:
remove-owavirtualdirectory -Identity "exchange3\Exchange (default web site)"
remove-owavirtualdirectory -Identity "exchange3\Public (default web site)"
exactly as given, except for the “exchange3” which should be replaced with the name of your Exchange 2007 server. This is assuming your Exchange 2007 server is called “exchange3”, so edit it appropriately.

Then
New-OwaVirtualDirectory -name Exchange -OWAVersion Exchange2003or2000 -VirtualDirectoryType mailboxes
New-OwaVirtualDirectory -name Exchange -OWAVersion Exchange2003or2000 -VirtualDirectoryType PublicFolders
Also read
http://support.microsoft.com/kb/931350


In the Account properties “Edit Account” dialog box, set this
Account ID: exchange3.ecs.soton.ac.uk/exchange/
your-username@ecs.soton.ac.uk
Domain:
Password:
Leave the Domain blank and the Password blank.
Ok this dialog, then quit and restart Entourage 2008.

If that Account ID setting doesn’t work, try this instead:
Account ID: ECS2000\jkf-private
where “ECS2000” is your Active Directory domain name, and “jkf-private” is your username. Again, leave the “Domain” and “Password” blank, it will prompt you for the password. Never type in anything into the “Domain” box, always leave that blank.

I still cannot get Public Folders working from Entourage 2008. Sorry.

Let me know if this helps or not.
Comments

Hyper-V Integration Components in x86_64 CentOS and RHEL

Update 13th July 2008: New version of this HOWTO is available with information on Linux Integration Components RC2.

This page tells you how to install the Windows Server 2008 virtualization Hyper-V Linux Integration Components in CentOS and RHEL (RedHat Enterprise Linux) 5. I did it all in x86_64 (or x64) as it is much more interesting and useful.

Installing the ICs in CentOS 5.1 or RHEL 5.1 is rather harder than in SuSE 10.

You need to copy the code off the CDROM ISO image, so let’s start by doing that:
mkdir -p /mnt/cdrom
mount /dev/cdrom /mnt/cdrom
mkdir /opt/linux_ic
( cd /mnt/cdrom && tar cf - . ) | ( cd /opt/linux_ic && tar xvBpf - )
umount /mnt/cdrom

Next, get the kernel source for the exact version of kernel and kernel-headers you are using. “rpm -qa | grep kernel” will tell you what kernel-headers you have. Remember that a “yum update” may change the kernel version.

Once you have the the kernel version, go and find the kernel source SRPM. You can get this from
http://mirrors.centos.org/centos/5/updates/SRPMS/ or http://mirrors.centos.org/centos/5/os/SRPMS/.

Install the SRPM which will get you the full kernel source in /usr/src/redhat/SOURCES (along with all RedHat’s patches) and the spec file in /usr/src/redhat/SPECS. You need to edit the spec file, so make a backup copy of it first. Find the “buildid” definition line, uncomment it, remove the extra space after % and change it to something like
%define buildid .JKF1
The tools supplied with RHEL5 and CentOS 5 are not good enough to build the kernel-headers, due to a lack of support for “unifdef” in GNU make. So find the line that sets “with_headers” and change it to
%define with_headers 0

Just before the “%build” line, you need to add the patch for the Hypervisor code. 2 of the parts of the Microsoft-supplied patch do not apply successfully, due to differences in the source code where it doesn’t match what Microsoft think it is. So do a “rpmbuild -bp kernel-2.6.spec” to build a patched source tree in /usr/src/redhat/BUILD. Then cd into it and try to apply the patch in /opt/linux_ic/patch/. You will find 2 bits of it don’t apply correctly. Look at the .rej file for each failed patch and apply the changes by hand. Copy the 2 manually patched source files to somewhere convenient like /root. Before the “%build” line, add a chunk of shell script that does something like this: (I am assuming here that you know what you’re doing Happy
cd /usr/src/redhat/BUILD/kernel-2.6.18
( patch -p0 < /opt/linux_ic/patch/x2c-x64-sles.patch ; /bin/true )
cp -f /root/head64-xen.c linux-2.6.18.x86_64/arch/x86_64/kernel/
cp -f /root/pgalloc.h linux-2.6.18.x86_64/include/asm-x86_64/mach-xen/asm/

You can now build the RPM, which will construct several kernels, including the xen one which is what you need. So
cd /usr/src/redhat/SPECS
rpmbuild -ba kernel-2.6.spec
Be warned, this will take *hours* on a on a virtual machine.

Now install the xen version of the new kernel:
cd /usr/src/redhat/RPMS/x86_64
rpm -ivh --force kernel-xen-2*.JKF2*rpm

Build the x2v version of the kernel
cd /opt/linux_ic
perl setup.pl x2v /boot/grub/grub.conf

Now you need to fix up the /boot/grub/grub.conf file. For the section that includes the x2v-64 stuff, remove the “/boot” leading path, as all paths must be given relative to /boot. You *do* need the leading “/” though. The final section you get should look like this:
title CentOS (2.6.18-53.1.4.el5.JKF2xen)
root (hd0,0)
kernel /x2v-64.gz
module /vmlinuz-2.6.18-53.1.4.el5.JKF2xen ro root=/dev/VolGroup00/LogVol00 rhgb quiet
module /initrd-2.6.18-53.1.4.el5.JKF2xen.img
I strongly advise you comment out the “hiddenmenu” setting, and set the default to this kernel (they are numbered from 0=start of file).

Now reboot, and it should boot your newly built kernel with the X2V shims in place.

Next step is to build the drivers. There is one problem that needs fixing first, the “build” link in the /lib/modules/ directory will be broken. To fix this, make it point into the kernel source that you have been building from, with something like this:
cd /lib/modules/`uname -r`
ln -nsf /usr/src/rdhat/BUILD/kernel-2.6.18/linux-2.6.18.x86_64 build
Now build the drivers:
cd /opt/linux_ic
perl setup.pl drivers

You should now have the drivers running, and should have just seen the output of the “modprobe vmbus” command. And you should find that “ifconfig” outputs a new network device “seth0”. When you reboot, the vmbus module willl automatically be started. Unfortunately, it loads too late in time for it to be used for the seth0 network interface to be the sole external network interface, nor in time for the SCSI device to mount filesystems stored on virtual SCSI disks. Moving the init.d script to S04vmbus doesn’t help, as kudzu does not see the device and so removes it from the /etc/sysconfig/network-scripts directory.
UPDATE -- appears to work okay as a network interface, like on SuSE 10.
If you try to attach the network interface automatically at boot time, you will need to do this after the machine has booted:
service network start
service sshd restart
along with any other network-connected daemons you have started, such as MailScanner or sendmail.

You now have the same ICs running in CentOS 5.1 or RHEL 5 as Microsoft intended to run in SuSE 10.
Comments

Hyper-V Integration Components in SuSE 10

Make sure you install the Xen kernels in the installation process. Else install them separately, packages are kernel-xen or kernel-xen-pae.
Copy the whole of the LinuxIC.iso to /opt/linux_ic
cd /opt/linux_ic
perl setup.pl x2v /boot/grub/menu.lst
Reboot the VM.
perl setup.pl drivers

Once you’ve done that, “ifconfig” should list the “seth0” ethernet interface; “cat /proc/scsi/scsi” should list the hard disk device. Create a partition with fdisk and mkfs.ext3 /dev/sda1 to build a new partition.

There is also a HAL patch for the device manager in X, but you don’t need that.

If on an x86_64 system, you need to build a new kernel. Do all of this instead of the x2v line above.
Install the kernel_source package.
cd /usr/src/linux
cp /opt/linux_ic/patch/x2v-x64-sles.patch .
patch -l p1 < x2v-x64-sles.patch
cp /boot/config-....-xen .patch
make oldconfig
make vmlinuz
cp vmlinux /boot/vmliuz-...-xen
cd /opt/linux_ic
perl setup.pl x2v /boot/grub/menu.lst
Reboot the VM
perl setup.pl drivers

Comments

Windows Hyper-V Beta

Windows Server 2008 RC1 with Hyper-V Beta is publicly available here:

http://www.microsoft.com/downloads/details.aspx?FamilyId=8F22F69E-D1AF-49F0-8236-2B742B354919&displaylang=en



Beta Integration Components for Linux available through connect.microsoft.com:

https://connect.microsoft.com/site/sitehome.aspx?SiteID=495
is the home page for them.

The “Downloads” link on the left contains the links to where you get it all. Only support for SLES 10 at the moment. Expect RHEL5 support in a later beta.

Can’t get Windows Server Backup to see that my backup disk is on-line. I have told it that it is to use the disk as a backup drive. But still won’t recognise it. Now testing to see if a reboot will fix it.
No good. The drive now has a different GUID. “wbadmin restore catalog” command doesn’t work, always gives error about -backupTarget: setting missing, despite its being there. Bug.
Can’t file a bug report as there’s no icon on the desktop which is how we’re supposed to do it. You would have thought they might have seen this one! Sad
I’ll ask JL about filing bug reports.

Comments

Windows PE

Creating a bootable CD-ROM of WinPE is here: http://technet2.microsoft.com/WindowsVista/en/library/7a47a896-ca59-4586-b688-3a3c098d34241033.mspx?mfr=true

Adding things to the bootable CD-ROM image:
http://www.svrops.com/svrops/articles/winvistape2.htm
Comments

Windows Server 2008

Summary only available when permalinks are enabled. Read More...
Comments