Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Force checkbox to Live Migrate Dialog #66

Closed
igerlster opened this issue May 22, 2018 · 36 comments · Fixed by #85
Closed

Add Force checkbox to Live Migrate Dialog #66

igerlster opened this issue May 22, 2018 · 36 comments · Fixed by #85
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed in progress 🏃‍♂️ Someone is working on that
Milestone

Comments

@igerlster
Copy link

Hi,

live migration from e.g. xeon v3 to xeon v4 fails because of cpu mismatch.. xe vm-migrate command line with force it mostly works fine...

Maybe a "Force Live Migration" Checkbox could be added ?

Thanks
Sebastian

@olivierlambert
Copy link
Member

It is doing a force migration by default (without force, it would be refused). We use basically the same API calls than what you did in CLI.

@igerlster
Copy link
Author

Oh.. i only tested it on XenSever and thought it would be the same...

Thanks !

@olivierlambert
Copy link
Member

Oh sorry misread your request: you mean you can't force it in XCP-ng Center?

@igerlster
Copy link
Author

On XenServer Center i HAVE to use the command line since GUI doesn't have a force button... if XCP-ng Center uses force by default it should be fine...

@borzel borzel reopened this May 23, 2018
@borzel borzel added enhancement New feature or request not reproduced labels May 23, 2018
@olivierlambert
Copy link
Member

Okay I was confused: it was late and I think you asked for Xen Orchestra UI! In Xen Orchestra, we force it by default.

In XenCenter, it's likely that's it's NOT forced by default (hence your experience with it) and indeed, if you don't see a force checkbox, it's not exposed.

@borzel This is probably something you could add and push against mainline too ;)

@borzel borzel added this to the Version 7.5.1 milestone Jul 7, 2018
@borzel
Copy link
Member

borzel commented Jul 11, 2018

@igerlster Can you provide a bit more context? Are you livemigrating in a pool or from host to host? Are you using the migration wizard? Can you maybe post a screenshot?

At this stage it's not clear to me, what you are exactly doing.

I looked into XCP-ng Center source code, but was not able to find the migration code or the mechanic to trigger a migration. It's a bit undocumented :-/

@borzel borzel self-assigned this Jul 11, 2018
@borzel borzel added the in progress 🏃‍♂️ Someone is working on that label Jul 11, 2018
@borzel
Copy link
Member

borzel commented Jul 11, 2018

@igerlster I managed to find the migration code, can you please test this fix?: https://builds.schulzalex.de/xcp-ng/fix-migrate-with-force

@igerlster
Copy link
Author

Hi,
Sorry for my late reply.

unfortunately no success, i'm trying to migrate a vm from XeonE3 to slightly different XeonE3 and get CPU mismatch. Using force on the command line works fine. And it shouldn't be a problem most of the time since the only feature missing is a on chip gpu.

https://i.imgur.com/DMRnCOD.png

If this Dialog would give a warning "CPU mismatch, force live migrate ?" that would be very nice :-)

Thanks,

@borzel
Copy link
Member

borzel commented Jul 13, 2018

Can you please provide the title of the dialog? Its a generic copy wizard which has many modes. I'll try to find your specific issue first :-)

@igerlster
Copy link
Author

Sure : right click on a VM -> Migrate to Sever -> Migrate VM wizard... -> Dialog with Name "Migrate VM" opens

:-)

@borzel
Copy link
Member

borzel commented Jul 13, 2018

I assume you are livemigrating from host to host? Not from poolmember to poolmember?

@igerlster
Copy link
Author

Yes, from Host to Host....

@borzel
Copy link
Member

borzel commented Jul 13, 2018

Ok, wish me luck... Maybe this weekend I have another testversion :-)

@igerlster
Copy link
Author

OK :-) nice .-) Good luck !

@borzel
Copy link
Member

borzel commented Jul 14, 2018

I did look deeper into this ... it's complicated...

The wizard ask's the server, wether it can migrate the vm:

grafik

hmm....

