OS install failed in the VM created using an ISO image

Bug #1454901 reported by junxu
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Confirmed
Low
Unassigned

Bug Description

When we install OS in a VM created by an ISO image, it was failed.

Steps to reproduce:
1. create an ISO image, glance image-create --name ubuntu.iso --disk-format iso --container-format bare --file ubuntu-14.04.2-server-amd64.iso --progress
2. create a vm using this ISO image
3. install OS in this vm.

We think the nova generates wrong libvirt config, below are two examples:
1. For a vm with local storage, it can't detect disk when install OS. The partial libvirt.xml is as follow:

    <disk type='file' device='cdrom'>
      <driver name='qemu' type='qcow2' cache='none'/>
      <source file='/var/lib/nova/instances/6ee52fd1-ad97-41b0-8980-3d4dab3b11ba/disk'/>
      <backingStore type='file' index='1'>
        <format type='raw'/>
        <source file='/var/lib/nova/instances/_base/1d20447e6c2e83c4e6a98167b834fda2c5cb667d'/>
        <backingStore/>
      </backingStore>
      <target dev='hda' bus='ide'/>
      <readonly/>
      <alias name='ide0-0-0'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>

2. For a volume vm, it can't detect CD-ROM when install OS. And the partial libvirt.xml is as follow:

    <disk type='network' device='disk'>
      <driver name='qemu' type='raw' cache='none'/>
      <auth username='compute'>
        <secret type='ceph' uuid='a5d0dd94-57c4-ae55-ffe0-7e3732a24455'/>
      </auth>
      <source protocol='rbd' name='volumes/volume-89608745-82c0-4717-bfe5-064c1b5785cd'>
        <host name='10.133.1.3' port='6789'/>
        <host name='10.133.1.9' port='6789'/>
        <host name='10.133.1.10' port='6789'/>
      </source>
      <backingStore/>
      <target dev='vda' bus='virtio'/>
      <serial>89608745-82c0-4717-bfe5-064c1b5785cd</serial>
      <alias name='virtio-disk0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </disk>

Tags: libvirt
junxu (xujun-1)
description: updated
description: updated
summary: - OS install failed in the VM creating using ISO image
+ OS install failed in the VM created using ISO image
summary: - OS install failed in the VM created using ISO image
+ OS install failed in the VM created using an ISO image
Changed in nova:
assignee: nobody → Noel Nelson Dsouza (noelnelson)
Revision history for this message
Noel Nelson Dsouza (noelnelson) wrote :

Junxu ,

I saw your bug. Before proceeding with this bug i need clarification regarding step 3 of reproducing.
3. install OS in this vm.

My Environment :
i will try to reproduce your bug in Juno devstatck version
Provide your environment also.

Please provide more information(elaborate) on this step, to get into reproduction of this bug. Based on your feedback i can move further.

Regards
Noel

Revision history for this message
Luo Gangyi (luogangyi) wrote :

Hi, Noel,

I have tested it from Icehouse to Kilo, none of them could work.

Like the libvirt.xml whick junxu posted, the <device> part is apparently wrong!

If you use '# qemo-img info disk' to inquery the disk, you will find the 'disk' is qcow2 format and backing on the ISO file! this is not reasonable too!

Changed in nova:
status: New → Confirmed
junxu (xujun-1)
description: updated
junxu (xujun-1)
Changed in nova:
assignee: Noel Nelson Dsouza (noelnelson) → junxu (xujun-1)
Sean Dague (sdague)
Changed in nova:
assignee: junxu (xujun-1) → nobody
tags: added: libvirt
Changed in nova:
importance: Undecided → Low
Changed in nova:
assignee: nobody → Dave Johnston (dave-johnston)
Sean Dague (sdague)
Changed in nova:
assignee: Dave Johnston (dave-johnston) → nobody
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.