Hyper-V driver destroys and recreates the VM on cold migration / resize

Bug #1663238 reported by Claudiu Belu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Triaged
Medium
Unassigned
os-win
Invalid
Medium
Unassigned

Bug Description

Currently, the nova Hyper-V driver destroys the instance on the source node and recreates it on the destination node, losing some of the instance settings.

For this reason, guest PCI device IDs change, causing undesired effects in some cases. For example, this affects guests relying on static network configuration, which will be lost after a cold migration.

This issue can be solved by importing the desired VM on the destination node, and updating the VM resources according to the new flavor.

Claudiu Belu (cbelu)
tags: added: hyper-v
Claudiu Belu (cbelu)
description: updated
Claudiu Belu (cbelu)
Changed in os-win:
importance: Undecided → Medium
Matt Riedemann (mriedem)
Changed in nova:
status: New → Triaged
importance: Undecided → Medium
tags: added: resize
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to os-win (master)

Reviewed: https://review.openstack.org/431223
Committed: https://git.openstack.org/cgit/openstack/os-win/commit/?id=133271f250aeff69792e9fba078a99034a1daf4b
Submitter: Jenkins
Branch: master

commit 133271f250aeff69792e9fba078a99034a1daf4b
Author: Claudiu Belu <email address hidden>
Date: Thu Feb 9 01:07:08 2017 +0200

    vmutils: set all *DataRoot paths to the same value

    In order to maintain consistency with create_vm, update_vm
    should also set the *DataRoot paths to the same given value.

    Furthermore, this will be required for planned VMs, in order to
    prevent having instances running on different compute nodes and
    different storages to have some of the *DataRoot paths pointing to
    the old compute node.

    Partial-Bug: #1663238

    Change-Id: Ic9248f44de6ff097b8080a80fd3212eeef6712f6

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/429901
Committed: https://git.openstack.org/cgit/openstack/os-win/commit/?id=6c5d895ba4984464e1e11a4fcd6e83d82a3d6893
Submitter: Jenkins
Branch: master

commit 6c5d895ba4984464e1e11a4fcd6e83d82a3d6893
Author: Claudiu Belu <email address hidden>
Date: Tue Feb 7 00:08:18 2017 +0200

    removes the VirtualSystemType kwarg when fetching VMs

    A VM can be either "Realized" or "Planned", but not both. Thus,
    using the VirtualSystemType as a filter is not useful.

    Because of this, the "is_planned_vm" argument from vmutils
    methods will no longer be unused, and will be removed once it is
    no longer used.

    This will make vmutils easier to use for Planned VMs, which will
    be used for cold migration in the future. Plus, not all vmutils
    methods have the "is_planned_vm" argument, which would have been
    necessary in order to update the Planned VM (e.g.: get_vm_config_dir method).

    Partial-Bug: #1663238

    Change-Id: Ic153dcfd621a1e6235dd3a75241274ee7d7c868b

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/434168
Committed: https://git.openstack.org/cgit/openstack/os-win/commit/?id=a1bc0e3aec4c11fe72804c1b718928cf6a65ef34
Submitter: Jenkins
Branch: master

commit a1bc0e3aec4c11fe72804c1b718928cf6a65ef34
Author: Claudiu Belu <email address hidden>
Date: Tue Feb 14 23:27:42 2017 +0200

    vmutils: Adds remove_all_pci_devices method

    When resizing an imported VM, nova does not specify which
    PCI devices needs to be attached and which needs to be detached.
    Thus, all the VM's PCI devices needs to be detached, and reattached
    according to the new PCI request.

    Change-Id: Ia7fbb2a9bc8f5d21bf5ec4a865fc7b1368ecf136
    Partial-Bug: #1663238

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/434414
Committed: https://git.openstack.org/cgit/openstack/os-win/commit/?id=ac07fcd78b39b9aa1bda1734c774d2a6dc8e2691
Submitter: Jenkins
Branch: master

commit ac07fcd78b39b9aa1bda1734c774d2a6dc8e2691
Author: Claudiu Belu <email address hidden>
Date: Wed Feb 15 19:01:41 2017 +0200

    vmutils: Allows updating and disabling instance RemoteFX

    When resizing an instance, if it was imported, its resources
    needs to be updated according to the new flavor. If a flavor
    has different RemoteFX requirements, os_win should allow updates
    to the instance's RemoteFX configuration.

    Change-Id: Ib83bbc5c7fd07b55888f58d3407e1dd1a50e9b7e
    Partial-Bug: #1663238

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/434776
Committed: https://git.openstack.org/cgit/openstack/os-win/commit/?id=d440793e0b074084c7a9604996ee0ee3b07a300b
Submitter: Jenkins
Branch: master

commit d440793e0b074084c7a9604996ee0ee3b07a300b
Author: Claudiu Belu <email address hidden>
Date: Thu Feb 16 11:44:30 2017 +0200

    vmutils: Adds vnuma_enabled argument to update_vm

    A VM can have its virtual NUMA spanning turned on and off.

    Partial-Bug: #1663238

    Change-Id: Iec9b501880098e69be652bf6c2a90a9864e52a9c

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to os-win (stable/ocata)

