VMWare: Operating System Not Found, using block device mapping for volume during VM spawn

Bug #1350224 reported by zhu zhu
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Thang Pham

Bug Description

When using vmware driver to attach a volume during VM spawn as below using --block-device.

The VM will show 'Active' in openstack, but the actuall the VM couldn't be loaded. Showing 'Operating System Not Found'.

nova boot --flavor 7 --image trend-thin --block-device source=volume,id=0fa2137c-ef9f-413c-bf6b-1a8b4fcf2e35,dest=volume,shutdown=preserve myInstanceWithVolume --nic net-id=e7ef5ccb-1718-42b6-a99c-37d5a509c339

Note: the volume is not bootable volume. Just want to deployment the VM from backend image and then attach the volume to the VM.

Tags: vmware
zhu zhu (zhuzhubj)
tags: added: vmware
Revision history for this message
zhu zhu (zhuzhubj) wrote :

From the basic code logic from vmware driver. It looks like it is currently only dealing with volumes with operating systems(root disk). It will always attach the root disk.

if not ebs_root:
.....
else:
            # Attach the root disk to the VM.
            for root_disk in block_device_mapping:
                connection_info = root_disk['connection_info']
                self._volumeops.attach_root_volume(connection_info, instance,
                                                   self._default_root_device,
                                                   data_store_ref)

Tracy Jones (tjones-i)
Changed in nova:
importance: Undecided → Medium
Thang Pham (thang-pham)
Changed in nova:
assignee: nobody → Thang Pham (thang-pham)
Revision history for this message
Thang Pham (thang-pham) wrote :

I am looking into this bug a little more. How did you create the volume? Did you put an OS image on it before attaching it to the instance? If nothing is in the volume, it makes sense that you get "Operating System Not Found".

Sean Dague (sdague)
Changed in nova:
status: New → Incomplete
Sean Dague (sdague)
Changed in nova:
assignee: Thang Pham (thang-pham) → nobody
Revision history for this message
Thang Pham (thang-pham) wrote :

I was able to reproduce this defect and saw one of the comments in the code mentioning this problem - https://github.com/openstack/nova/blob/master/nova/virt/vmwareapi/vmops.py#L463. I will look into spinning up a patch for this.

Changed in nova:
assignee: nobody → Thang Pham (thang-pham)
status: Incomplete → Confirmed
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/128508

Changed in nova:
status: Confirmed → In Progress
Revision history for this message
Radoslav Gerganov (rgerganov) wrote :

This bug is duplicate of bug 1271966 and now we have two different patches which fix the same problem:

https://review.openstack.org/#/c/128508
https://review.openstack.org/#/c/122872

Changed in nova:
assignee: Thang Pham (thang-pham) → Radoslav Gerganov (rgerganov)
Changed in nova:
assignee: Radoslav Gerganov (rgerganov) → Thang Pham (thang-pham)
Changed in nova:
assignee: Thang Pham (thang-pham) → Matthew Booth (mbooth-9)
Changed in nova:
assignee: Matthew Booth (mbooth-9) → Thang Pham (thang-pham)
Changed in nova:
assignee: Thang Pham (thang-pham) → Davanum Srinivas (DIMS) (dims-v)
Changed in nova:
assignee: Davanum Srinivas (DIMS) (dims-v) → Thang Pham (thang-pham)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/128508
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=264425678fd4a37618c2bceae8e62f6bba778223
Submitter: Jenkins
Branch: master

commit 264425678fd4a37618c2bceae8e62f6bba778223
Author: Thang Pham <email address hidden>
Date: Tue Oct 14 23:24:54 2014 -0400

    VMware: Accept image and block device mappings

    The logic in spawn ignores the specified image if there
    are block device mappings in "nova boot". This is incorrect
    and is a bug in the VMware driver, since the block devices
    can be blank volumes. We should be able to accept an image
    and block device mappings in "nova boot".

    DocImpact: VMware supports nova boot with the --block-device
    option. End users can specify the block device's bus to be
    either lsiLogic, busLogic, ide, lsiLogicsas, or paraVirtual.
    For example, nova boot --flavor m1.tiny --block-device
    source=image,dest=volume,size=1,id=<image_id>,bus=lsiLogicsas,
    bootindex=0 test

    Change-Id: Ibf59906b95bda560d2427c88a78b65c098825959
    Closes-Bug: #1350224
    Closes-Bug: #1271966

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.