Tuesday, November 17, 2009

Scheduling Backup on Microsoft Hyper-V Server

To do a backup of the virtual machines installed on your Hyper-V Server (2008 or 2008 R2 editions) you need to complete the following steps.

  1. Install the backup feature by typing start /w ocsetup WindowsServerBackup from the command prompt.
  2. Get a list of the drives on which Hyper-V Server has stored virtual machines. This will be C: unless you have made changes.
  3. Determine the times you want to run the backup at.
  4. Determine the drive letter of the removable disk by typing at the command prompt each of the following commands
    1. diskpart
    2. list volume
    3. The disk drive letter will be displayed for the disk that matches the size of your removable disk.
    4. Type exit to exit diskpart.
  5. From the command prompt type wbadmin enable backup -addtarget:x: -schedule:hh:mm,h2:m2 -include:y:,z: -systemState -allCritical to backup to drive X: the contents of drives Y: and Z:, the system state and all drives critical to the running of the server.
  6. Confirm you want to schedule the backup at times HH:MM and H2:M2 (for twice a day). If you want one backup a day use HH:MM and if you want more than two just comma separate a group of times. Enter times as per local timezone. Check the current time on the Hyper-V Server by typing time from the command prompt.
  7. Start a backup now if you want by typing wbadmin start backup and confirming to use the same settings as the scheduled backup.
  8. Backup will proceed in the console. If you log out backup will remain running.
  9. Enter wbadmin enable backup to see the settings you have enabled.
  10. Type wbadmin get versions to see what backups have completed.

Wednesday, July 08, 2009

Booting a Server with a USB Key

There are numerous instructions on the internet for creating and booting a server with a USB key, but they were all complex or hard to read – even for a techy like myself.

So I thought I would rewrite a simple list of instructions to allow you to create a DOS bootable USB pendrive/key that you can use for any purpose (i.e. flashing BIOS's and other low level functions, as well as booting into other operating systems).

  1. Download download bootable_usb.zip from www.lowfps.com. This is the website these instructions are based on, but I wanted something clearer than that.
  2. Extract the download to a temporary location (i.e. C:\Users)
  3. Run the HP bootable media.exe program and install the software.
  4. Insert the USB key you want to use – it will get wiped during this process to backup its contents if needed.
  5. Run the HP USB Disk Storage Format Tool from the desktop or Start Menu. If you are using Vista or later then you will need to run the program in elevated mode (right-click program and choose Run as administrator).
  6. Select your USB key and choose to do format the key with the FAT or FAT32 file system. Choose Quick Format and select Create DOS Startup Disk. Pick the sub-option "Using DOS files located at" and select the same "DOS Files" subfolder in the location where you extracted the download too (C:\Users in my above example).
  7. Click OK. The USB key will be wiped during this process and a copy of the core files for Microsoft Millennium DOS will copied to the key.
  8. When complete copy to the key any files that you need to execute in DOS mode on the PC (for example I needed to update the BIOS on a x64 Windows Server 2008 Server Core installation running on a Dell Optiplex 755 and it said this was not allowed). The files you copy to the key must work in DOS though.
  9. Shutdown the server and insert the USB key. You must do a hard reboot, a restart will not work.
  10. Restart the server and press F12 to bring up the one-time boot menu (if you do not have this option then go into setup [Del or F2] and ensure USB booting is enabled and set to the primary option).
  11. In the boot menu choose the USB key option.
  12. From the C:\ prompt run the programs you need to start. Note that this is old style DOS and not the Command Prompt in later versions of Windows – so no command completion using the TAB key. So place the files in or near the root folder.

Friday, July 03, 2009

Windows Backup Failure on Windows Server 2008

I recently had a case where Windows Backup would fail at approx. 75% complete during a full backup. The backup utility and command line both reported that "The system cannot find the file specified". The Event Viewer/Application... Services/ Microsoft/ Windows/ Backup/ Operational reads "Backup target is running low on free space. Future backups to this target may fail for want of enough space." and then at the same time and immediately after that we get "Backup started at TimeZ' failed with following error code '2147942402'" which means file not found or unknown error.

After a series of email communications with the Windows Backup team at Microsoft India (where, incidentally, the program was developed) the answer came back that I should run chkdsk /r and reboot the server. As this process can take hours this occurred out of hours and actually in my case needed to be repeated twice. A normal chkdsk command, run whilst the server was online, reported that the disk had errors and could not continue.

After running chkdsk /r twice, from an elevated command prompt, the backup started to work again.


Wednesday, June 24, 2009

Uninstalling Virtual Machine Additions in Hyper-V

The error message "this installer may only be run inside of a virtual machine" appears when you try to remove old virtual machine additions (from Virtual Server 2005/Virtual PC 2004) when running the virtual machine in Hyper-V.

The migration guidelines recommend the removal (but do not mandate it) of the Virtual Machine Additions. But this is probably because later versions of the additions can be removed from inside Hyper-V, earlier versions cannot.

The problem is the existence of this software stops the installation of the Hyper-V Integration Services.

So to remove the Virtual Machine Additions of the Hyper-V guest (that has been previously used in Virtual PC/Server) you need to do the following:

  1. Shutdown the Hyper-V virtual guest
  2. Share the folder containing the VHD for this guest
  3. Install Virtual PC 2007 or later on another computer
  4. Create a new virtual guest on the Virtual PC, pointing the VHD property to the shared VHD on the network and do not create undo disks.
  5. Boot the Virtual PC guest and uninstall the Virtual Machine Additions. Any prompts about new hardware should be ignored by pressing the Cancel button.
  6. The removal process will require a reboot. Once the reboot has completed you can then shutdown the virtual PC.
  7. Remove the Virtual PC guest, stop sharing the VHD folder and restart the guest in Hyper-V.
  8. Install the Hyper-V Integration Services.

If the virtual guest is so old as to have a Standard PC HAL installed then attempts to install the Integration Services results in the following error "Setup cannot upgrade the HAL in this virtual machine. Hyper-V integration services can be installed only on virtual machines with an ACPI-compatible HAL. For information about hardware requirements, see the Hyper-V documentation".

This cannot be fixed and so if you have an old virtual machine that has a Standard PC HAL (from Device Manager > Computer) then do without the integration services or rebuild the guest from scratch.


Tuesday, June 16, 2009

Message Tracking Logs ‘And/Or’ Error

The following message appears in the Exchange Server 2003 message tracking logs:

The object 'and/or' in the message tracking logs can't be found in the directory.  The object may have been deleted.  The tracking history may be incorrect.

This is an error that can be ignored as it does not mean that the email message that you are tracking has not been delivered (discounting other errors that is).

This error occurs in the Exchange Server 2003 tracking logs because the logs store the name of the recipients server, and if the recipients server is determined to be ‘and/or’ then that is what the log will read.

I have noticed that this error occurs when Exchange Server 2003 talks to Exim 4.69 servers with the following welcome message:

220-server.fqdn ESMTP Exim 4.69 #1 date time
220-We do not authorize the use of this system to transport unsolicited,
220 and/or bulk e-mail.

This welcome message is spread across three lines and the last line reads “220 and/or bulk e-mail”. Exchange uses the first word following 220<space> (and not 220<dash>) as the server name.

For example, the following is the welcome banner displayed by Postini/Google, which is a single line:

220 Postini ESMTP 108 y6_19_2c0 ready.  CA Business and Professions Code Section 17538.45 forbids use of this system for unsolicited electronic mail advertisements.

Therefore Exchange will identify this server in the message tracking logs as “Postini”.


Monday, June 08, 2009

Editing the Registry on x64 Windows Computers

This is, in the main, just a quick note to myself! When editing the registry on a Windows x64 based computer, but the program that will read those registry settings is a 32 bit application then you need to change the location that you edit to the “Wow6432Node” rather than the usual location.

Note that when blogs and other technical articles write down a registry key they do not often mention that the registry location you need to change is not what they have written down!

For example, there is a problem in the Windows 7 RC release in which Internet Explorer 8 does not show some webpages resulting in an error “A webpage is not responding on the following website:” (see http://support.microsoft.com/kb/970858). The registry key describes setting the hangresistance value, but as Internet Explorer is a 32 bit application you need to set the hangresistance value at HKLM\SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\MAIN\ and not at HKLM\SOFTWARE\Microsoft\Internet Explorer\MAIN\.

If you follow the advice in the Microsoft support article KB970858 then it will not fix the problem on a 64 bit machine. You need to edit the Wow6432Node value instead.

There is an x64 version of Internet Explorer installed, but the common one that people use is the 32 bit version – if you use both, set both registry keys.


Friday, May 29, 2009

Running MOC Courseware Virtual Machines on Windows 7 RC

Once you have installed Windows 7 RC and downloaded Microsoft Virtual PC you might have the need to run Microsoft Official Curriculum courseware virtual machines. And therein is a problem.

The virtual machines are built to use Virtual Server 2005, but that cannot install in Windows 7, so you cannot use the Lab Launcher. Though you can install the courseware drives, you will need to run the installer in compatibility mode or the VHD installer will not run.

Once you have the VHD files unzipped you need to configure Microsoft Virtual PC to load them up. This though is a problem if you are not located in the same timezone as the creators of the base disks (PST timezone).

The steps to create a virtual machine when you are in a different timezone are:

  1. Start the virtual machine wizard and make a note of the location value. You will need to modify files in this location later on
    image
  2. Set memory and untick the network connections option
    image
  3. Browse to the exiting hard disks folder. Enable undo disks at this time as well
    image
  4. If you are in a different timezone you will get the following cryptic error
    image
  5. Click OK and modify the file used to point to either any of the “allfiles” disks (as these are not differencing disks) or create your own empty vhd for the time being
    image
  6. Complete the creation steps and then bring up the settings of the new virtual machine (with the wrong disk attached)
    image
  7. Modify the network settings to Internal Network and add any additional disks needed (this will be described in the full setup guide for the course) and close the settings dialog.
  8. Browse to the folder that contains the actual settings file (the vmc file). This folder is the location value from step 1 (defaults to C:\Users\username\AppData\Local\Microsoft\Windows Virtual PC\Virtual Machines).
  9. Open the vmc file in Notepad (or an XML editor) and change the settings to that which you require. These changes are for disks. Look for ide_controller 0 and ide_controller 1 (if present) and change the name of the vhd file to the correct disk name.
  10. Modify the time sync. settings as per disabling-time-synchronization-under-virtual-pc-2007. The virtual machines from Microsoft for training purposes have a grace period and if you bring them up with the current date/time on them (which Virtual PC 2007 does automatically) then you will need to activate them.
  11. Save the file when your changes are completed.
  12. Start the virtual machine. You will see this error message - Inconsistency in virtual hard disk time stamp detected - The virtual hard disk's parent appears to have been modified without using the differencing virtual hard disk. Modifying the parent virtual hard disk may result in data corruption. It is strongly recommended that you mark the parent virtual hard disk as read-only to prevent this in the future. If you recently changed timezones on your host operating system, you can safely continue using this virtual hard disk.
    image
  13. This can occur for a number of reasons, but if the reason is timestamps then click OK. DO NOT click the option not to show the message again, or you will not be able to get past this error without modifying the options.xml file in C:\Users\username\AppData\Local\Microsoft\Windows Virtual PC.

The virtual PC will start, and will prompt you about updates to the integration components, but that is only a minor , so that can be ignored when you are presented with that error, unless you want the error to never show again per machine, in which case install (at your own risk and numerous reboots) the integration components.

Finally, you might need to reactivate some machines, as the hardware will have changed.