Bug 673427 - Host do not notice guest after install completion guest and eject cd from host directly manually.
Summary: Host do not notice guest after install completion guest and eject cd from hos...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.1
Hardware: Unspecified
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Osier Yang
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-01-28 07:48 UTC by Cui Chun
Modified: 2011-04-15 07:18 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-03-09 14:40:49 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Cui Chun 2011-01-28 07:48:31 UTC
Description of problem:
The domain can not be started from hard disk smoothly after finished installation using cd and ejected cd from cdrom. It still can not be started even if hard disk is set as first option and cdrom is second option in bootmenu. 

Version-Release number of selected component (if applicable):

libvirt-0.8.7-4.el6
qemu-kvm-0.12.1.2-2.132.el6
kernel-2.6.32-94.el6

How reproducible:
Always

Steps to Reproduce:
1.Install a domain via cd-rom

# qemu-img create /var/lib/libvirt/images/cdrom_test.img 8G

# virsh define cdrom_test.xml

<domain type='kvm'>
  <name>cdrom_test</name>
  <memory>1048576</memory>
  <currentMemory>1048576</currentMemory>
  <vcpu>1</vcpu>
  <os>
    <type arch='x86_64' machine='rhel6.0.0'>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>
  <devices>
    <emulator>/usr/libexec/qemu-kvm</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw'/>
      <source file='/var/lib/libvirt/images/cdrom_test.img'/>
      <target dev='hda' bus='ide'/>
    </disk>
    <disk type='block' device='cdrom'>
      <driver name='qemu'/>
      <source dev='/dev/sr0'/>
      <target dev='hdc' bus='ide'/>
      <readonly/>
    </disk>
    <interface type='network'>
      <source network='default'/>
      <model type='virtio'/>
    </interface>
    <serial type='pty'>
      <source path='/dev/pts/2'/>
      <target port='0'/>
      <alias name='serial0'/>
    </serial>
    <console type='pty' tty='/dev/pts/2'>
      <source path='/dev/pts/2'/>
      <target port='0'/>
      <alias name='serial0'/>
    </console>
    <input type='mouse' bus='ps2'/>
    <graphics type='vnc' port='5902' autoport='yes' keymap='en-us'/>
    <sound model='ac97'>
      <alias name='sound0'/>
    </sound>
    <video>
      <model type='cirrus' vram='9216' heads='1'/>
      <alias name='video0'/>
    </video>
  </devices>
</domain>


2. After installation, eject the cd and change the bootmenu

----------------------
.....
<os>
    <type arch='x86_64' machine='rhel6.0.0'>hvm</type>
    <boot dev='hd'/>
    <boot dev='cdrom'/>
    <bootmenu enable='yes'/>
</os>
.....
 <disk type='file' device='disk'>
      <driver name='qemu' type='raw'/>
      <source file='/var/lib/libvirt/images/cdrom_test.img'/>
      <target dev='hda' bus='ide'/>
      <address type='drive' controller='0' bus='0' unit='0'/>
    </disk>
    <disk type='block' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source dev='/dev/sr0'/>
      <target dev='hdc' bus='ide'/>
      <readonly/>
      <address type='drive' controller='0' bus='1' unit='0'/>
    </disk>


3. Try to boot the domain. Failed. The error message is:

"Error starting domain:unable to open disk path /dev/sr0:No medium found"

4. Check the cdrom stauts from virt-manager. It is connected. Domain can be started from hard disk if disconnect the cdrom connection.

  
Actual results:

Refer to step3 and step 4.

Expected results:

The domain can be started from hard disk smoothly if no cd in cdrom.

Additional info:

Comment 2 Cui Chun 2011-02-14 11:35:33 UTC
In step2, cd is ejected manually from host after installation guest and reboot guest with reminder of installation completion.

Comment 3 Cui Chun 2011-02-14 11:41:18 UTC
In step3, "boot device order" is invalid in that situation even if "hd" has been set as first boot order. Guest always tries to boot from cd.

Comment 5 Cui Chun 2011-03-09 07:49:34 UTC
Actually, selinux is enabled in test environment.

# getenforce
Enforcing

Comment 6 Cui Chun 2011-03-09 07:54:37 UTC
This issue also can be found even if disable selinux.

# getenforce
Permissive


Note You need to log in before you can comment on or make changes to this bug.