How to Copy a Virtual Machine From One Storage Repository to Another

How to Copy a Virtual Machine From One Storage Repository to Another

book

Article ID: CTX116685

calendar_today

Updated On:

Description

This article describes how to copy a virtual machine (VM) from one type of storage repository to another.  The example in this article shows how to copy a VM from local storage to Network File Share (NFS) storage.


Instructions

Complete the corresponding procedures:

Using GUI:

The following steps indicate how to copy a VM from one storage repository to another using the graphical user interface (GUI):

  1. Identify the VM you would like to copy from one storage repository to another.

  2. Right-click the VM in XenCenter and click Copy VM.

    User-added image
  3. Select the type of copy and storage repository you would like to copy the VM to.
    Note: You also have the option to delete the original VM after the copy is complete. Do not select the Remove original VM afterwards check box unless you are sure you would like to delete the selected VM. You can always delete the original VM at another time after it copies successfully.

    User-added image
  4. Monitor the progress of the VM copy by selecting the XenServer host name and the Log tab.
     
    User-added image

Using CLI:

The following steps indicate how to copy a VM from one storage repository to another using the command line interface (CLI):

  1. Run the following commands:
    # xe vm-list (note the name of the VM you wish to copy)
    # xe sr-list (note the name of the storage you will to copy the VM to)
    # xe vm-copy (needs the following parameters to complete)

    • vm=

    • sr-uuid=

    • new-name-label=       

    • new-name-description= 

    # xe vm-copy vm=<name of VM to copy> sr-uuid=<UUID of SR to copy VM to> new-name-label=<NewNameofVM> new-name-description="Description of VM"

  2. Allow time for the command to complete. If the copy succeeds, the command displays the Universal Unique Identifier (UUID) of the newly created VM. For example:

    User-added image
     
    # xe vm-copy vm=Etch_Local sr-uuid=955bd475-df2d-7c69-4a55-e4abb361262e new-name-label=Etch_Copy_2_NFS_SR new-name-description="This is a copy of a VM from local storage to NFS storage"
    a12e90d5-3894-0366-57a6-9f739daf917d

Issue/Introduction

This article describes how to copy a virtual machine (VM) from one type of storage repository to another. The example below shows how to copy a VM from local storage to Network File Share (NFS) storage.