Bug 1052168 - Do not allow migration when 'Use Host CPU' flag checked
Summary: Do not allow migration when 'Use Host CPU' flag checked
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine
Version: 3.3.0
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: 3.5.0
Assignee: Roy Golan
QA Contact: Artyom
Whiteboard: sla
Depends On:
Blocks: rhev35rcblocker rhev35gablocker
TreeView+ depends on / blocked
Reported: 2014-01-13 12:40 UTC by Artyom
Modified: 2016-02-10 20:20 UTC (History)
11 users (show)

Fixed In Version: org.ovirt.engine-root-3.5.0-25
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2015-02-17 17:17:14 UTC
oVirt Team: SLA
Target Upstream Version:

Attachments (Terms of Use)
src_vdsm_log (359.45 KB, text/x-log)
2014-01-13 12:40 UTC, Artyom
no flags Details

System ID Private Priority Status Summary Last Updated
oVirt gerrit 34827 0 master MERGED webadmin: Don't allow migration when using host cpu 2020-08-12 16:56:33 UTC
oVirt gerrit 34828 0 master MERGED core: VM should be PINNED_TO_HOST when using host cpu flags 2020-08-12 16:56:32 UTC
oVirt gerrit 34883 0 ovirt-engine-3.5 MERGED core: VM should be PINNED+TO_HOST when using host cpu flags 2020-08-12 16:56:33 UTC
oVirt gerrit 34884 0 ovirt-engine-3.5 MERGED webadmin: Don't allow migration when using host cpu 2020-08-12 16:56:32 UTC

Description Artyom 2014-01-13 12:40:58 UTC
Created attachment 849313 [details]

Description of problem:
Have two host with different CPU flags, migration vm with enabled 'Use Host CPU'(it also mean that you need to change migration options to 'Allow manual migration only') from host with high CPU to low CPU failed with libvirt error:
libvirtError: unsupported configuration: guest and host CPU are not compatible: Host CPU does not provide required features: est.

Version-Release number of selected component (if applicable):

How reproducible:
Always(may give another flag in error)

Steps to Reproduce:
1. Add two hosts with different CPU's, hosts with higher CPU host_high, host with lower host_low
2. Set vm "Allow manual migration only" and check "Use Host CPU"
3. Run vm on host_high and migrate it without specify destination host

Actual results:
Migration Failed and in vdsm log appear libvirt error.

Expected results:
Or give possibility to choose 'Use Host Cpu' flag only when migration option is 'Do not allow migration' or failed migration and give appropriate message in engine events.

Additional info:
Bug opened first as cluster policies bug https://bugzilla.redhat.com/show_bug.cgi?id=1051370#c0, but after discussion with Doron, I decide to close bug and open new bug connect to migration.

Comment 1 Itamar Heim 2014-01-13 17:01:27 UTC
andrew - i have a vague recollection you specifically asked to not block this?

Comment 2 Doron Fediuck 2014-01-14 08:02:14 UTC
According to libvirt docs [1]-


... Though the downside of this mode is that the guest environment cannot be
reproduced on different hardware. Thus, if you hit any bugs, you are on your own.


So my last recollection of this was we allow the vm to start anywhere, but
then it will not migrate.


And [2] that says:
Label should be "Pass through host CPU". When this is set the VM should be marked as non-migratable

[1] http://libvirt.org/formatdomain.html#elementsCPU
[2] http://www.ovirt.org/Features/Cpu-host_Support#Detailed_Description

Comment 4 Gilad Chaplik 2014-02-20 13:39:46 UTC

Should new/edit/other VM commands be blocked in case the VM is not pinned and pass through is on?


Comment 5 Doron Fediuck 2014-02-25 16:32:05 UTC
(In reply to Gilad Chaplik from comment #4)
> @Doron
> Should new/edit/other VM commands be blocked in case the VM is not pinned
> and pass through is on?
> Thanks.

What do you mean by 'new'?
As for the others, shouldn't be an issue.

The important thing is locking the migration options, once pass through
is being used.

Comment 6 Artyom 2014-12-14 07:57:46 UTC
Check on rhevm-3.5.0-0.23.beta.el6ev.noarch
Still have libvirt error and migration failed:
Thread-334139::ERROR::2014-12-14 09:53:20,262::migration::260::vm.Vm::(run) vmId=`ffb6cc41-be24-4479-b7a9-3d0c714ea8fc`::Failed to migrate
        Traceback (most recent call last):
          File "/usr/share/vdsm/virt/migration.py", line 246, in run
          File "/usr/share/vdsm/virt/migration.py", line 325, in _startUnderlyingMigration
            None, maxBandwidth)
          File "/usr/share/vdsm/virt/vm.py", line 689, in f
            ret = attr(*args, **kwargs)
          File "/usr/lib/python2.6/site-packages/vdsm/libvirtconnection.py", line 111, in wrapper
            ret = f(*args, **kwargs)
          File "/usr/lib64/python2.6/site-packages/libvirt.py", line 1210, in migrateToURI2
            if ret == -1: raise libvirtError ('virDomainMigrateToURI2() failed', dom=self)
        libvirtError: Requested operation is not valid: domain has CPU feature: invtsc

Comment 7 Doron Fediuck 2014-12-14 10:35:05 UTC
Missed patches added to the 3.5.0 branch.

Comment 8 Artyom 2014-12-15 14:25:05 UTC
Verified on rhevm-3.5.0-0.25.el6ev.noarch

Comment 9 Eyal Edri 2015-02-17 17:17:14 UTC
rhev 3.5.0 was released. closing.

Note You need to log in before you can comment on or make changes to this bug.