Fix proposed to branch: stable/ocata
Review: https://review.openstack.org/438366

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: stable/ocata
Review: https://review.openstack.org/438368

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: stable/ocata
Review: https://review.openstack.org/438369

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: stable/ocata
Review: https://review.openstack.org/438370

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: stable/ocata
Review: https://review.openstack.org/438371

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to os-win (stable/ocata)

Reviewed: https://review.openstack.org/438366
Committed: https://git.openstack.org/cgit/openstack/os-win/commit/?id=0795dc8818c21903697137e61796c3eae5c2fcb4
Submitter: Jenkins
Branch: stable/ocata

commit 0795dc8818c21903697137e61796c3eae5c2fcb4
Author: Claudiu Belu <email address hidden>
Date: Thu Feb 9 01:07:08 2017 +0200

    vmutils: set all *DataRoot paths to the same value

    In order to maintain consistency with create_vm, update_vm
    should also set the *DataRoot paths to the same given value.

    Furthermore, this will be required for planned VMs, in order to
    prevent having instances running on different compute nodes and
    different storages to have some of the *DataRoot paths pointing to
    the old compute node.

    Partial-Bug: #1663238

    Change-Id: Ic9248f44de6ff097b8080a80fd3212eeef6712f6
    (cherry picked from commit 133271f250aeff69792e9fba078a99034a1daf4b)

tags: added: in-stable-ocata
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/438368
Committed: https://git.openstack.org/cgit/openstack/os-win/commit/?id=21cb88cfc03626d36678714ebd26ea449f1e7fe1
Submitter: Jenkins
Branch: stable/ocata

commit 21cb88cfc03626d36678714ebd26ea449f1e7fe1
Author: Claudiu Belu <email address hidden>
Date: Tue Feb 7 00:08:18 2017 +0200

    removes the VirtualSystemType kwarg when fetching VMs

    A VM can be either "Realized" or "Planned", but not both. Thus,
    using the VirtualSystemType as a filter is not useful.

    Because of this, the "is_planned_vm" argument from vmutils
    methods will no longer be unused, and will be removed once it is
    no longer used.

    This will make vmutils easier to use for Planned VMs, which will
    be used for cold migration in the future. Plus, not all vmutils
    methods have the "is_planned_vm" argument, which would have been
    necessary in order to update the Planned VM (e.g.: get_vm_config_dir method).

    Partial-Bug: #1663238

    Change-Id: Ic153dcfd621a1e6235dd3a75241274ee7d7c868b
    (cherry picked from commit 6c5d895ba4984464e1e11a4fcd6e83d82a3d6893)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/438369
Committed: https://git.openstack.org/cgit/openstack/os-win/commit/?id=e0e92d00995e68a3844ce9e1c71f37f0e7f3b656
Submitter: Jenkins
Branch: stable/ocata

commit e0e92d00995e68a3844ce9e1c71f37f0e7f3b656
Author: Claudiu Belu <email address hidden>
Date: Tue Feb 14 23:27:42 2017 +0200

    vmutils: Adds remove_all_pci_devices method

    When resizing an imported VM, nova does not specify which
    PCI devices needs to be attached and which needs to be detached.
    Thus, all the VM's PCI devices needs to be detached, and reattached
    according to the new PCI request.

    Change-Id: Ia7fbb2a9bc8f5d21bf5ec4a865fc7b1368ecf136
    Partial-Bug: #1663238
    (cherry picked from commit a1bc0e3aec4c11fe72804c1b718928cf6a65ef34)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/438370
Committed: https://git.openstack.org/cgit/openstack/os-win/commit/?id=3c7d3b732dc282e92383834ce534802c9da33965
Submitter: Jenkins
Branch: stable/ocata

commit 3c7d3b732dc282e92383834ce534802c9da33965
Author: Claudiu Belu <email address hidden>
Date: Wed Feb 15 19:01:41 2017 +0200

    vmutils: Allows updating and disabling instance RemoteFX

    When resizing an instance, if it was imported, its resources
    needs to be updated according to the new flavor. If a flavor
    has different RemoteFX requirements, os_win should allow updates
    to the instance's RemoteFX configuration.

    Change-Id: Ib83bbc5c7fd07b55888f58d3407e1dd1a50e9b7e
    Partial-Bug: #1663238
    (cherry picked from commit ac07fcd78b39b9aa1bda1734c774d2a6dc8e2691)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/438371
Committed: https://git.openstack.org/cgit/openstack/os-win/commit/?id=d1803fa4ceb92deb794fff55180ba7f486486c73
Submitter: Jenkins
Branch: stable/ocata

commit d1803fa4ceb92deb794fff55180ba7f486486c73
Author: Claudiu Belu <email address hidden>
Date: Thu Feb 16 11:44:30 2017 +0200

    vmutils: Adds vnuma_enabled argument to update_vm

    A VM can have its virtual NUMA spanning turned on and off.

    Partial-Bug: #1663238

    Change-Id: Iec9b501880098e69be652bf6c2a90a9864e52a9c
    (cherry picked from commit d440793e0b074084c7a9604996ee0ee3b07a300b)

Changed in os-win:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.