Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Restore Guest OS on Window 2008 Hyper-V

Posted on 2010-08-16
5
Medium Priority
?
946 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 1000 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 1000 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

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

A safe way to clean winsxs folder from your windows server 2008 R2 editions
This article provides a convenient collection of links to Microsoft provided Security Patches for operating systems that have reached their End of Life support cycle. Included operating systems covered by this article are Windows XP,  Windows Server…
This tutorial will show how to push an installation of Backup Exec to an additional server in both 2012 and 2014 versions of the software. Click on the Backup Exec button in the upper left corner. From here, select Installation and Licensing, then I…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…

609 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