The hard part is not to force migrate, the hard part is to intercept the "error" message and to ignore/overwrite it.

@igerlster
Copy link
Author

igerlster commented Jul 14, 2018

hmm. maybe you can add "force=true" in _options ? so the answer the server gives should be "yes"... maybe :-)

@borzel
Copy link
Member

borzel commented Jul 14, 2018

good hint... I did not see this parameter 🙈

@borzel
Copy link
Member

borzel commented Jul 14, 2018

@borzel
Copy link
Member

borzel commented Jul 14, 2018

It's there :-)

grafik

@igerlster
Copy link
Author

Oh wow .. Nice :)

@igerlster
Copy link
Author

Now passing force to the the part of the code asking if migrate is possible ... Hmm...

@borzel
Copy link
Member

borzel commented Jul 14, 2018

buildserver is allready building

@borzel
Copy link
Member

borzel commented Jul 14, 2018

Please carefully check with this build: https://builds.schulzalex.de/xcp-ng/fix-migrate-with-force/
I did just implement the checking, the actual migration may fail. Please test not with systems in production. Test with VMs of which you have a backup!

@igerlster
Copy link
Author

Oh nice, thanks! :-) now i get the option to start the migration. So seems to be working. I don't have any non production systems right now to test if migration would start :-(

@borzel
Copy link
Member

borzel commented Jul 14, 2018

I even don't have production systems with this scenario, so I'm not able to test too :-(

@borzel
Copy link
Member

borzel commented Jul 14, 2018

⚠️ Call to the world ⚠️

Please can someone test on non production systems?
https://builds.schulzalex.de/xcp-ng/fix-migrate-with-force/

@borzel borzel added help wanted Extra attention is needed do PR to upstream labels Jul 14, 2018
@unusual-aspect
Copy link

unusual-aspect commented Jul 16, 2018

I have two servers that have 'similar' CPU, and have that problem, so i can't move VMs live ... from one server to another, only solution was to shutdown VM, move and then run again.

Error (or more warning), was showing that server CPU don't have features on remote ... where both server have Intel i5 cpus - only difference is generation ;)

Installed your nightly version, and can confirm that moving VM is possible now! Thanks, have no idea what is changed, but is possible to move from one server to another - on live session.

Edit: One more thing ... XCP-ng tools are not installed on VM.

@unusual-aspect
Copy link

unusual-aspect commented Jul 16, 2018

After further testing ... is not that easy as i was think, some VM failed to move:

"Failed","Migrating VM 'Scripts' from 'two-xenserver' to 'xenserver'
Internal error: Xenops_interface.Internal_error("(Unix.Unix_error "Connection reset by peer" write "")")
Time: 00:08:12","xenserver","Jul 16, 2018 9:45 AM"

"Failed","Resuming VM 'Scripts'
VM cannot be resumed because it has no suspend VDI","two-xenserver","Jul 16, 2018 9:53 AM"

@borzel
Copy link
Member

borzel commented Jul 16, 2018

I try to build another improved nightly

@borzel
Copy link
Member

borzel commented Jul 16, 2018

I added another menu item to "Force Migrate" VMs:

grafik

please try again with build 99.99.99.36
https://builds.schulzalex.de/xcp-ng/fix-migrate-with-force/

@unusual-aspect
Copy link

unusual-aspect commented Jul 17, 2018

"Failed","Migrating VM 'Scripts' from 'two-xenserver' to 'xenserver'
Internal error: Xenops_interface.Internal_error("(Unix.Unix_error "Connection reset by peer" write "")")
Time: 00:08:02","xenserver","Jul 17, 2018 9:18 AM"

Nope ;) - Force flag for some reason not working :/ - when i was try to migrate in 'normal' way have same result.

Only difference that i notice is 'progress bar' in events ... first (attempt) was when migrate vm, and that was fine, then progress was reset to 0, then i believe was try to startup vm? So progress is moving, and then failure message appear.

With one is weird anyway, as i can migrate easily from 'xenserver' to 'two-xenserver'

