Hyper-V fails to spawn snapshots

Bug #1234759 reported by Lucian Petrut
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Lucian Petrut
Havana
Fix Released
Medium
Lucian Petrut

Bug Description

Creating a snapshot of an instance and then trying to boot from it will result the following Hyper-V exception: "HyperVException: WMI job failed with status 10". Here is the trace: http://paste.openstack.org/show/47904/ .

The ideea is that Hyper-V fails to expand the image, as it gets the request to resize it to it's actual size, which leads to an error.

Tags: hyper-v
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/grizzly)

Fix proposed to branch: stable/grizzly
Review: https://review.openstack.org/50396

tags: added: havana-rc-potential
Thierry Carrez (ttx)
tags: added: havana-backport-potential
removed: havana-rc-potential
Revision history for this message
Matt Riedemann (mriedem) wrote :
Changed in nova:
status: New → In Progress
assignee: nobody → Petrut Lucian (petrutlucian94)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/50439
Committed: http://github.com/openstack/nova/commit/efdca8eeaffe6e63d57243147658f4691da3d89e
Submitter: Jenkins
Branch: master

commit efdca8eeaffe6e63d57243147658f4691da3d89e
Author: Petrut Lucian <email address hidden>
Date: Tue Oct 8 21:28:02 2013 +0300

    Fixes Hyper-V snapshot spawning issue

    In Hyper-V, snapshoting an instance and then spawning a new
    one using the resulted snapshot image with the same flavor,
    will result an Hyper-V Exception.

    Hyper-V will get the request to resize the base image to it's
    actual size, leading to an error.

    The reason is that the logic of the resize_vhd method has been
    changed, as it is meant to resize images to the flavor size minus
    the image metadata size, thus it's maximum internal size. For this
    reason, the way to decide whether the root image should be resized
    or not must also be changed.

    So, instead of comparing the root image and base image sizes,
    we should compare their maximum internal sizes.

    Closes-Bug: #1234759

    Change-Id: I83d2df76b726d705cedc52a8309a2be7037d6a79

Changed in nova:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/havana)

Fix proposed to branch: stable/havana
Review: https://review.openstack.org/53404

Revision history for this message
Xiaopei Liu (liuxpei) wrote :

I applyed the fix in https://review.openstack.org/53404 in my environment, this time can spawn snapshots on Hyper-V using dynamic VHDs.

Revision history for this message
Yang Yu (yuyangbj) wrote :

It is curious, I see the bug has been closed by review 50439, why the code review https://review.openstack.org/53404 is still working on this issue?

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (stable/havana)

Reviewed: https://review.openstack.org/53404
Committed: http://github.com/openstack/nova/commit/751b7ecb58cb16964509f1d9a30eacadacfdf253
Submitter: Jenkins
Branch: stable/havana

commit 751b7ecb58cb16964509f1d9a30eacadacfdf253
Author: Petrut Lucian <email address hidden>
Date: Tue Oct 8 21:28:02 2013 +0300

    Fixes Hyper-V snapshot spawning issue

    In Hyper-V, snapshoting an instance and then spawning a new
    one using the resulted snapshot image with the same flavor,
    will result an Hyper-V Exception.

    Hyper-V will get the request to resize the base image to it's
    actual size, leading to an error.

    The reason is that the logic of the resize_vhd method has been
    changed, as it is meant to resize images to the flavor size minus
    the image metadata size, thus it's maximum internal size. For this
    reason, the way to decide whether the root image should be resized
    or not must also be changed.

    So, instead of comparing the root image and base image sizes,
    we should compare their maximum internal sizes.

    Closes-Bug: #1234759

    Change-Id: I83d2df76b726d705cedc52a8309a2be7037d6a79
    (cherry picked from commit efdca8eeaffe6e63d57243147658f4691da3d89e)

tags: added: in-stable-havana
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/grizzly)

Fix proposed to branch: stable/grizzly
Review: https://review.openstack.org/58351

Changed in nova:
milestone: none → icehouse-1
Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
Alan Pevec (apevec)
tags: removed: havana-backport-potential in-stable-havana
Changed in nova:
importance: Undecided → Medium
Thierry Carrez (ttx)
Changed in nova:
milestone: icehouse-1 → 2014.1
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.