Importing Windows 2008 R2 Hyper-V VM Into Windows 8.1

For the purposes of this post, let’s try and import a VM called AD1HC1.  This was successfully exported from Windows Server 2008 R2 Hyper-V.  Currently this VM and all its associated files reside in the G:\VMs\AD1HC1 folder.  The various files can be seen here:

There are no hidden tricks and this is an exported VM that can be imported to Windows Server 2008 R2 without issues, and has been many times.

If we use the GUI and try to import the VM into Windows 8.1

We get the following error:

Hyper-V did not find virtual machines to import from location ‘G:\VMs\AD1HC1’

When reviewing what Process Monitor sees on the file system, there are no Access Denied error messages.  We are able to read the disk and review the files contained within.

If the files exist on the disk and we can read them, what’s up then?  For the eagle eyed out there, you may be wondering why the .exp file has not been read…..

Digging In

If you wrote scripts to import/export Windows Server 2008 Hyper-V VMs, there is a small clue in the Hyper-V section located in the Features Removed or Deprecated in Windows Server 2012 page on TechNet.   **

  • VM Chimney (also called TCP Offload) has been removed. The TCP chimney will not be available to guest operating systems.
  • Support for Static VMQ has been removed. Drivers using NDIS 6.3 will automatically access Dynamic VMQ capabilities that are new in Windows Server 2012.
  • The WMI root\virtualization namespace is deprecated. The new namespace is root\virtualization\v2.
  • Windows Authorization Manager (AzMan) is deprecated. You may need to use new management tools for virtual machines or redesign the authorization model.

And if we then look at the same section in the Features Removed or Deprecated in Windows Server 2012 R2

  • WMI root\virtualization namespace v1 (used in Hyper-V)

So the WMI v1 namespace was deprecated in Windows Server 2012, and then removed in Windows Server 2012 R2.   Why is this important?  When the Export call was made to export the VM from Windows 2008 R2, the WMI v1 namespace was used.  This can be seen with a PowerShell snippet  which binds to the Hyper-V WMI Namespace.

$VMManagementService = Get-WmiObject -Namespace root\virtualization -Class Msvm_VirtualSystemManagementService -ComputerName $HyperVHost

In a post on the Hyper-V TechNet forum there are some details worth reading from Taylor Brown, and if you don't already read his blog the RSS feed is here.

VM's that are exported from Windows Server 2008 or 2008 R2 utilized the version 1 WMI namespace which resulted in an .exp file to represent the exported virtual machine. In Windows Server 2012 we introduced a new WMI namespace (version 2 or root\virtualization\v2) which implemented a much better import/export model – allowing you to effectively just copy the virtual machine folder (with the VM’s XML configuration file inside it) as well as the VM’s VHDs and then import that directly. For Windows Server 2012 we maintained the version 1 WMI namespace which allowed for importing of Windows Server 2008/R2 VM’s on 2012.

In Windows Server 2012 R2 we have removed the old version 1 namespace which means we can’t import virtual machines that where exported from Windows Server 2008/R2.

What To Do

As you can see, VMs that were exported from Windows Server 2008 & 2008 R2 cannot be imported as-is into Windows Server 2012 R2 or Windows 8.1.

Don’t Panic Captain Mainwaring, Don’t panic!   ***

Don’t panic as there are options!!  Let’s look at them based on the scenario.  There are two basic takes on this:

  1. Original Hyper-V Server and the VM is still available
  2. Original Hyper-V Server is not available

Original Hyper-V Server & VMs Available

If you exported from Windows Server 2008 or 2008 R2, and the original host is still available with the VMs then probably the easiest option will be to get the VMs off that machine in a format that is easily importable to Hyper-V 2012 R2.

On the original Hyper-V server, power down the VMs.  Once they have shut down, then stop the Hyper-V Virtual Machine Management Service (VMMS).  This will unlock the VM’s files.  Simply copy over the VM folders to the Windows Server 2012 R2 server and they can be imported.  Remember this was one of the features added to Windows Server 2012 - we do not have to specifically export a VM before it can be imported.  Funnily enough this functionality was added in the WMI v2 namespace for Hyper-V….