PS: Sorry it was i7, i was think that they are i5 ;)

[root@xenserver ~]# xe host-cpu-info
cpu_count       : 8
    socket_count: 1
          vendor: GenuineIntel
           speed: 2793.074
       modelname: Intel(R) Core(TM) i7 CPU         860  @ 2.80GHz
          family: 6
           model: 30
        stepping: 5
           flags: fpu de tsc msr pae mce cx8 apic sep mca cmov pat clflush acpi mmx fxsr sse sse2 ht syscall nx lm constant_tsc arch_perfmon rep_good nopl nonstop_tsc pni monitor est ssse3 cx16 sse4_1 sse4_2 popcnt hypervisor lahf_lm ida dtherm
        features: 0098e3fd-bfebfbff-00000001-28100800
     features_pv: 17c9cbf5-80b82201-2191cbf5-00000003-00000000-00000000-00000000-00000000-00000000-00000000
    features_hvm: 17cbfbff-80b82221-2993fbff-00000003-00000000-00000000-00000000-00000000-00000000-00000000
[root@xenserver ~]#
[root@two-xenserver ~]# xe host-cpu-info
cpu_count       : 8
    socket_count: 1
          vendor: GenuineIntel
           speed: 3591.766
       modelname: Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz
          family: 6
           model: 60
        stepping: 3
           flags: fpu de tsc msr pae mce cx8 apic sep mca cmov pat clflush acpi mmx fxsr sse sse2 ht syscall nx lm constant_tsc arch_perfmon rep_good nopl nonstop_tsc eagerfpu pni pclmulqdq monitor est ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm abm ida arat epb pln pts dtherm fsgsbase bmi1 avx2 bmi2 erms xsaveopt
        features: 7ffafbff-bfebfbff-00000021-2c100800
     features_pv: 17c9cbf5-f6f83203-2191cbf5-00000023-00000001-00000329-00000000-00000000-00000000-00000000
    features_hvm: 17cbfbff-f7fa3223-2d93fbff-00000023-00000001-000007ab-00000000-00000000-00000000-00000000
[root@two-xenserver ~]#

Last thing, like i believe will be helpful is that VM OS is Ubuntu 16.04.4 LTS

@unusual-aspect
Copy link

So in short, i can move vm up in cpu features (stepping)? and cannot be downgraded? I mean when run vm on better cpu, you cannot be moved on worst one?

@borzel
Copy link
Member

borzel commented Jul 17, 2018

That's the allways the case if you use single servers with 'different' CPU's.

If you build a pool from your single Servers, the CPU-features are used from the "worst" CPU; but some CPU's don't have the masking feature so even this isn't possible.

(In my option the live migration from host to host (outside a pool) should only be needed in migration/maintenance scenarios.)

@unusual-aspect
Copy link

Well i have only two servers, and i use them to move on server maintenance, and on balancing resources.

I will try to create pool and migrate vm's between servers in one pool, to have look that will work, as i was never try before.

@borzel
Copy link
Member

borzel commented Jul 25, 2018

to sum up, you can now migrate with XCP-ng Center the same way like with cli-commands?
So the issue is resolved with my changes?

@cometmth
Copy link

Based on my understanding of the issue, I think it's resolved. My test environment has an i3-4130 and an i7-3370. Llive migrating from the newer i3 to the older i7 required using the new 'Force Migrate VM wizard...' The regular migration wizard was showing the "..does not have some of the CPU features..." message in this direction. The live migration was successful. I was able to migrate back from the i7 to the i3 using the standard migrate wizard.

The i3 is in a pool by itself (only member), and the i7 is a standalone server. Both are on xcp-ng 7.4. I tested with xcp-ng center linked above (https://builds.schulzalex.de/xcp-ng/fix-migrate-with-force/)

@borzel borzel modified the milestones: Version 7.5.1, Version 7.6 Jul 26, 2018
@borzel borzel closed this as completed Jul 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed in progress 🏃‍♂️ Someone is working on that
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants