Advertisements

Archive

Archive for the ‘Hyper-V’ Category

Converting Hyper-V guest systems to VirtualBox

August 4, 2011 4 comments
  • System Notes: Oracle VirtualBox 4.0.12, Windows Server 2003 R2 X64, Windows Server 2008 R2

My main Hyper-V server host system runs four production and three development/testing guests, with the four production and one of the development/testing systems in use 24×7.  Memory was becoming extremely tight on the host system, especially when running either of the two remaining development/testing guests along with the regular 24.×7 guests.

Since the two development/testing guest systems were really just for security patch and software upgrade testing, I decided to try and move them over to Oracle VirtualBox on my main workstation.

If you are converting a guest Windows server that is running anything earlier than Windows Server 2008 R2, you should first remove the Hyper-V Integration Services from the guest, to prevent any BSOD startup problems after you move the guest over to VirtualBox.

When setting up a Windows Server 2008 R2 guest system using an existing VHD file for the primary hard disk, you must make a change in the VirtualBox Settings.  The VHD will be attached as a SATA drive by default, and you will get a BSOD if you try to boot it this way.  You need to remove the VHD file from the SATA controller and re-add it as an IDE hard drive.  See this link for a specific discussion of this problem.  See my previous blog entry Switching from IDE to SATA controller types for older Windows guests in VirtualBox for specific details on working with IDE and SATA virtual drive files.

Additional Notes:

Just a bonus quick reference note for VirtualBox:  you can use Ctrl-Arrow to move systems up and down the list on the main Oracle VM VirtualBox Manager window.  Just highlight the system you want to reorder and press Ctrl-Up or Ctrl-Down.

Advertisements

How to move virtual guest servers from Hyper-V on Windows Server 2008 to Hyper-V on Windows Server 2008 R2

August 15, 2010 Leave a comment
  • System Notes: Windows Server 2008 Standard x64, Windows Server 2008 R2 Standard x64

Now that Windows Server 2008 R2 has been out for a while, and I have gained some experience with it, I have found it to be much easier to work with than Windows Server 2008, although honestly the differences are not that great. It’s simply more refined and it really does seem as if Microsoft listened to their customers and worked all the kinks out.

I have one production Windows Server 2008 Standard x64 that we use simply as a Hyper-V host for four virtual server guests, all running Windows Server 2003 R2 (in both x86 and x64 editions). We now want to upgrade the 2008 server to R2. Concise information from Microsoft on doing this can be found at this link.

Test scenario:

  1. Build a Windows Server 2008 Standard x64 host server running the Hyper-V role, complete with Service Pack 2 and all patches available through August, 2010.
  2. Add Windows Server 2003 R2 virtual guest servers, both x86 and x64 editions. Add Service Pack 2 and all patches available through August, 2010 to both guest servers. Add various file shares for testing purposes after move to Hyper-V R2 host server.
  3. Use the Export feature of Hyper-V to export guest servers for later import to Hyper-V R2 host server (see link provided above).
  4. Build a Windows Server 2008 R2 Standard x64 host server running the Hyper-V R2 role, complete with all patches available through August, 2010.
  5. Import guest servers to the new host server using the Hyper-V R2 console. Make sure to use the “Duplicate all files” option (see Additional Notes below).
  6. Start and verify guest servers, including network and share access, and review the Event Log for any errors.

Additional Notes:
When importing servers to the R2 host, make sure you select the “Duplicate all files so the same virtual machine can be imported again” option, if you want your virtual guest files to go to the default set of folders on the R2 host (see this link). I figured this one out the hard way, before reading the details provided in the link. I also received a few errors during the Import process of the virtual guest servers. They related to a change in the network configuration and network switch name, and were easily correctable through the Settings interface for each of the servers. Don’t forget to update the Hyper-V Integration Services once the guest servers are imported to the new R2 host.

Categories: Hyper-V, migration, R2

Converting Hyper-V VHD hard disk files from dynamic to fixed, while at the same time shrinking the size of the VHD files

July 12, 2009 Leave a comment
  • System Notes: Dell PowerEdge 2950, Windows 2008 Server Standard x64

After attending a Hyper-V seminar recently, I learned that the recommended setup for any production server includes using a fixed size for any VHD file (as opposed to dynamic; see this link). I had originally set up all of my virtual servers with dynamic disks, in an effort to save space. I also specified much larger drive sizes than I would have otherwise needed. The VHD files in question needed to be converted to fixed format, and several of them needed to be cut in half in size.

I did several searches on this problem, and tested out a few tools that were supposed to allow conversion between dynamic and fixed VHD formats, as well as allowing size changes. Alas, they would only allow an increase in size, and not a decrease. So I ultimately came up with my own solution, using the partition management features of BootItNG and the DriveImage XML imaging program to accomplish what I needed. Here are the steps involved:

  1. Boot the virtual server to a BootItNG ISO.
  2. Use the BootItNG “Work with Partitions” option to do a non-destructive resize the partition to the desired size. When complete, shut down the virtual server.
  3. From the Hyper-V settings for the virtual server, create a new fixed-size VHD file and attach it as a secondary drive.
  4. Boot the virtual server, and chkdsk should run on your resized primary drive. Allow it to complete.
  5. Using the Windows disk management tools, partition and format the new fixed-size VHD secondary drive.
  6. Shut down the virtual server. Now you will be booting into whatever method you want for launching DriveImage XML. I use a BartPE boot disk, but there are several ways to accomplish this. Once you have DriveImage XML up and running, use the Drive To Drive option to duplicate the dynamic VHD onto the new fixed VHD.
  7. Shut down the virtual server and use the Hyper-V settings to remove the primary dynamic VHD drive and the secondary fixed VHD. Attach the new fixed VHD as the primary drive.
  8. Boot into the BootItNG ISO with the new primary fixed VHD attached.
  9. Use the BootItNG “Work with Partitions” option to set the partition in the new primary fixed VHD as active. If you don’t do this, when you attempt to boot the virtual server with the new fixed VHD, you will get the “Boot failure. Reboot and select proper boot device” error message and it will not boot.
  10. Shut down and then restart the virtual server. Assuming everything has worked correctly to this point, you should be prompted by your Windows installation to restart after you have logged in and it has added the details for the new primary fixed VHD.

