简体   繁体   English

使用现有VM的快照分割新VM

[英]Snip up new VM using snap of existing VM

I have existing VM which is having all the required setting. 我现有的VM具有所有必需的设置。 I want to snip up a new VM with similar settings. 我想用类似的设置剪裁一个新的VM。 Can i take snap of the existing VM to snip the new similar VM ? 我可以快照现有的VM来剪接新的类似VM吗?

If yes, how can i do it , Any link or steps will help. 如果是,我该怎么做,任何链接或步骤都会有所帮助。

Using : Microsoft Hyper-v manager , Windows Server 2012 使用:Microsoft Hyper-v管理器,Windows Server 2012

Thanks in Advance 提前致谢

Hyper-V does not have any features to "clone" an existing VM. Hyper-V没有任何功能可以“克隆”现有的VM。 However, there is a way around. 但是,有一个解决方法。 You can Export the VM and Import it back. 您可以导出VM并将其导入回来。 Here are the steps: 步骤如下:

  1. Export the VM in to a folder from Hyper-V Manager or Powershell "Export-VM" command. 通过Hyper-V管理器或Powershell“ Export-VM”命令将VM导出到文件夹中。 While it is not necessary, I would recommend turning off the VM first to make sure all pending writes in memory are committed to the disk. 虽然没有必要,但我建议您先关闭VM,以确保内存中所有未决的写操作都已提交到磁盘。
  2. Now from Hyper-V Manager, right click on the Server and select "Import Virtual Machine..." 现在,从Hyper-V管理器中,右键单击服务器,然后选择“导入虚拟机...”。
  3. Select the folder you exported the VM to and follow the prompts. 选择将VM导出到的文件夹,然后按照提示进行操作。
  4. When you are at "Choose Import Type", select "Copy the virtual machine (create new unique ID)" option. 当您处于“选择导入类型”时,选择“复制虚拟机(创建新的唯一ID)”选项。 This will make sure the import does not overwrite the existing VM. 这将确保导入不会覆盖现有的VM。
  5. Follow the prompts and finish the import. 按照提示完成导入。 You can rename VM when import completes so that you do not have two VMs with the same name and configuration. 导入完成后,您可以重命名VM,这样就不会有两个具有相同名称和配置的VM。

Note that the snapshots and saved states and VHDs from earlier VMs carry over to the new VM. 请注意,来自早期VM的快照,已保存状态和VHD会继承到新VM。 You may want to discard some of this in the new VM to keep it fresh. 您可能需要在新VM中丢弃其中的一些内容以使其保持最新状态。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM