Bug 616430

Summary: virt-install: --disk device=cdrom install option ignored for --prompt
Product: Red Hat Enterprise Linux 6 Reporter: Wayne Sun <gsun>
Component: python-virtinstAssignee: Cole Robinson <crobinso>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: low Docs Contact:
Priority: low    
Version: 6.0CC: dallan, jialiu, kxiong, llim, mhideo, xen-maint, yoyzhang, zpeng
Target Milestone: rcKeywords: RHELNAK
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Previous versions of virt-install would prompt the user to insert installation media when the --prompt option was used and the install source was set to /dev/cdrom. This fix allows the installation to proceed if both of the preceeding conditions exist.
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-05-19 13:45:45 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Wayne Sun 2010-07-20 12:56:35 UTC
Description of problem:
With 2 --disk option and --prompt option, the --disk /dev/cdrom was ignored and was asked to input the install source. As show below:
 
#virt-install -r 1024 --name rhel55_i386 --disk path=/var/lib/libvirt/images/sss.img,size=8 --disk /dev/cdrom,device=cdrom,cache=writethrough --os-variant=rhel5.4 --prompt --debug
Tue, 20 Jul 2010 20:46:21 DEBUG    Launched with command line:
/usr/sbin/virt-install -r 1024 --name rhel55_i386 --disk path=/var/lib/libvirt/images/sss.img,size=8 --disk /dev/cdrom,device=cdrom,cache=writethrough --os-variant=rhel5.4 --prompt --debug
Tue, 20 Jul 2010 20:46:21 DEBUG    Requesting libvirt URI default
Tue, 20 Jul 2010 20:46:21 DEBUG    Received libvirt URI qemu:///system
Tue, 20 Jul 2010 20:46:21 DEBUG    Requesting virt method 'hvm', hv type 'default'.
Tue, 20 Jul 2010 20:46:21 DEBUG    Received virt method 'hvm'
Tue, 20 Jul 2010 20:46:21 DEBUG    Hypervisor name is 'kvm'
Tue, 20 Jul 2010 20:46:21 DEBUG    parse_disk: returning {'format': None, 'bus': None, 'readOnly': False, 'volInstall': None, 'path': '/var/lib/libvirt/images/sss.img', 'device': 'disk', 'volName': None, 'conn': <libvirt.virConnect instance at 0x15ea830>, 'size': 8.0, 'driverCache': None, 'shareable': False, 'sparse': True}
Tue, 20 Jul 2010 20:46:21 DEBUG    Path '/var/lib/libvirt/images' is target for pool 'default'. Creating volume 'sss.img'.
Tue, 20 Jul 2010 20:46:21 DEBUG    parse_disk: returning {'format': None, 'bus': None, 'readOnly': False, 'volInstall': None, 'path': '/dev/cdrom', 'device': 'cdrom', 'volName': None, 'conn': <libvirt.virConnect instance at 0x15ea830>, 'size': None, 'driverCache': 'writethrough', 'shareable': False, 'sparse': True}
Tue, 20 Jul 2010 20:46:21 DEBUG    DISPLAY is set: graphics defaulting to VNC.
Tue, 20 Jul 2010 20:46:22 DEBUG    Setting os type to 'linux' for variant 'rhel5.4'
What is the install CD-ROM/ISO or URL? 


With out the --prompt option, the install is ok. As show below:


# virt-install -r 1024 --name rhel55_i386 --disk path=/var/lib/libvirt/images/sss.img,size=8 --disk /dev/cdrom,device=cdrom,cache=writethrough --os-variant=rhel5.4 --debugTue, 20 Jul 2010 18:34:42 DEBUG    Launched with command line:
/usr/sbin/virt-install -r 1024 --name rhel55_i386 --disk path=/var/lib/libvirt/images/sss.img,size=8 --disk /dev/cdrom,device=cdrom,cache=writethrough --os-variant=rhel5.4 --debug
Tue, 20 Jul 2010 18:34:42 DEBUG    Requesting libvirt URI default
Tue, 20 Jul 2010 18:34:43 DEBUG    Received libvirt URI qemu:///system
Tue, 20 Jul 2010 18:34:43 DEBUG    Requesting virt method 'default', hv type 'default'.
Tue, 20 Jul 2010 18:34:43 DEBUG    Received virt method 'hvm'
Tue, 20 Jul 2010 18:34:43 DEBUG    Hypervisor name is 'kvm'
Tue, 20 Jul 2010 18:34:43 DEBUG    parse_disk: returning {'format': None, 'bus': None, 'readOnly': False, 'volInstall': None, 'path': '/var/lib/libvirt/images/sss.img', 'device': 'disk', 'volName': None, 'conn': <libvirt.virConnect instance at 0x27b6830>, 'size': 8.0, 'driverCache': None, 'shareable': False, 'sparse': True}
Tue, 20 Jul 2010 18:34:43 DEBUG    Path '/var/lib/libvirt/images' is target for pool 'default'. Creating volume 'sss.img'.
Tue, 20 Jul 2010 18:34:43 DEBUG    parse_disk: returning {'format': None, 'bus': None, 'readOnly': False, 'volInstall': None, 'path': '/dev/cdrom', 'device': 'cdrom', 'volName': None, 'conn': <libvirt.virConnect instance at 0x27b6830>, 'size': None, 'driverCache': 'writethrough', 'shareable': False, 'sparse': True}
Tue, 20 Jul 2010 18:34:43 DEBUG    DISPLAY is set: graphics defaulting to VNC.
Tue, 20 Jul 2010 18:34:43 DEBUG    Setting os type to 'linux' for variant 'rhel5.4'


