Solved

Restore Guest OS on Window 2008 Hyper-V

Posted on 2010-08-16
5
936 Views
Last Modified: 2012-05-10
Due to some confliction issue, I have restored the Hyper-V VM  (the XML Document and its folder) and VHD  file (xxx.vhd) for a guest OS. Afterwards, the definition under Hyper-V is name shown under Virtual Machineis disappered.  And I need to create the definition of the VM and relink the file again. However, some information is still missing (eg. IP address..)

Do I miss anything in my guest restore ?

Thanks
0
Comment
Question by:AXISHK
  • 2
  • 2
5 Comments
 
LVL 35

Expert Comment

by:Bembi
ID: 33455638
You can export a virtual machine (if off - right click), this exports
- the HyperV machine configuration (XML)
- the virtual harddisk (optional)
- all snapshots (optional)

The XML File contains the information as set in the HyperV manager. I.r. Number of processors, memory etc., and the NIC MAC address

IP-Addresses (if static) and all configuration settings of the machine itselves is not stored in the XML. These information are stored in the machines registry and therefore on the virtual disk. If such information is lost, your virtual hard disc may not be up to date.  
If your IP is dynamic, the machine may get a new one.

0
 

Author Comment

by:AXISHK
ID: 33460609
Is it possible to restore VM using my existing Window 2008 backup ?  I have restored the Hyper-V VM  (the XML Document and its folder) and VHD  file (xxx.vhd) from my backup. But does it include everything that I need for the guest OS ?

Thanks
0
 
LVL 15

Accepted Solution

by:
msmamji earned 250 total points
ID: 33465584
As the previous expert told you, in order to move VM from one place (HOST, CLUSTER etc) to other, you need to export the VM. The export option takes care of the export configuration in exp file, export the snapshots (if any) and the VHD file. Now since you didn't do the export, you can't use the import feature to import the VM.

You have the XML file which is not a proper import format. The XML file for a VM, hold its configuration and are created and maintained by the Hyper-V Manager itself. The XML file might not be handy for you for that reason.

You can however create a new VM, configure the options (if you remember them) and attach the VHD (from backup) and bring the VM up.  You might see some "New hardware detected" messages on the first boot with this method.

There is however one thing you might be able to do if you want  to bring the VM with original configuration but I haven't tried it myself and I am pretty sure it also unsupported. Create a new VM and configure it whatever way you want, attach the VHD to it. Now, without turning it on, locate its configuration file, open it in notepad and copy the content from the backup XML to this new XML file. Open the configuration of the VM, see if everything seems fine, if you find some configuration errors in the config, it pretty much means that some of the options from the previous XML were not understodd properly. Correct them and start the VM.  I am not sure if this works but in your case it might be worth a try. Keep the copy of the VHD somewhere safe as a backup, just in case.

Regards,
Shahid
0
 

Author Comment

by:AXISHK
ID: 33471480
Actually, I only want to restore all my existing settings and vhd files from the backup copy of Window 2008 into existing Hyper-V server. As my existing definition has been corrupted after serveral testing, I could only create the new definition of VM and re-attach the backup copy of VHD file.

Again, I really wonder how to fully recover existing configuration and VHD file from my Window 2008 backup copy, or we couldn't recover the existing configuration and setting from the Window 2008 and "Export" or re-create a VM definition is the only way to rebuild the image. Really want to clarify on this.

Sorry if there is anything confusing.

Thanks
0
 
LVL 35

Assisted Solution

by:Bembi
Bembi earned 250 total points
ID: 33478506
As I said before, the config (XLM) file stores the HyperV configuration and the *.vhd is the disk of this virtual machine. As you also can replace or move a physical disk in a physical machine, you can move a logical disk from one virtual machoine to another.

What may happen is, that some devices, which are represented by a GUID (128 Bit number) in the XML file, has to be recognized again as the new GUIDs are different from what is stored on the disk. But as all drivers for virtual machines are the same, it is not a problem at all, to run a virtual disk under a new HyperV Virtual machine definition. That means, each virtual machine has the same virtual hardware, it is the same as you would move the physical harddisc from one physical machine to a absolute identical new pysical machine.

Windows is able in general to rebuild itsself as long as the HAL is the same and all necessary base drivers are recognized by Windows. For virtual machines, this is the case anyway, as the physical hardware do not care. But configuration settings (i.e. for NICs are lost).

If you want to avoid the re-recognition of the hardware, you can backup the files, which are also copied if you export the virtual machine. The Export function just moves the files to another location, that all. And the import function moves them just back to the original place. If you restore all these files later from a tape, the virtual machine will start without problems, as long as they belong together and the virtual machine is not deleted from the virtual machine manager (the host stores the GUID of each virtual machine in its own registry.)

If configuration file and virtual disk are from different backups, you may run into some problems with existing snapshots, but the machine will start in general.

Of course you may be able to recreate an configuration file. But as all devices are represented by GUIDs, you would have find all of them to do this. Creating a new configuration and attaching the virtual disk is just much more easier.

0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Scenario:  You do full backups to a internal hard drive in either product (SBS or Server 2008).  All goes well for a very long time.  One day, backups begin to fail with a message that the disk is full.  Your disk contains many, many more backups th…
I was supporting a handful of Windows 2008 (non-R2) 2 node clusters with shared quorum disks. Some had SQL 2008 installed and some were just a vendor application that we supported. For the purposes of this article it doesn’t really matter which so w…
To efficiently enable the rotation of USB drives for backups, storage pools need to be created. This way no matter which USB drive is installed, the backups will successfully write without any administrative intervention. Multiple USB devices need t…
This tutorial will walk an individual through setting the global and backup job media overwrite and protection periods in Backup Exec 2012. Log onto the Backup Exec Central Administration Server. Examine the services. If all or most of them are stop…

785 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question