Export and import virtual machines (2024)

  • Article

Applies to: Windows Server 2022, Windows 10, Windows Server 2016, Microsoft Hyper-V Server 2016, Windows Server 2019, Microsoft Hyper-V Server 2019

This article shows you how to export and import a virtual machine, which is a quick way to move or copy them. This article also discusses some of the choices to make when doing an export or import.

Export a Virtual Machine

An export gathers all required files into one unit--virtual hard disk files, virtual machine configuration files, and any checkpoint files. You can do this on a virtual machine that is in either a started or stopped state.

Using Hyper-V Manager

To create a virtual machine export:

  1. In Hyper-V Manager, right-click the virtual machine and select Export.

  2. Choose where to store the exported files, and click Export.

When the export is done, you can see all exported files under the export location.

Using PowerShell

Open a session as Administrator and run a command like the following, after replacing <vm name> and <path>:

Export-VM -Name \<vm name\> -Path \<path\>

For details, see Export-VM.

Import a Virtual Machine

Importing a virtual machine registers the virtual machine with the Hyper-V host. You can import back into the host, or new host. If you're importing to the same host, you don't need to export the virtual machine first, because Hyper-V tries to recreate the virtual machine from available files. Importing a virtual machine registers it so it can be used on the Hyper-V host.

Important

Hyper-V virtual machine configurations have a specific version number. You can only import a virtual machine if the Hyper-V host supports that configuration version. Typically, this means that you can import a virtual machine to a Hyper-V host running a newer version of Hyper-V, but you cannot import a virtual machine created on a newer version of Hyper-V to an older version of Hyper-V. See Supported virtual machine configuration versions for more information.

The Import Virtual Machine wizard also helps you fix incompatibilities that can exist when moving from one host to another. This is commonly differences in physical hardware, such as memory, virtual switches, and virtual processors.

Import using Hyper-V Manager

To import a virtual machine:

  1. From the Actions menu in Hyper-V Manager, click Import Virtual Machine.

  2. Click Next.

  3. Select the folder that contains the exported files, and click Next.

  4. Select the virtual machine to import.

  5. Choose the import type, and click Next. (For descriptions, see Import types, below.)

  6. Click Finish.

Import using PowerShell

Use the Import-VM cmdlet, following the example for the type of import you want. For descriptions of the types, see Import types, below.

Register in place

This type of import uses the files where they are stored at the time of import and retains the virtual machine's ID. The following command shows an example of an import file. Run a similar command with your own values.

Import-VM -Path 'C:\<vm export path>\2B91FEB3-F1E0-4FFF-B8BE-29CED892A95A.vmcx'

Restore

To import the virtual machine specifying your own path for the virtual machine files, run a command like this, replacing the examples with your values:

Import-VM -Path 'C:\<vm export path>\2B91FEB3-F1E0-4FFF-B8BE-29CED892A95A.vmcx' -Copy -VhdDestinationPath 'D:\Virtual Machines\WIN10DOC' -VirtualMachinePath 'D:\Virtual Machines\WIN10DOC'

Import as a copy

To complete a copy import and move the virtual machine files to the default Hyper-V location, run a command like this, replacing the examples with your values:

Import-VM -Path 'C:\<vm export path>\2B91FEB3-F1E0-4FFF-B8BE-29CED892A95A.vmcx' -Copy -GenerateNewId

For details, see Import-VM.

Import types

Hyper-V offers three import types:

  • Register in-place – This type assumes export files are in the location where you'll store and run the virtual machine. The imported virtual machine has the same ID as it did at the time of export. Because of this, if the virtual machine is already registered with Hyper-V, it needs to be deleted before the import works. When the import has completed, the export files become the running state files and can't be removed.

  • Restore the virtual machine – Restore the virtual machine to a location you choose, or use the default to Hyper-V. This import type creates a copy of the exported files and moves them to the selected location. When imported, the virtual machine has the same ID as it did at the time of export. Because of this, if the virtual machine is already running in Hyper-V, it needs to be deleted before the import can be completed. When the import has completed, the exported files remain intact and can be removed or imported again.

  • Copy the virtual machine – This is similar to the Restore type in that you select a location for the files. The difference is that the imported virtual machine has a new unique ID, which means you can import the virtual machine to the same host multiple times.

Export and import virtual machines (2024)
Top Articles
What is a Good Monthly Retirement Income for a Couple?
CBC News Network - CBC Media Centre
Poe T4 Aisling
Hannaford Weekly Flyer Manchester Nh
Pangphip Application
Archived Obituaries
PontiacMadeDDG family: mother, father and siblings
Sportsman Warehouse Cda
Best Transmission Service Margate
Unlocking the Enigmatic Tonicamille: A Journey from Small Town to Social Media Stardom
Aries Auhsd
Lesson 2 Homework 4.1
Jasmine Put A Ring On It Age
Blue Beetle Showtimes Near Regal Swamp Fox
Hartford Healthcare Employee Tools
7 Low-Carb Foods That Fill You Up - Keto Tips
Https://Store-Kronos.kohls.com/Wfc
Walmart stores in 6 states no longer provide single-use bags at checkout: Which states are next?
Zalog Forum
Amazing deals for DKoldies on Goodshop!
Spn 520211
Putin advierte que si se permite a Ucrania usar misiles de largo alcance, los países de la OTAN estarán en guerra con Rusia - BBC News Mundo
Apartments / Housing For Rent near Lake Placid, FL - craigslist
Jesus Revolution Showtimes Near Regal Stonecrest
Temu Seat Covers
Maine Racer Swap And Sell
Studentvue Calexico
12657 Uline Way Kenosha Wi
The Procurement Acronyms And Abbreviations That You Need To Know Short Forms Used In Procurement
Greyson Alexander Thorn
Barbie Showtimes Near Lucas Cinemas Albertville
Christmas Days Away
Warn Notice Va
Rogold Extension
Missing 2023 Showtimes Near Mjr Southgate
Advance Auto Parts Stock Price | AAP Stock Quote, News, and History | Markets Insider
Tamil Play.com
How Much Is Mink V3
The Bold And The Beautiful Recaps Soap Central
State Legislatures Icivics Answer Key
Urban Blight Crossword Clue
Unitedhealthcare Community Plan Eye Doctors
LumiSpa iO Activating Cleanser kaufen | 19% Rabatt | NuSkin
Tlc Africa Deaths 2021
CPM Homework Help
Suppress Spell Damage Poe
Doelpuntenteller Robert Mühren eindigt op 38: "Afsluiten in stijl toch?"
Roller Znen ZN50QT-E
Dmv Kiosk Bakersfield
Spongebob Meme Pic
Overstock Comenity Login
Latest Posts
Article information

Author: Pres. Carey Rath

Last Updated:

Views: 6440

Rating: 4 / 5 (61 voted)

Reviews: 92% of readers found this page helpful

Author information

Name: Pres. Carey Rath

Birthday: 1997-03-06

Address: 14955 Ledner Trail, East Rodrickfort, NE 85127-8369

Phone: +18682428114917

Job: National Technology Representative

Hobby: Sand art, Drama, Web surfing, Cycling, Brazilian jiu-jitsu, Leather crafting, Creative writing

Introduction: My name is Pres. Carey Rath, I am a faithful, funny, vast, joyous, lively, brave, glamorous person who loves writing and wants to share my knowledge and understanding with you.