Compacting a Dynamic VHD image

13. July 2006 02:21 by Jaguilar in General  //  Tags:   //   Comments (0)

One of the nicest features of using Dynamic VHDs on Virtual Server 2005 is that they grow as needed, so system administrators can optimize the disk space usage between several VMs. Dynamic VHDs grow automatically, but they don’t shrink automatically. In order to shrink them, you need to run several tools both inside and outside of the virtual machine.

Recently, I installed Windows Vista Beta 2 on a virtual machine on Virtual Server. Right after the installation, this are the disk usage stats:

compact1

Inside the virtual machine, however, the total disk space usage was smaller:

compact2

In order to compact the VHD image to only use the ~9GB allocated, we need to follow this procedure:

The first step is to defragment the VHD you are going to compact. You do this from within the Virtual Machine. Once the defragmentation is completed, you need to run Virtual Server’s Precompactor. To do this, mount the  image on the virtual machine from the Virtual Server console:

compact4

The precompactor will then execute and leave the VHD ready for compaction:

compact5compact6

If you are running the precompactor under Vista, remember to do a “Run as administrator”. Otherwise it won’t work.
This process may (will) take a long time, so be patient.

Once it completes, you need to shut down the virtual machine, and compact the VHD from the Virtual Server web console. This can be done from the option Virtual Disks->Inspect, then select the correct VHD on the Known virtual hard disks drop-down box, and click on the Inspect button. Then select the link to Compact Virtual Hard Disk:

compact7

You need to click on the Compact button on the next screen, and the process will then start. This will also take a while, but once it finished, you will reclaim all the hard drive space from your VHD file!

Virtual Server 2005 Migration Toolkit on x64 server

12. July 2006 13:22 by Jaguilar in General  //  Tags:   //   Comments (0)

Yes, it is sad but true. You cannot install the Virtual Server 2005 Migration Toolkit on an x64 server:

VSMT

What this means is that you need to have an intermediate 32–bit Windows 2003 installation running Virtual Server in order to convert a physical server to a virtual one. Hopefully x64 server will be soported in the near future.

Here is a post that talks about this: ADS 1.1 and VSMT on 64-bit hosts

 

Virtual PC 2004 is now free

11. July 2006 23:00 by Jaguilar in General  //  Tags:   //   Comments (0)

Virtual PC 2004 Service Pack 1 is now offered as a free download. From the webpage:

Whether Microsoft virtualization technology is an important component of your existing infrastructure or you're just a Virtual PC enthusiast, you can now download Virtual PC 2004 Service Pack 1 absolutely free. Microsoft is also offering the free download of Virtual PC 2007, with support for Windows Vista in 2007.

Hopefully this will further increase the adoption of virtualization technology.  I can’t wait for VPC2007 for it to support for hardware virtualization, like Virtual Server 2005.

Sysprep is your friend (for deploying pre-configured virtual machines)

7. July 2006 10:16 by Jaguilar in General  //  Tags:   //   Comments (0)

Most you I guess have heard about Sysprep, Microsoft’s System Preparation Tool. This tool removes certain information from a system, including the Security Identifier, IP address, computer name, etc. This is recommended when you are cloning a machine, and, by removing this information, you also remove any potential conflicts when starting up the cloned image for the first time.

When working with Virtual Machines, Sysprep is a real timesaver. You can, on a virtual machine, install several configurations of servers (Win2003EE/SQLServer2005, Win2003EE/IIS6.0, etc), sysprep the images, and then have these pre-configured images ready to deploy to a Virtual Server 2005 installation when needed, by just copying the appropriate VHD file over and associating it with a new VM.

In order to run Sysprep, you first need to install it. You can get a hold of Sysprep in two ways: it is on the \Support\Tools\Deploy.cab file on the Windows Server installation media, or you can download it from here. Once you get a hold of the Deploy.cab file, you should extract the contents to a directory on your HD, for example c:\Deploy.

SYSPREP1

This directory contains several useful tools, and you should definitely read the deploy.chm file for instructions and details on the process. There are two files that are of particular importance to the process: sysprep.exe and setupmgr.exe.

For sysprep to work completely automated, it requires an answer file, called sysprep.inf. This answer file contains the “answers” to all the questions asked by the Windows installer during the setup process. The answer file can be created manually with any text editor, but fortunately there is a nice wizard-like tool that can help you generate this file. This tool is the setupmgr.exe program:

SYSPREP2

This program allows you to generate the sysprep.inf file by presenting you the options and letting you enter the default answer. In order to fully automate an installation, follow these steps on the Setup Manager:

  1. Click Next on the Welcome screen
  2. Select “Create new” and click “Next”
  3. Select “Sysprep setup” and click “Next”:
    SYSPREP2a
  4. Select the type of system you’re going to sysprep, and click “Next”
  5. Select “Yes, fully automate the installation” and click “Next”
  6. Now you need to fill in all the information required to complete the process:
    SYSPREP2b

Once you complete the execution of the Setup Manager, it creates a new directory in the root of the system drive called sysprep. This directory contains all the information necessary for the Sysprep tool to execute.

SYSPREP4

Now you need to execute the Sysprep tool, sysprep.exe:

In this tool:

  1. Click “OK” on the warning dialog that appears when running the tool.
  2. Select “Don’t reset grace period for activation”
  3. Set the “Shutdown mode” to “Shut down”
  4. Click on Reseal. That will leave the image ready for copying.

Once the image is copied, you can just configure a new virtual machine with the new image, and start it up. The last portion of the Windows setup process will execute:
SYSPREP5

After a little while (<10min), the machine will reboot, and the process will be completed. You now have a brand new sysprep’d and cloned server up and running!!

 

Network Connections not showing the Virtual Machine Networking Service

6. July 2006 08:09 by Jaguilar in General  //  Tags:   //   Comments (0)

I just had my first “issue” with Virtual Server 2005 R2. I was trying to create a virtual network with access to the outside world, but I couldn’t get the physical NICs to appear under the "Network adapter on physical computer:" option on the "Network Properties" screen. I could only get the “None (Guests Only) option, as shown here:
NICSTEP0

Now, before anyone says anything, I know that in order to have them appear here, I first need to enable the "Virtual Machine Networking Service" on the NICs that I want to share. The service, however, was not showing up on the network properties on the NIC connected to the network:

NICSTEP1

On the Virtual Server Event log, I was getting the following error logged:

"Virtual Server could not open its emulated Ethernet switch driver. To fix this problem, re-enable the Virtual Server Emulated Ethernet Switch service on one or more Ethernet adapters or reinstall Virtual Server."

Before going for the obvious, I first did a quick scan of the net for that log message and for the error in general, and the recommendation I found on several forums was to re-enable the service (not possible, wasn’t appearing), or to reinstall the server. Well, it turns out that the solution was VERY, VERY easy: just re-installing the service on the adapter did the trick. To do this, follow these steps:

  1. Open the network connection properties page
  2. Click on the “Install…” button
  3. Select the “Service” option under the “Select Network Component Type” window, and click “Add…”
    NICSTEP2
  4. Now you need to select the "Virtual Machine Networking Service" from the selection window:
    NICSTEP3
  5. In case you don’t see this service on the window, you need to reinstall it. To do this, click no “Have Disk…”, then “Browse…”, and browse to the Virtual Server Installation directory\Drivers and select either the x86 OR x64 directory (depending on your installation):
    NICSTEP3A
  6. Then select the file “VMNetSrv.inf” to install the server:
    NICSTEP3B
  7. The service should now show up under the Network Connection properties:
    NICSTEP4

For some reason, the service is not installed on the adapters by deafult. With this process, however, the error messages go away, and you should be able to select the adapter on the “Network Properties" screen without having to re-install Virtual Server.

My first virtual machine...

5. July 2006 07:56 by Jaguilar in General  //  Tags:   //   Comments (0)

… On Virtual Server 2005 R2.

I installed FreeDOS in a new VM in about 5 minutes to test out the installation and the management tools.

dosvm

From now on, we are going to be working on several interesting projects related to virtualization, specifically to Virtual Server 2005 and the virtualization features coming up in Longhorn Server. I added a new category, Virtualization, where I’ll post any interesting bits of info I come accross. Make sure to check it out every once in a while.

 

64-bit Windows Server migration stories

3. July 2006 09:57 by Jaguilar in General  //  Tags: ,   //   Comments (0)

We’ve been working during the past two years on 64–bit awareness and helping customers move to the platform. I posted some time ago, on the 64–bit Advantage blog, about the migration of MySpace to 64–bit Windows Servers. Well, I just noticed that there is another story out (has been out for a few months, actually) about the migration of microsoft.com to x64 servers. Pretty interesting read. Take a look at the performance improvements they saw – they were impressive, especially the improvement in the response time.

You can read check it out here.

Questions on the VB Webcasts

30. June 2006 04:13 by Jaguilar in General  //  Tags:   //   Comments (0)

During the Visual Basic webcasts we get several questions, not all of them related to VB migrations. Following the 64–bit webcast’s lead, I think it would be a good idea to share them with you (they were originally asked in spanish, this is my rough translation):

Question: What happens with VB6 applications that use Spread?
Answer: FarPoint's Spread is a widely-used spreadsheet component used in VB6 applications. The current version of the Upgrade Wizard does not support the automated conversion of this component to the .NET equivalent. If you wish to continue using it, you’ll need to use COM interop. There’s a chance that a future version of the VB Upgrade Companion Edition will be able to convert this component.

Question: Does the Upgrade Wizard work for upgrading ASP applications?
Answer: No, it doesn’t. For ASP applications, there is the ASP to ASP.NET Migration Assistant. You can also check out the ASP to ASP.NET v1.x Migration Guide. It is slightly outdated and doesn’t deal with the 2.0 Framework, but should work as a good starting point.
Artinsoft also offers complete migration services for upgrading your ASP application to ASP.NET.

Question: Is there a solution for migration from Visual Foxpro to .NET?
Answer: Unfortunately there is no tool for migrating Visual Foxpro applicationsto the .NET Framework.

Question: Is there a document with and outline of the testing process for migration projects?
Answer: The testing process depends on the type of application. There is no “magic bullet” that will describe this. There is, however, a migration guide, developed between ArtinSoft and Microsoft, that has a chapter on testing the applications. This can be found at Upgrading Visual Basic 6.0 Applications to Visual Basic .NET and Visual Basic 2005.
ArtinSoft also recomends using a slightly modified version of the original application’s test cases.

Question: What version of the .NET Framework is required for the migration tool?
Answer: The Upgrade Wizard is available for version 1.0, 1.1 and 2.0 of the .NET Framework. We are currently using the version bundled with Visual Studio .NET 2005, that uses version 2.0 of the Framework, because it is the most recent version.

Remember to check out all the VB to VB.NET presentations, that can be found at the CEM website.

Pictures from the Santiago Event

29. June 2006 11:28 by Jaguilar in General  //  Tags:   //   Comments (0)

Here are some pictures of the event last week in Santiago.

Asistentes al Evento 4 Asistentes al Evento 2

 Asistentes al Evento 1 Jose presentando 2

 BTW, this is my first post with BlogJet. Nice tool.

Final CEM Visual Basic webcast

29. June 2006 08:24 by Jaguilar in General  //  Tags: ,   //   Comments (0)

Tomorrow I'll be doing the final Webcast in a series about migrating from Visual Basic 6.0 to Visual Basic .NET. This one will be about tecniques on how to migrate common objects in Visual Basic (some controls, database access, forms, etc), and about recommendations on how to test a migrated application.

All in all, there were seven webcasts in the series. They were: (names in spanish...)

I suggest you check them out. :-)

Categories