具体步骤:

1.关闭虚机

2.停止VMMS服务(不影响虚机的运行,已测试)

3.拷贝虚机所在文件夹到Windows2012R2,

4.启动VMMS服务

5.在Winodws2012R2上导入虚机

说明:

其中就地注册虚拟机(使用现有的唯一ID)表示使用导入文件夹内的虚拟机,虚拟的路径和原来导入虚拟机路径相同,唯一识别码不变;

还原虚拟机(使用现有唯一的ID)表示复制导入文件夹内的虚拟机,可以指定导入不同的路径,预设值为不指定,唯一识别码不变;

复制虚拟机(创建新的唯一ID)表示复制导入文件夹内的虚拟机,可以指定导入不同的路径,预设值为不指定,但是生成新的唯一ID。

Original Hyper-V Server Unavailable

If the original server or a copy of the VMs is no longer available, there are still a couple of options.  This may be the scenario if you are re-purposing the hardware and the original machine has been wiped, or if these are archived lab VMs that you are trying to import to a new version of Hyper-V.

Perform Intermediate Import

If, and this will not apply to everyone, you have a Windows Server 2012 Hyper-V machine, the 2008 / 2008 R2 VMs can be imported to that server.  Note that this is not a R2 2012 server. Since 2012 still has the WMI v1 namespace (albeit deprecated), we can import the .exp machines.  Once successfully imported to 2012, the VMs can be exported or copied over to Windows Server 2012 R2.  You do not need to power on the VMs after importing them to the intermediate Windows Server 2012 machine, that server is only used to perform the import thus allowing the VM to be copied to Windows Server 2012R2.

Travis mentioned an interesting take on this in the comments below.  Consider a temporary boot to VHD option just to get the necessary import step done.  Thanks Travis!  Would love to know if that helps folks out at all – please post a comment below!

Update 2-12-2013: Added a How To on this topic.  Please see this post.

Create New VM – Reuse Virtual Hard Disk

If the above method is not available, or is too time consuming, an option is to create new VM configuration and specify to use an existing virtual hard disk.  By doing so we can re-use the VM’s virtual hard disk file.  Since the virtual NIC now has a different GUID Windows will recognise it as a different NIC, and you will need to re-enter the IP address in the VM.

From:http://blogs.technet.com/b/rmilne/archive/2013/10/22/windows-hyper-v-2012-amp-8-1-hyper-v-did-not-find-virtual-machine-to-import.aspx?pageindex=2

https://social.microsoft.com/Forums/zh-CN/b283169a-eb9b-4140-87f1-ac3a8b3e174c/server2012r2server2008r2hyperv?forum=2222