Additional Notes:
One problem I ran into with DriveImage XML is that it cannot copy an old partition into a new partition that is smaller than the older one. Hence the need for using the partition management features of BootItNG to reduce the size of a dynamic VHD first, before imaging it. Make sure the new size is just slightly smaller than the size of your new fixed VHD, or you will run into this problem. DriveImage XML is smart enough to add any extra space in the partition when it writes the copy to the new fixed VHD. I had originally tried to use the Gparted partition management software (version 0.4.5-3; available here), but could not get it to see more than 127 GB of a disk under Hyper-V. I believe Symantec Ghost supports writing to smaller size partitions without needing to resize the partition first, but I do not have it available and cannot verify this.

Categories: Hyper-V, resize, VHD

Hyper-V, Windows 2003 Server, Event ID 1054

November 10, 2008 Leave a comment
  • System Notes: Dell PowerEdge 2950, Windows 2008 Server Standard x64

As I have continued my usage of Hyper-V on Windows 2008 Server, one of the hosted systems continued to receive the following error in the Application Log: “Event Type: Error, Event Source: Userenv, Event Category: None, Event ID: 1054, Description: Windows cannot obtain the domain controller name for your computer network. (An unexpected network error occurred.). Group Policy processing aborted.” See the posting on 8/15/2008 for some additional details and a previous discussion of this.

It turns out that this only occurs on a hosted system configured for multiple processors and running Windows 2003 Server (same with R2). I verified this across my hosted systems. The solution is to use the /usepmtimer option on the system startup command in the BOOT.INI file. A discussion of this problem can be found here, and this link is to the Microsoft Help and Support article on the /usepmtimer option.

Working with Hyper-V

August 15, 2008 Leave a comment
  • System Notes: Dell PowerEdge 2950, Windows 2008 Server Standard x64

The organization I work for started looking into our options for virtualization. We ran test versions of the free VMware Server and Microsoft Virtual Server 2005, and were not impressed with the performance of either. We then priced out a full VMware ESX Server setup, and that started at a minimum of $3,000, just for the software and a single license. The decision was made to wait for Windows Server 2008 with Hyper-V, based on early performance tests provided by Windows IT Pro, and the price point (included with Windows Server 2008, which we had already licensed several copies of).

The hardware we ended up purchasing was a mid-range Dell PowerEdge 2950 Server, with two quad-core processors and 16 gigs of RAM. Based on what we worked up with Dell, this should support up to 7 simultaneous virtual guests, depending on the load requirements of each guest.

We now have two 24×7 production virtual guests in use on this setup, with one having almost no load, while the other is a terminal server supporting up to 15 simultaneous users (but which probably has about 10% utilization in reality, as it only provides remote user support, and is not used as an application server). We do have four other “test” virtual guests, which are rarely used and are mainly for patch testing. Below are some issues and problems I have come across when running with Hyper-V.

  1. Windows 2000 Server Standard virtual guests have problems with the WMI subsystem at boot time. The Windows 2000 Server will be unavailable for approximately 5 minutes after boot, until three of these error messages are generated in the System Log: “Event Type: Warning, Event Source: WMI, Event Category: None, Event ID: 54, Description: The description for Event ID ( 54 ) in Source ( WMI ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. The following information is part of the event: \Device\WMIServiceDevice.” After that, the system functions normally, with no further unavailability or error messages. Here is a link to a discussion of this problem from the Microsoft TechNet Forums. I tried two different installations of Windows 2000 Server Standard, one from an MSDN CD (with SP4 integrated), the other from a retail CD (with SP3 integrated). Both had the same issue. I believe the problem comes from the Integration Components for Hyper-V being installed, but I have not yet verified this. We only have one physical production Windows 2000 Server left, and my original use for this guest was for patch testing.
  2. Domain time synchronization does not function correctly after the initial time set at boot up. Based on what I was able to find online here and on the Microsoft TechNet Forums, I disabled the Windows Time service (W32Time), and made sure the Time synchronization option was checked under the Integration Services options for the virtual guest in question (this option is checked by default). There have been no further time issues with the virtual guest after doing this. It would be nice if there were time synchronization notifications in the Windows event logs, especially when running in this configuration. Regardless, the physical host server is part of our domain, and is correctly synching with our time server, and the virtual guest is correctly staying on time.
  3. Occasionally, on our Windows Server 2003 virtual guest that is running as our terminal server, this error message will be generated in the Application Log: “Event Type: Error, Event Source: Userenv, Event Category: None, Event ID: 1054, Description: Windows cannot obtain the domain controller name for your computer network. (An unexpected network error occurred.). Group Policy processing aborted.” I have found no solution to this, nor does there seem to be any impact on the server from this error message. No functionality is lost, and users working on the server are not impacted. The server can correctly see and access all three of our domain controllers, both by name and by IP. The error seems to occur at random, sometimes once an hour, sometimes once in 24 hours.