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

How to move a VM from one Xen server to another?


Nick57

Question

13 answers to this question

Recommended Posts

  • 0

Hi Tobias :-)

I tried that, but the export allows only to my PC and then I need to upload it back again, with my current speeds this is going to take a very long time :-((

Is there a way to export it to a shared resource both can see, I have a nfs iso share, but no idea if this is possible?

Kind regards,

Link to comment
  • 0

It has to be writen to some sort of storage -- you can use a command-line option, but you'll still have to put it somewhere outside the realm of Xen. Why would a PC be that slow? I can do a 30 GB transfer in an hour or so.
Another option might be to write to an NFS/Samba share off the PC, if a faster disk is the issue. If it's a network issue, then you can write to a NFS-mounted filesystem off a XenServer using

xe vm-export vm=(name or uuid) outputfile.xva

--Tobias

Link to comment
  • 0

I have created a NFS share for this, but, both servers see this as their own share, so, I am not able to move from one server a backup in the share and then being able to import it ... frustated...

So only way seems to go with laptop to DC and export/import.

Link to comment
  • 0

What is your end goal? If it is to regularly move this VM from one XenServer to another then you could create a separate NFS storage repository just for this VM and then use the 'portable storage repository' functionality of XenServer to make this SR available at a different host.

In essence, you create an SR on one host, create your VM on this SR, backup VM metadata to the same SR using xsconsole, detach the SR and use xsconsole to reattach the SR to the other host and recover the VM and it's metadata. You could then copy the VM to local storage or another NFS SR and move the SR back again.

This may or may not be quicker than just exporting/importing the VM anyway!!

I've not tried this on standalone, non-pooled hosts, but it may be a relavent approach.

Link to comment
  • 0

Hi Guys,

I am attempting this transfer of a VM between platforms as well. I must be missing something fundamental in my understanding of the process so any pointers will be gratefully accepted.

I have done a export from the old machine which seems to be successful although the file it creates looks too small to contain the Virtual disk info as well. I export to an NFS share that both machine have access to. When I attempt an import I get:

The VM could not be imported because attached disks could not be found.

My understanding was that the standard xe vm-export would export the VM and its Virtual disks to a single XVA file. Am I wrong in this understanding and another step is involved in exporting the Virtual disks?

One more point I have created SRs with the same name as the production server on the new server but currently it has no running VMs on it.

Regards
Chris Henry

Edited by: chenry-redback on Nov 22, 2011 8:21 PM

  • Like 1
Link to comment
  • 0

If the export isn't about the same size as the initial disk allocation then the export didn't apparently succeed.
Make sure, of course, that you have enough space to hold the image. The target SR should have adequate space to hold the VDI(s) of the VM.

Make sure you have a fast, reliable network connection to better assure the export will succeed. If in doubt, create a very small VM and test it out first.

--Tobias

  • Like 1
Link to comment
  • 0

Thanks Tobias,

I had come to a similar conclusion that it was the export that was to blame. I forgot to mention that the old machine is running Version 5.6 and the new server Version 6.0. I am importing from old to new, is this an issue?

On the new machine I can import the Citrix test Linux machine, modify it export it and re-import without a problem.

I will try similar tests on the old machine but as it is a production machine I need to do it after local business hours so I can shutdown the Virtual machines.

Thanks again for your help.

Regards
Chris

Link to comment
  • 0

Thanks for the help Tobias, I have been back and forward to this problem so hadn't had a chance to get back.

For general Info: I have found that the Export function fails silently when the VM is running. If I shutdown the VM I get an XVA file of appropriate size which will transfer and import to the second machine.

Because of the time involved in the transfer I would prefer to do this by Snapshot instead, I have done this successfully with a small VM but run out of space with the larger VMs to create a snapshot.

I have created an NFS SR shared by both machines, I think :) but can not work out a way of forcing Snapshots to that shared location. Each machine Old and new are not in a common pool, is that my problem?

Any pointers on where I should go from here?

Regards
Chris

Edited by: chenry-redback on Dec 8, 2011 1:58 AM

Link to comment
  • 0

Snapshots follow storage. If you move your VM storage to your NFS share your snapshot will be on that 

NFS share as well. Another issue is being on XenServer 5.6. If your hardware could handle the upgrade

a newer version will allow you to migrate the VM storage without downtime. Storage migration I believe

requires it to be licensed. If you can't or don't want to consider licensing look to XCP-ng for functionality.

 

--Alan--

 

 

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...