在Server2012R2上导入Server2008R2的HyperV虚拟机的更多相关文章

  1. Hyper-V虚拟机故障导致数据文件丢失的数据恢复全过程

    简介: 由于MD3200存储中虚拟机的数据文件丢失,导致整个Hyper-V服务瘫痪,虚拟机无法使用,故障环境为Windows Server 2012服务器,系统中部署了Hyper-V虚拟机环境,虚拟机 ...

  2. 存储Hyper-V虚拟机的硬盘空间不足时的处理

    存储Hyper-V虚拟机的硬盘空间严重不足时的处理   ==先导出虚拟机到空间足够的硬盘,再在空间足够的分区上导入虚拟机 方法如下: 导出虚拟机: 导出之前,我们先删除不需要的快照. 在Hyper-V ...

  3. Windows 8 Hyper-V虚拟机功能(转载)

    刚才看见一兄弟w500折腾win8 hyper-v功能,普及下吧,欢迎各位斧正 Windows 8 中 Hyper-V 3.0 的 CPU 支持说明 Windows 8 将直接内置 Hyper-V 3 ...

  4. Hyper-V虚拟机和主机的网络配置

    Hyper-V虚拟机和主机的网络配置 方式1.共享式 这种方式是将Hyper-V内部的虚拟网络与外部网络共享.使得内部是一个私有的网络.属于NAT的类型.(不知道这么说对不对) 优点: 相对来说属于私 ...

  5. Hyper-v虚拟机上网

    Windows 8中内置的Hyper-V管理器可以说给许多人带来了惊喜!在Hyper-V管理器强大的同时,也同样面临着设置中一些不可避免的麻烦.有人说,Hyper-V虚拟机联网麻烦,其实,只要掌握了技 ...

  6. Hyper-V虚拟机联网设置

    转自:http://www.3lian.com/edu/2012/12-22/50492.html Windows 8中内置的Hyper-V管理器可以说给许多人带来了惊喜!在Hyper-V管理器强大的 ...

  7. 开启Windows8里面的Hyper-V虚拟机功能

    首先了解下什么是Hyper-V?也就是虚拟化技术,允许终端用户在同一台机器上运行多个操作系统,支持32位和64位系统,可以直接在Windows 8上创建自己的虚拟机.开启Hyper-V虚拟机需要更多的 ...

  8. 如何将hyper-v虚拟机转换成vmware的虚拟机- 转换SharePoint 2010 Information Worker Demonstration and Evaluation Virtual Machine (SP1)

    官方有一个用于SharePoint的demo用的虚拟机: 2010 Information Worker Demonstration and Evaluation Virtual Machine (S ...

  9. Hyper-V虚拟机配置内部网络固定IP 并且连接外网

    2019/10/23 Hyper-V CentOS7 摘要:Hyper-V中的虚拟机CentOS7能固定IP并且连接外网 保证宿主机的Xshell始终只用同一个IP连接到该虚拟机 新建内部网络虚拟交换 ...

随机推荐

  1. CSAPP阅读笔记-汇编语言初探(算术和逻辑操作类指令)-来自第三章3.5的笔记-P128-P135

    1.算术和逻辑操作类指令分四类:加载有效地址,一元操作,二元操作和移位,如下: 2. leaq指令,类似mov指令,它左侧的数看似是给出一个地址,在内存中从给定的地址取操作数,传给右边的目的地.但其实 ...

  2. Android自动化之AccessibilityService

    简介demo示例说明Manifest声明AccessibilityService的XML配置文件创建继承自AccessibilityService的服务类MainActivity检测服务是否开启UiA ...

  3. openerp学习笔记 数据合法性约束(对象约束+数据库约束)

    #检测同一时间段内是否存在相同的请假单,False 是存在,不允许创建    def _check_date(self, cr, uid, ids):        for rec in self.b ...

  4. jsp模板添加URL定位语句

    html的head头中加入以下语句,方便url链接诶编写定位 <base href="${pageContext.request.scheme}://${pageContext.req ...

  5. ELF文件解析器支持x86x64ELF文件

    此文为静态分析ELF文件结构,遍历其中Elf_Ehdr文件头信息,遍历Elf_Shdr节表头信息,并将所有节放置在左侧树控件上,遍历Elf_Phdr程序头也放置在左侧树控件上,并着重分析字符串表,重定 ...

  6. IdentityServer4授权模式应用场景

    OpenID 和 OAuth 的区别 IdentityServer4,NET Core下的安全框架 客户端模式(Client Credentials) 密码模式(resource owner pass ...

  7. 移动端手势事件 hammer.JS插件

                      一.引入hammer.JS 1.下载地址:http://download.csdn.net/detail/webxiaoma/9872249 2.官网地址:http ...

  8. vue中echarts引入中国地图

    <div id="myChartChina" :style="{width: '100%', height: '500px'}"></div& ...

  9. php中cookie的操作

    php设置和获取cookie 创建cookie setcookie('mycookie','value',time()+86400);//参数3 cookie过期时间//函数原型:int setcoo ...

  10. SQL语句整理(一) 数据库查询语言DQL

    前言: 这是我学数据库时整理的学习资料,基本上包括了所以的SQL语句的知识点. 我的教材是人大王珊老师的<数据库系统概论>. 因为是手打的,所以会用一些细节打错了,但都挺明显也不多(考完试 ...