Hide Forgot
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:
In step2, cd is ejected manually from host after installation guest and reboot guest with reminder of installation completion.
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.
Actually, selinux is enabled in test environment. # getenforce Enforcing
This issue also can be found even if disable selinux. # getenforce Permissive