Hi,
Yes, it failed to boot from hard disk, instead booted from cd.
I made a simple modification to the domain xml config file attached
before. I replaced "target='xvda' with target='hda'" and removed
per boot
option. This time, installation was successful and booted from hd. Since
installation was successful i deleted the iso file, then rebooted the
machine, but it failed with the error.
virsh # start vm-2
error: Failed to start domain vm-2
error: POST operation failed: xend_post: error from xen daemon: (xend.err
'Disk image does not exist: /var/lib/libvirt/images/Rhel53.iso')
I hope this is not the proper behaviour. Below is my config file i used
this time.
<domain type='xen'>
<name>vm-2</name>
<memory>1048576</memory>
<vcpu>1</vcpu>
<os>
<type arch='x86_64'>hvm</type>
<loader>/usr/lib/xen/boot/hvmloader</loader>
<boot dev='hd' />
<boot dev='cdrom'/>
</os>
<features>
<acpi/>
<apic/>
<pae/>
</features>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>restart</on_crash>
<devices>
<emulator>/usr/lib/xen/bin/qemu-dm</emulator>
<disk type='file' device='disk'>
<source file='/var/lib/libvirt/images/vm-2.img'/>
<target dev='hda' bus='ide' />
<address type='drive' controller='0' bus='0'
target='0'
unit='0'/>
</disk>
<disk type='file' device='cdrom'>
<source file='/var/lib/libvirt/images/Rhel53.iso'/>
<target dev='hdc' bus='ide' />
<readonly/>
<address type='drive' controller='0' bus='1'
target='0'
unit='0' />
</disk>
<interface type='bridge'>
<source bridge='br0'/>
</interface>
<graphics type='vnc' port='-1' autoport='yes'/>
</devices>
</domain>
Similar config file I used on kvm and esxi, i din't face any issue there.
Can you let me know how libvirt sorts the boot device ?
Thanks,
Vivek
On Thu, Sep 6, 2012 at 2:59 PM, Jiri Denemark <jdenemar(a)redhat.com> wrote:
On Wed, Sep 05, 2012 at 19:22:27 +0530, vivek hari wrote:
> Hi,
>
> I am trying to create a guest machine on xen virtualized environment and
> install rhel on it by booting from cdrom.
> I face a issue in booting device. I gave boot order as hd,cdrom. When
doing
> maiden installation, it will find nothing in hard disk and boots from cd.
> Once installation is completed and when it boots next time it boots from
> hard disk. It is the expected behaviour.
> But it fails to boot from hard disk and again boots from cdrom.
Looks like the real issue is that it fails to boot from hard disk.
> I also tried specifying per boot device option. I specified disk image as
> boot order 1 and cd image as boot order 2. But when i power on for the
> first time, it tries to boot from harddisk and finds nothing there and
says
> " No bootable device. Going to power off in 30 seconds". But expected is,
> it should boot from cd after trying hard disk.
Xen driver does not support per-device boot configuration. Which means we
have
a bug in libvirt because starting such domain should fail immediately
because
of this.
Jirka