The code that restricts this are the functions CanExecute(VM vm, Host preselectedHost) in these two files (called with preselectedHost==null):
https://github.com/xenserver/xenadmin/blob/master/XenAdmin/Commands/CrossPoolMigrateCommand.cs
https://github.com/xenserver/xenadmin/blob/master/XenAdmin/Commands/CrossPoolCopyVMCommand.cs
I canât see much obvious in here. Youâve said that the VM is halted, which would otherwise be the most obvious thing. The allowed_operations has to include migrate_send, but presumably it does if itâs succeeding from the command line. If XenServer is 6.5, then WLB prevents migration: could that explain it? The only other thing is that the VM has to be not Locked, but that should be a transient state during another operation.
--
Stephen
From: xs-devel-***@lists.xenserver.org [mailto:xs-devel-***@lists.xenserver.org] On Behalf Of Iñigo Martinez Lasala
Sent: 30 May 2016 10:59
To: Andrew Halley <***@citrix.com>
Cc: xs-***@lists.xenserver.org
Subject: Re: [xs-devel] VM copy between pools
Hi Andrew.
I've tested with your suggestions. With xe cli there is no problem and I can copy all VMs to destination pool without any problem. So, it appears to be a Xencenter problem and not a Xenserver problem.
I've included you some screenshots. Xenserver version is latest one included with Xenserver 7.0.0.
And now the funny final scene... after executing a xe vm-migrate from command line and starting copying vm, Xencenter shows the "copy icon". Cancel and after that... voilá... I can manually copy previously locked VMs to destination from graphical interface for all previously "not allowed" VMs... !!! WTF !! :-O
2016-05-29 16:55 GMT+02:00 Andrew Halley <***@citrix.com<mailto:***@citrix.com>>:
From Engineering :
----
HI,
I tried to reproduce the issue based on your description. I created various VM configurations, but I couldn't reproduce the situation you described.
The difference is, I always see a "copy VM" entry on the context menu of a halted VM, disregarding what the VM is (even a dummy VM), and the "copy VM" entry always lead me to the selection page with both options ("Within pool" or "Cross-pool"). This does not imply one can always migrate/copy VM of any configuration/state, as the "Cross-pool" option might eventually lead to an empty list of destination pools or a set of pool candidates all grayed out (due to various restrictions). But since I can always reach the selection page at least, this is different from the situation you described.
I couldn't figure out what exactly caused the difference without more detailed information. Here are a few things you could check and experiment with:
* Make sure you are using the latest XenCenter, and make sure the operator has enough privilege in both the source and destination pool
* Tried the suggestion in my previous comment to see if XenCenter allow you to move/migrate the same VM to the destination instead of copy.
* Try to use the corresponding xe CLI directly to see if that fails and why. The CLI is something like "xe vm-migrate vm=XXXX copy=true remote-master=xxx remote-username=xxx remote-password=xxx vif:xxxx=xxxx"
* It would be very useful if you could generate some logs (right after you try the "copy VM" click and can't see the selection page you'd expect) and then send to us. This could be either a complete status-report generated via XenCenter, or at least the following items (XenCenter log, /var/log/xensource.log, and a data dump generated by "xe pool-dump-database").
Cheers,
----
________________________________
From: Iñigo Martinez Lasala <***@playgiga.com<mailto:***@playgiga.com>>
Date: 28 May 2016 at 09:58:07 BST
To: Andrew Halley <***@citrix.com<mailto:***@citrix.com>>
Cc: xs-***@lists.xenserver.org<mailto:xs-***@lists.xenserver.org> <xs-***@lists.xenserver.org<mailto:xs-***@lists.xenserver.org>>
Subject: Re: [xs-devel] VM copy between pools
Hi.
I use Xencenter.
Those machines that can be copied to another pool give you the option when copying to select your pool or another pool as destination.
Those that cannot directly show the standard window for copy in your pool (full copy or fast clone) without giving the option for pool selection.
El 28 may. 2016 8:57, "Andrew Halley" <***@citrix.com<mailto:***@citrix.com>> escribió:
From engineering :
Do you use XenCenter or CLI? When you say some VMs can not be copied, what actually happens when you try to do so?
For any VM that you couldn't do the copy, could you try to storage migration it (running or halted) to your destination pool? If that works, I can't see why the copy wouldn't. Effectively the copy is just a special mode ("copy" mode) of the storage migration, which will leave the original VM untouched and change a few things on destination VM to distinguish it from the source VM. They shares the similar "assert-can-migrate" judgement.
________________________________
From: Tobias Kreidl <***@nau.edu<mailto:***@nau.edu>>
Date: 27 May 2016 at 23:59:12 BST
To: xs-***@lists.xenserver.org<mailto:xs-***@lists.xenserver.org> <xs-***@lists.xenserver.org<mailto:xs-***@lists.xenserver.org>>, ***@playgiga.com<mailto:***@playgiga.com> <***@playgiga.com<mailto:***@playgiga.com>>
Subject: Re: [xs-devel] VM copy between pools
I agree. I do not recall running into this issue under Dundee TP3.
On 5/27/2016 11:15 AM, Iñigo Martinez Lasala wrote:
Hi Tobias.
But if VM is shut down that should not matter...
We will check on Monday.
Thank you!
El 27 may. 2016 16:45, "Tobias Kreidl" <***@nau.edu<mailto:***@nau.edu>> escribió:
For 7.0, the main issue I can think of would be XenTools.
On 5/27/2016 5:11 AM, Iñigo Martinez Lasala wrote:
Hi everybody.
Does anybody know what criteria must accomplish a VM for be copied between pools (with the VM shutdown)?
We have been working with several Xenserver 6.5 and 7.0 pools and we have not found when we can use this feature. We have checked if there are snapshots, if there are vGPU assigned, different OS (Windows 2008, 2012, Ubuntu), type of virtualization (HVM, PV or PVHVM), Xenserver versions, but the true is that some of then can be copied and some not without identifying any common pattern.
Thanks in advance.
--
[Image removed by sender. PlayGiga]<http://www.playgiga.com/>
Iñigo Martinez Lasala
System Manager
+34 626 998 456
[Image removed by sender. Profile on linkedin]<http://es.linkedin.com/in/inigoml> [Image removed by sender. Profile on Twitter] <https://twitter.com/inigoml2> [Image removed by sender. skype alberto.zuya] inigoml
+34 91 084 00 30 - Avenida de Burgos 12, 2-D 28036 Madrid
www.playgiga.com<http://www.playgiga.com>