boot from iso in libvirt doesn't generate correct config

Bug #1023250 reported by Yun Mao
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Yun Mao

Bug Description

This is related to #914484 but not the same.

How to reproduce: in libvirt driver with kvm, boot an instance with an ephemeral disk. Then check the libvirt.xml in the instances folder. The ephemeral disk is also generated as "cdrom".

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/9645

Changed in nova:
assignee: nobody → Yun Mao (yunmao)
status: New → In Progress
Revision history for this message
Yun Mao (yunmao) wrote :

An example of the wrong partial config:
  <devices>
    <disk type="file" device="cdrom">
      <driver type="qcow2" cache="none"/>
      <source file="/opt/stack/nova/instances/instance-0000003a/disk"/>
      <target bus="ide" dev="vda"/>
    </disk>
    <disk type="file" device="cdrom">
      <driver type="qcow2" cache="none"/>
      <source file="/opt/stack/nova/instances/instance-0000003a/disk.local"/>
      <target bus="virtio" dev="vdb"/>
    </disk>

The right config:
  <devices>
    <disk type="file" device="cdrom">
      <driver type="qcow2" cache="none"/>
      <source file="/opt/stack/nova/instances/instance-0000003a/disk"/>
      <target bus="ide" dev="vda"/>
    </disk>
    <disk type="file" device="disk">
      <driver type="qcow2" cache="none"/>
      <source file="/opt/stack/nova/instances/instance-0000003a/disk.local"/>
      <target bus="virtio" dev="vdb"/>
    </disk>

Revision history for this message
Tushar Patil (tpatil) wrote :

In my environment, I only see one device of disk type in libvirt.xml of the instance

Partial libvirt.xml:
<devices>
    <disk type="file" device="cdrom">
        <driver type="qcow2" cache="none"/>
        <source file="/opt/stack/nova/instances/instance-00000012/disk"/>
        <target bus="ide" dev="vda"/>
    </disk>
</devices>

Listing of instance directory:-
root@ubuntu-dev-001:/opt/stack/nova/instances/instance-00000012# ls -lrt
total 140
-rw-rw-r-- 1 tpatil libvirtd 1283 2012-07-11 11:25 libvirt.xml
-rw-r--r-- 1 libvirt-qemu kvm 197120 2012-07-11 11:25 disk
-rw-rw---- 1 tpatil kvm 0 2012-07-11 11:25 console.log

The instance is running in active state, but I cannot access the instance either by ssh or ping (security group is configured properly).

root@ubuntu-dev-001:# virsh list
 Id Name State
----------------------------------
 15 instance-00000012 running

Just wondering, why I'm not able to see 2 devices of disk type like yours.

Revision history for this message
Yun Mao (yunmao) wrote :

Probably because you used an instance type with no ephemeral disk? just guessing..

Revision history for this message
Tushar Patil (tpatil) wrote :

Yes, you are correct. When I used m1.small instance type to launch a new server, I could see 2 entries. Thanks.

Revision history for this message
Mark McLoughlin (markmc) wrote :

Pretty sure this is fixed by https://review.openstack.org/#/c/10050/

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → folsom-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: folsom-3 → 2012.2
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.