Starting install...
Tue, 20 Jul 2010 18:34:43 DEBUG    Creating storage volume 'sss.img' with xml:
<volume>
  <name>sss.img</name>
  <capacity>8589934592</capacity>
  <allocation>0</allocation>
  <target>
    <format type='raw'/>
  </target>
</volume>

Allocating 'sss.img'                                                       | 8.0 GB     00:00     
Tue, 20 Jul 2010 18:34:43 DEBUG    Storage volume 'sss.img' install complete.
Tue, 20 Jul 2010 18:34:43 DEBUG    Can't fix selinux context in this case.
Tue, 20 Jul 2010 18:34:43 DEBUG    Generated install XML: 
<domain type='kvm'>
  <name>rhel55_i386</name>
  <currentMemory>1048576</currentMemory>
  <memory>1048576</memory>
  <uuid>18fdf711-a5fa-8b9c-c8ca-f97475086038</uuid>
  <os>
    <type arch='x86_64'>hvm</type>
    <boot dev='cdrom'/>
  </os>
  <features>
    <acpi/><apic/><pae/>
  </features>
  <clock offset="utc"/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>destroy</on_reboot>
  <on_crash>destroy</on_crash>
  <vcpu>1</vcpu>
  <devices>
    <emulator>/usr/libexec/qemu-kvm</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='none'/>
      <source file='/var/lib/libvirt/images/sss.img'/>
      <target dev='vda' bus='virtio'/>
    </disk>
    <disk type='block' device='cdrom'>
      <driver name='qemu' cache='writethrough'/>
      <source dev='/dev/cdrom'/>
      <target dev='hdc' bus='ide'/>
      <readonly/>
    </disk>
    <interface type='network'>
      <source network='default'/>
      <mac address='52:54:00:c2:72:1e'/>
      <model type='virtio'/>
    </interface>
    <input type='mouse' bus='ps2'/>
    <graphics type='vnc' port='-1' keymap='en-us'/>
    <console type='pty'/>
    <video>
      <model type='cirrus'/>
    </video>
  </devices>
</domain>


Version-Release number of selected component (if applicable):
python-virtinst-0.500.3-5.el6.noarch

How reproducible:
always

Steps to Reproduce:
1.as description
2.
3.
  
Actual results:
--disk /dev/cdrom not be regonized as install source

Expected results:
--disk /dev/cdrom will be regonized as install source

Additional info:

Comment 2 RHEL Program Management 2010-07-20 13:18:36 UTC
This issue has been proposed when we are only considering blocker
issues in the current Red Hat Enterprise Linux release.

** If you would still like this issue considered for the current
release, ask your support representative to file as a blocker on
your behalf. Otherwise ask that it be considered for the next
Red Hat Enterprise Linux release. **

Comment 3 Cole Robinson 2010-08-06 14:38:37 UTC
Not urgent, since it can be worked around with --cdrom /dev/cdrom. Deferring to 6.1

Comment 5 Cole Robinson 2010-12-08 00:29:48 UTC
Fixed upstream:

http://hg.fedorahosted.org/hg/python-virtinst/rev/01333686a8d7

Comment 6 Cole Robinson 2011-01-14 22:10:02 UTC
Fix built in python-virtinst-0.500.5-1.el6

Comment 8 koka xiong 2011-01-21 02:33:30 UTC
Verified with python-virtinst-0.500.5-1.el6 and libvirt-0.8.7-1.el6.x86_64
1.Run virt-install -r 1024 --name rhel55 --disk path=/var/lib/libvirt/images/ss.img,size=8 --disk /dev/cdrom,device=cdrom,cache=writethrough --prompt --debug
The guest can be installed with prompt option

2.Run virt-install -r 1024 --name rhel54  --disk path=/var/lib/libvirt/images/ss1.img,size=8 --disk /dev/cdrom,device=cdrom,cache=writethrough --debug
The guest can be installed without prompt option.

Verification is passed.

Comment 9 zhe peng 2011-04-18 06:16:15 UTC
verified this bug with:
Linux localhost.localdomain 2.6.32-130.el6.x86_64 #1 SMP Tue Apr 5 19:58:31 EDT
2011 x86_64 x86_64 x86_64 GNU/Linux

python-virtinst-0.500.5-3.el6.noarch
libvirt-0.8.7-17.el6.x86_64

Comment 11 Michael Hideo 2011-05-15 22:14:05 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
* Previous versions of virt-install would prompt the user to insert installation media when the --prompt option was used and the install source was set to /dev/cdrom. This fix allows the installation to proceed if both of the preceeding conditions exist. (BZ#616430)

Comment 12 Michael Hideo 2011-05-16 21:43:28 UTC
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1 +1 @@
-* Previous versions of virt-install would prompt the user to insert installation media when the --prompt option was used and the install source was set to /dev/cdrom. This fix allows the installation to proceed if both of the preceeding conditions exist. (BZ#616430)+Previous versions of virt-install would prompt the user to insert installation media when the --prompt option was used and the install source was set to /dev/cdrom. This fix allows the installation to proceed if both of the preceeding conditions exist.

Comment 13 errata-xmlrpc 2011-05-19 13:45:45 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0636.html