Jump to content
Welcome to our new Citrix community!
  • 1

xe vm-import to new vm


David Crook

Question

When using the xe vm-import command is there a way to specify that a new vm is to be created.
Specifically I want to be able to export a vm and import it again as a different vm.
For example I create a vm for Windows XP, I shut the vm down and run the xe vm-export to external usb drive locally attached to the host. This works fine and creates the export. When I run the vm-import command it will only work if the xp vm no longer exists. I would like to be able to run the import and create a second instance of the xp machine. Obviously I would not then start both vm instances at the same time.
Is there a parameter that can be added to xe vm-import to create the vm as a different vm?
Hopefully that makes sense!

Link to comment

3 answers to this question

Recommended Posts

  • 0

It probably helps to understand what each command is doing. See Below

[root@ftkchristophxs401-41-50a ~]# xe help vm-import
command name : vm-import
reqd params : filename
optional params : preserve, sr-uuid, force
description : Import a VM. If the option preserve=true is given then as many settings as possible are restored, including VIF MAC addresses. The default is to regenerate VIF MAC addresses. The VDIs will be imported into the Pool's default SR unless an override is provided. If the force option is given then any disk data checksum failures will be ignored.

[root@ftkchristophxs401-41-50a ~]# xe help vm-copy
command name : vm-copy
reqd params : new-name-label
optional params : new-name-description, sr-uuid, <vm-selectors>
description : Copy an existing VM, but without using storage-level fast disk clone operation (even if this is available). The disk images of the copied VM are guaranteed to be 'full images' - i.e. not part of a CoW chain. The simplest way to select the VM on which the operation is to be performed is by supplying the argument 'vm=<name or uuid>'. VMs can also be specified by filtering the full list of VMs on the values of fields. For example, specifying 'power-state=halted' will select all VMs whose power-state field is equal to 'halted'. Where multiple VMs are matching, the option '--multiple' must be specified to perform the operation. The full list of fields that can be matched can be obtained by the command 'xe vm-list params=all'. If no parameters to select VMs are given, the operation will be performed on all VMs.

Hence, what you are really looking to do is vm-copy

Take a look at the article below:

http://support.citrix.com/article/ctx116685

Chris

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...