Various File Types for Virtual Machine Backup in Windows Virtual PC

File Types

Following are the various file types registered on a user’s machine when Windows® Virtual PC is installed:

File extension

Description

Should back up?

.VMC (Virtual Machine Configuration)

Contains Virtual Machine (VM) configuration like RAM, hard disk, network settings and undo disk settings. This file is associated with vmwindow.exe.

Yes

.VHD (Virtual Hard Disk)

This is the hard disk of VM and most important file to back up. This is a large file and it should be created on disk volume with enough free space. All data for the VM including the operating system data are stored in this file. Refer this article for more details for understanding disk types.

Yes

.VUD (Virtual Undo Disk)

Undo disk for the VM. When undo disk option is enabled all changes to VM are stored in this file. This file is generated at the same path as the .VMC file. So, if you keep undo disk enabled for long time, make sure there is enough free disk space in the volume.

Yes

.VSV (Virtual machine Saved-State)

Dump of virtual machine RAM. Helps to restore VM quickly. Size of this file is the same as amount of RAM assigned to the VM

No

.VFD (Virtual Floppy Disk)

Floppy disk image. There is no UI to attach VFD to VM since usage of floppy is obsolete. User can still use COM API to attach vfd to VM

Yes

.VMCX (vmc eXtended)

This is used by VPC for internal usage only. Explorer shell uses this file to display virtual machine information to the user

No

. vpcbackup

Internal use only. Keeps backed up .vmc file

No

How to backup a virtual machine

Now with the understanding of various file types, it should be clear that .VHD is the most important file to save when you want to back up a VM. Follow the steps as below:

  1. Shutdown the VM. This is important since saved state files (.VSV) are not compatible across machines. Save state stores VM system state and is processor dependent. Moving it to another machine may not boot the VM.
  2. If VM has undo disk enabled, commit or discard the changes. If you want to keep the undo disk for future use, you need to backup .VUD file also. VUD file is created at same path as of .VMC file.
  3. At this time, also backup .VHD and its parent disk (you can find the parent disk by using settings of VM). Backup .VUD file if undo disk is still present.
  4. Backup .VMC file.
  5. A differencing disk (.vhd) keeps pointer of parent disk as absolute and relative path. So when you backup make sure relative path is in same order.

Illustration with Windows XP Mode VM

Let’s walk through an example for backing up a VM created in Windows® XP Mode:

  1. Shutdown the VM. By default, Windows XP Mode goes to save state. For details on VM shutdown, please refer to this post
  2. Open settings for VM. Select “Hard disk 1” page. Here, take note of the disk type. For Windows XP Mode VHD, the disk type is differencing disk.  As such, you need backup differencing disk and its parent disk. It is very important to backup the parent disk, without which the differencing disk will not work.

      Fig 1

Figure 1. Specifying the Hard Disk location in Windows XP Mode Settings UI

3.  Check Undo disks settings. If this is enabled, open directory of .VHD as shown in hard disk page. Here you can find the .vud file

4. The .VMC file is stored at %localappdata%\Microsoft\Windows Virtual PC. You can find the path of .VMC file in “Virtual Machines” folder. Refer “Configuration file” column in this folder

5. Copy .VMC, .VHD, .VUD file to backup virtual machine. Make sure you keep the relative path same for diff disk VHD and parent VHD. A typical out of box installation of Windows XP Mode VM involves the following files to backup

    • %localappdata%\Microsoft\Windows Virtual PC\Virtual Machines\Windows XP Mode.vhd (Diff disk)
    • C:\Program Files\Windows XP Mode\Windows XP Mode base.vhd (Parent disk)
    • %localappdata%\Microsoft\Windows Virtual PC\Virtual Machines\Windows XP Mode.vmc (Configuration file)

How to restore a backed up VM

There are various ways to back up the VM files.  You may be using Windows® backup for complete system backup or making volume back up using VSS or you may use simple copy to save VM files.  The important point is to backup all required files (.VHD, .VUD, .VMC) and restore them using same toolset.

Technorati Tags: Windows 7,Windows Virtual PC,Windows XP Mode,Application Compatibility,Windows Upgrade,VPC,VHD,VM,Virtual Machine,Virtualization,VFD,VMCX,VSV,Backup

Vinod Atal

SDE

Microsoft Virtualization Team

Comments

  • Anonymous
    December 21, 2009
    Using COM API to attach/detach floppy disk files is not acceptable. You need to build an update to add this function to the GUI. I guess that Microsoft wants Virtual PC to disappear and this is a good way to do it.

  • Anonymous
    August 04, 2010
    I agreed with you, Thanks for nice information

  • Anonymous
    February 03, 2013
    only a single virtual CPU, poor paravirtualizatrion, poor display emulation (outdated S2 Trio 32/64 emulation), limited number of VHDs (4 max), and extremely slow boot time of the VM (using LOTS of CPU ressources). Really switch ever from MS Virtual PC to Oracle VirtualBox (which can run the preconfigured Microsoft VMs, including "XP Mode" (but it will be more efficient to just install XP in a fresh VM from an XP installation CD or .ISO)

  • Anonymous
    April 04, 2013
    DriveHQ has offered Cloud Backup and Cloud IT service for over 10 years. Backing up virtual machines can be extremely challenging. To help our customers solve the problem, DriveHQ.com published a very detailed technical documentation about the best practices to backup virtual machines. Please visit the DriveHQ support page: www.drivehq.com/.../page1 Using DriveHQ's online backup solution to backup virtual machines, you can achieve: (1) Minimize the amount of data to be backed up; (2) Faster to restore; (3) Lower cost; (4) Be able to restore individual files and folders; (5) Minimize the chance of data corruption and the impact of data corruption. (6) More flexible. You can restore VMs on to different physical servers.