VMware: can't boot from sparse image copied to volume

Bug #1255317 reported by Ryan Hsu
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
High
Thang Pham
Icehouse
Fix Released
Undecided
Unassigned

Bug Description

Using VC Driver, we are unable to boot from a sparse image copied to a volume. Scenario is as follows:

1. Create an image using the cirros vmdk image (linked below) with vmware_disktype="sparse"
2. Copy the image to a volume
3. Boot from the volume

Expected: Able to boot into OS and see the login screen
Actual: "Operating system is not found"

[1] http://partnerweb.vmware.com/programs/vmdkimage/cirros-0.3.0-i386-disk.vmdk

Gary Kotton (garyk)
tags: added: vmware
Changed in nova:
importance: Undecided → High
Tracy Jones (tjones-i)
Changed in nova:
status: New → Incomplete
status: Incomplete → Confirmed
tags: added: low-hanging-fruit
Revision history for this message
Shawn Hartsock (hartsock) wrote :

Not low hanging fruit, but definitely simpler than some of the other bugs. This one is probably an order of operations error dealing with the order in which the disk is copied and the volume is mounted. This won't be complicated but it will take someone spending several hours with a practical testing environment to figure out what we should be writing a unit test to catch.

Ryan Hsu (rhsu)
description: updated
Revision history for this message
Eric Brown (ericwb) wrote :

I was unable to reproduce. I did the following:
1) glance image-create --name cirros-sparse --is-public=True --container-format=bare --disk-format=vmdk --property vmware_disktype="sparse" < cirros-0.3.0-i386-disk.vmdk
2) Created a volume from this image using Horizon
3) Booted from this new volumen using Horizon

We believe this was fixed with some unknown patch.

Changed in nova:
status: Confirmed → Fix Committed
Revision history for this message
Sreeram Yerrapragada (syerrapragada) wrote :

I was able to reproduce the bug using image: https://www.dropbox.com/s/793n37blb4ra3t6/disk-vmdk.vmdk

Changed in nova:
status: Fix Committed → New
status: New → Confirmed
Revision history for this message
Eric Brown (ericwb) wrote :

Here's the command used to reproduce using image from Sreeram:
glance image-create --name mono-sparse-ide --is-public=True --container-format=bare --disk-format=vmdk --property vmware_disktype="sparse" --property vmware_adaptertype="ide" < disk-vmdk.vmdk

Eric Brown (ericwb)
Changed in nova:
assignee: nobody → Eric Brown (ericwb)
Eric Brown (ericwb)
Changed in nova:
status: Confirmed → In Progress
Tracy Jones (tjones-i)
tags: removed: low-hanging-fruit
Revision history for this message
Eric Brown (ericwb) wrote :

I opened a cinder bug, https://bugs.launchpad.net/cinder/+bug/1284284 which I believe is causing part of the problem.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/79087

Revision history for this message
Tracy Jones (tjones-i) wrote :

Eric - the cinder bugs have been merged. Is this still an issue?

Revision history for this message
Tracy Jones (tjones-i) wrote :

moving this back to triaged as the patch has been abandoned. please set to in progress when you start working on it again.

Changed in nova:
status: In Progress → Triaged
Changed in nova:
assignee: Eric Brown (ericwb) → nobody
Thang Pham (thang-pham)
Changed in nova:
assignee: nobody → Thang Pham (thang-pham)
Revision history for this message
Thang Pham (thang-pham) wrote :

This is related to bug #1226543. It is fixed by https://review.openstack.org/#/c/122251/.

Changed in nova:
status: Triaged → In Progress
Revision history for this message
Matthew Booth (mbooth-9) wrote :

This bug doesn't appear to be related to bug #1226543 or the above change. It was fixed by https://review.openstack.org/#/c/124010/.

I have confirmed that I can reproduce the bug using the steps described here in the commit immediately prior to the above, but not when including the above change.

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

Fix proposed to branch: stable/icehouse
Review: https://review.openstack.org/152556

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

Reviewed: https://review.openstack.org/152556
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=4b46a86f8a2af096e399df8518f8269f825684e0
Submitter: Jenkins
Branch: stable/icehouse

commit 4b46a86f8a2af096e399df8518f8269f825684e0
Author: Matthew Booth <email address hidden>
Date: Thu Sep 25 11:33:49 2014 +0100

    Fix image metadata returned for volumes

    When creating a volume from a glance image, cinder stores the original
    image metadata in volume_glance_metadata. This is a key/value store,
    and all the values are strings.

    When Nova boots an instance from a volume, it passes the image
    metadata returned by cinder, which is all strings. If a driver
    expects these values to be ints, as they are when booting from an
    image, it will get a type error.

    This change also pulls size from the volume directly rather than
    taking the value from the stored image metadata. This is because the
    volume will have been created in 1Gb increments, and is unlikely to be
    the same size as the original image. It may also have been
    subsequently extended.

    (cherry picked from commit 688be19e8a2170276451926401af8257c4faece5)

    Conflicts:
     nova/compute/api.py
     nova/tests/compute/test_compute.py

    Change-Id: I7928f6be1ca99f1502941b9df2b443f2ca63a37b
    Closes-Bug: #1367540
    Closes-Bug: #1255317

tags: added: in-stable-icehouse
Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → kilo-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: kilo-3 → 2015.1.0
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.