Comment 0 for bug 1454901

Revision history for this message
junxu (xujun-1) wrote : OS install failed in the VM creating using ISO image

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 example:
1. For a vm with local storage, it can't detect disk when install OS. The partial libvirt.xml is as follow:

  <devices>
    <disk type="file" device="cdrom">
      <driver name="qemu" type="qcow2" cache="none"/>
      <source file="/opt/stack/data/nova/instances/9b3c730a-8391-4b11-8e07-dcd0981fbc56/disk"/>
      <target bus="ide" dev="hda"/>
    </disk>
    <disk type="file" device="cdrom">
      <driver name="qemu" type="raw" cache="none"/>
      <source file="/opt/stack/data/nova/instances/9b3c730a-8391-4b11-8e07-dcd0981fbc56/disk.config"/>
      <target bus="ide" dev="hdd"/>
    </disk>

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

  <devices>
    <disk type="file" device="disk">
      <driver name="qemu" type="qcow2" cache="none"/>
      <source file="/var/lib/nova/instances/95a38caf-9f12-4516-8166-6c5b572b4734/disk"/>
      <target bus="virtio" dev="vda"/>
    </disk>
    <disk type="file" device="disk">
      <driver name="qemu" type="raw" cache="none"/>
      <source file="/var/lib/nova/instances/95a38caf-9f12-4516-8166-6c5b572b4734/disk.config"/>
      <target bus="virtio" dev="vdz"/>
    </disk>