boot device order has no effect for virtio-scsi devices
My host is Gentoo x64, kernel 3.5.2, qemu-kvm 1.1.1-r1, libvirt 0.9.13, seabios 1.7.0
i try to set the boot order with scsi cd-rom first, then scsi harddisk
but the virtual machine will always boot with first scsi device only (unit='0', the scsi harddisk)
is it a known problem?
my libvirt config:
<domain type='kvm'>
<name>Linux</name>
<uuid>xxx</uuid>
<memory unit='KiB'>1048576</memory> <currentMemory unit='KiB'>1048576</currentMemory> <vcpu placement='static'>2</vcpu>
<os>
<type arch='x86_64' machine='pc-1.1'>hvm</type>
<boot dev='cdrom'/>
<boot dev='hd'/>
<bootmenu enable='no'/>
</os>
<features>
<acpi/>
<apic/>
<hap/>
</features>
<cpu mode='host-model'>
<model fallback='allow'/>
</cpu>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>restart</on_crash>
<devices>
<emulator>/usr/bin/qemu-kvm</emulator>
<disk type='file' device='disk'>
<driver name='qemu' type='raw' cache='unsafe' io='native'/>
<source file='/Linux.raw_image'/>
<target dev='sda' bus='scsi'/>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk>
<disk type='file' device='cdrom'>
<driver name='qemu' type='raw' cache='unsafe' io='native'/>
<source file='/xubuntu-12.04-desktop-amd64.iso'/>
<target dev='sdb' bus='scsi'/>
<readonly/>
<address type='drive' controller='0' bus='0' target='0' unit='1'/>
</disk>
<controller type='usb' index='0'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
</controller>
<controller type='virtio-serial' index='0'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
</controller>
<controller type='scsi' index='0' model='virtio-scsi'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
</controller>
<interface type='direct'>
<mac address='xx'/>
<source dev='eth0' mode='bridge'/>
<model type='virtio'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
</interface>
<serial type='pty'>
<target port='0'/>
</serial>
<console type='pty'>
<target type='serial' port='0'/>
</console>
<channel type='spicevmc'>
<target type='virtio' name='com.redhat.spice.0'/>
<address type='virtio-serial' controller='0' bus='0' port='1'/>
</channel>
<input type='mouse' bus='ps2'/>
<graphics type='spice' autoport='yes'>
<image compression='off'/>
<jpeg compression='never'/>
<zlib compression='never'/>
<playback compression='off'/>
<streaming mode='off'/>
</graphics>
<sound model='ich6'>
<codec type='micro'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</sound>
<video>
<model type='qxl' vram='65536' heads='1'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
</video>
<redirdev bus='usb' type='spicevmc'>
</redirdev>
<memballoon model='virtio'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
</memballoon> </devices>
</domain>
Quoted 95 lines · ching
My host is Gentoo x64, kernel 3.5.2, qemu-kvm 1.1.1-r1, libvirt 0.9.13, seabios 1.7.0
i try to set the boot order with scsi cd-rom first, then scsi harddisk
but the virtual machine will always boot with first scsi device only (unit='0', the scsi harddisk)
is it a known problem?
my libvirt config:
<domain type='kvm'>
<name>Linux</name>
<uuid>xxx</uuid>
<memory unit='KiB'>1048576</memory> <currentMemory unit='KiB'>1048576</currentMemory> <vcpu placement='static'>2</vcpu>
<os><type arch='x86_64' machine='pc-1.1'>hvm</type> <boot dev='cdrom'/> <boot dev='hd'/> <bootmenu enable='no'/> </os> <features> <acpi/> <apic/> <hap/> </features> <cpu mode='host-model'> <model fallback='allow'/> </cpu> <clock offset='utc'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> <devices> <emulator>/usr/bin/qemu-kvm</emulator> <disk type='file' device='disk'> <driver name='qemu' type='raw' cache='unsafe' io='native'/> <source file='/Linux.raw_image'/> <target dev='sda' bus='scsi'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <disk type='file' device='cdrom'> <driver name='qemu' type='raw' cache='unsafe' io='native'/> <source file='/xubuntu-12.04-desktop-amd64.iso'/> <target dev='sdb' bus='scsi'/> <readonly/> <address type='drive' controller='0' bus='0' target='0' unit='1'/> </disk> <controller type='usb' index='0'> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> </controller> <controller type='virtio-serial' index='0'> <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> </controller> <controller type='scsi' index='0' model='virtio-scsi'> <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/> </controller> <interface type='direct'> <mac address='xx'/> <source dev='eth0' mode='bridge'/> <model type='virtio'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/> </interface> <serial type='pty'> <target port='0'/> </serial> <console type='pty'> <target type='serial' port='0'/> </console> <channel type='spicevmc'> <target type='virtio' name='com.redhat.spice.0'/> <address type='virtio-serial' controller='0' bus='0' port='1'/> </channel> <input type='mouse' bus='ps2'/> <graphics type='spice' autoport='yes'> <image compression='off'/> <jpeg compression='never'/> <zlib compression='never'/> <playback compression='off'/> <streaming mode='off'/> </graphics> <sound model='ich6'> <codec type='micro'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> </sound> <video> <model type='qxl' vram='65536' heads='1'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> </video> <redirdev bus='usb' type='spicevmc'> </redirdev> <memballoon model='virtio'> <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/> </memballoon>
Quoted 3 lines
</devices>
</domain>
have anyone tested the boot order of virtio-scsi devices?
<os>
<type arch='x86_64' machine='pc-1.1'>hvm</type>
<boot dev='cdrom'/>
<boot dev='hd'/>
<bootmenu enable='no'/></os>
i try to set the boot order with scsi cd-rom first, then scsi harddisk
but the virtual machine will always boot with first scsi device only (unit='0', the scsi harddisk)
is it a known problem?
Il 03/09/2012 00:23, ching ha scritto:
Quoted 7 lines
have anyone tested the boot order of virtio-scsi devices?
<os>
<type arch='x86_64' machine='pc-1.1'>hvm</type> <boot dev='cdrom'/> <boot dev='hd'/> <bootmenu enable='no'/>
Quoted 8 lines
</os>
i try to set the boot order with scsi cd-rom first, then scsi harddisk
but the virtual machine will always boot with first scsi device only (unit='0', the scsi harddisk)
is it a known problem?
Use the bootindex property of <disk> instead.
Paolo
Quoted 11 lines · Paolo Bonzini
Il 03/09/2012 00:23, ching ha scritto:
Quoted 10 lines
have anyone tested the boot order of virtio-scsi devices?
<os>
<type arch='x86_64' machine='pc-1.1'>hvm</type> <boot dev='cdrom'/> <boot dev='hd'/> <bootmenu enable='no'/></os>
Quoted 10 lines
Quoted 5 lines
i try to set the boot order with scsi cd-rom first, then scsi harddisk
but the virtual machine will always boot with first scsi device only (unit='0', the scsi harddisk)
is it a known problem?
Use the bootindex property of <disk> instead.
Paolo
i add boot order and the virtual machine still boot from hard disk instead of cd-rom
<disk type='file' device='disk'>
<driver name='qemu' type='raw' cache='unsafe' io='native'/>
<source file='/Linux.raw_image'/>
<target dev='sda' bus='scsi'/>
<boot order='2'/>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk>
<disk type='file' device='cdrom'>
<driver name='qemu' type='raw' cache='unsafe' io='native'/>
<source file='/xubuntu-12.04-desktop-amd64.iso'/>
<target dev='sdb' bus='scsi'/>
<readonly/>
<boot order='1'/>
<address type='drive' controller='0' bus='0' target='0' unit='1'/>
</disk>here is the captured command line generated by libvirt (uuid and mac address are masked)
/usr/bin/qemu-system-x86_64 -enable-kvm -name Linux -S -M pc-1.1 -cpu SandyBridge,+osxsave,+pdcm,+xtpr,+tm2,+est,+smx,+vmx,+ds_cpl,+monitor,+dtes64,+pbe,+tm,+ht,+ss,+acpi,+ds,+vme -enable-kvm -m 1024 -smp 2,sockets=2,cores=1,threads=1 -uuid xxxx -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/Linux.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-shutdown -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x4 -device virtio-scsi-pci,id=scsi0,bus=pci.0,addr=0x5 -drive file=/Linux.raw_image,if=none,id=drive-scsi0-0-0-0,format=raw,cache=unsafe,aio=native -device scsi-hd,bus=scsi0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0-0-0-0,id=scsi0-0-0-0,bootindex=2 -drive file=/xubuntu-12.04-desktop-amd64.iso,if=none,id=drive-scsi0-0-0-1,readonly=on,format=raw,cache=unsafe,aio=native -device scsi-cd,bus=scsi0.0,channel=0,scsi-id=0,lun=1,drive=drive-scsi0-0-0-1,id=scsi0-0-0-1,bootindex=1 -netdev tap,fd=18,id=hostnet0,vhost=on,vhostfd=19 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=xx:xx:xx:xx:xx:xx,bus=pci.0,addr=0x8 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -chardev spicevmc,id=charchannel0,name=vdagent -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=com.redhat.spice.0 -spice port=5900,addr=127.0.0.1,disable-ticketing,image-compression=off,jpeg-wan-compression=never,zlib-glz-wan-compression=never,playback-compression=off,streaming-video=off -vga qxl -global qxl-vga.vram_size=67108864 -device intel-hda,id=sound0,bus=pci.0,addr=0x3 -device hda-micro,id=sound0-codec0,bus=sound0.0,cad=0 -chardev spicevmc,id=charredir0,name=usbredir -device usb-redir,chardev=charredir0,id=redir0 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x6
Il 04/09/2012 02:03, ching ha scritto:
Quoted 18 lines
i add boot order and the virtual machine still boot from hard disk instead of cd-rom
<disk type='file' device='disk'>
<driver name='qemu' type='raw' cache='unsafe' io='native'/> <source file='/Linux.raw_image'/> <target dev='sda' bus='scsi'/> <boot order='2'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <disk type='file' device='cdrom'> <driver name='qemu' type='raw' cache='unsafe' io='native'/> <source file='/xubuntu-12.04-desktop-amd64.iso'/> <target dev='sdb' bus='scsi'/> <readonly/> <boot order='1'/> <address type='drive' controller='0' bus='0' target='0' unit='1'/> </disk>
Quoted 1 line
here is the captured command line generated by libvirt (uuid and mac address are masked)
Ah, ok. libvirt for now supports only booting from LUN 0. You can use multiple targets instead of multiple units.
Paolo
Quoted 19 lines · Paolo Bonzini
Il 04/09/2012 02:03, ching ha scritto:
Quoted 18 lines
i add boot order and the virtual machine still boot from hard disk instead of cd-rom
<disk type='file' device='disk'>
<driver name='qemu' type='raw' cache='unsafe' io='native'/> <source file='/Linux.raw_image'/> <target dev='sda' bus='scsi'/> <boot order='2'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <disk type='file' device='cdrom'> <driver name='qemu' type='raw' cache='unsafe' io='native'/> <source file='/xubuntu-12.04-desktop-amd64.iso'/> <target dev='sdb' bus='scsi'/> <readonly/> <boot order='1'/> <address type='drive' controller='0' bus='0' target='0' unit='1'/> </disk>
Quoted 6 lines
Quoted 1 line
here is the captured command line generated by libvirt (uuid and mac address are masked)
Ah, ok. libvirt for now supports only booting from LUN 0. You can use multiple targets instead of multiple units.
Paolo
it works. thanks a lot.
hope that libvirt will document it somewhere
Quoted 21 lines · ching
Quoted 20 lines · Paolo Bonzini
Il 04/09/2012 02:03, ching ha scritto:
Quoted 19 lines
i add boot order and the virtual machine still boot from hard disk instead of cd-rom
<disk type='file' device='disk'>
<driver name='qemu' type='raw' cache='unsafe' io='native'/> <source file='/Linux.raw_image'/> <target dev='sda' bus='scsi'/> <boot order='2'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <disk type='file' device='cdrom'> <driver name='qemu' type='raw' cache='unsafe' io='native'/> <source file='/xubuntu-12.04-desktop-amd64.iso'/> <target dev='sdb' bus='scsi'/> <readonly/> <boot order='1'/> <address type='drive' controller='0' bus='0' target='0' unit='1'/> </disk>here is the captured command line generated by libvirt (uuid and mac address are masked)
Quoted 8 lines
Quoted 5 lines
Ah, ok. libvirt for now supports only booting from LUN 0. You can use multiple targets instead of multiple units.
Paolo
it works. thanks a lot.
hope that libvirt will document it somewhere
Please raise this issue on the libvirt lists, then.
Signature · 2 lines
Eric Blake [email protected] +1-919-301-3266 Libvirt virtualization library http://libvirt.org
Quoted 22 lines · Eric Blake
Quoted 21 lines · ching
Quoted 20 lines · Paolo Bonzini
Il 04/09/2012 02:03, ching ha scritto:
Quoted 19 lines
i add boot order and the virtual machine still boot from hard disk instead of cd-rom
<disk type='file' device='disk'>
<driver name='qemu' type='raw' cache='unsafe' io='native'/> <source file='/Linux.raw_image'/> <target dev='sda' bus='scsi'/> <boot order='2'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <disk type='file' device='cdrom'> <driver name='qemu' type='raw' cache='unsafe' io='native'/> <source file='/xubuntu-12.04-desktop-amd64.iso'/> <target dev='sdb' bus='scsi'/> <readonly/> <boot order='1'/> <address type='drive' controller='0' bus='0' target='0' unit='1'/> </disk>here is the captured command line generated by libvirt (uuid and mac address are masked)
Quoted 9 lines
Quoted 7 lines
Quoted 5 lines
Ah, ok. libvirt for now supports only booting from LUN 0. You can use multiple targets instead of multiple units.
Paolo
it works. thanks a lot.
hope that libvirt will document it somewherePlease raise this issue on the libvirt lists, then.
actually, why is the problem related to libvirt, not qemu, nor seabios?
libvirt has generated the qemu command line with "bootindex" already.
-device scsi-hd,bus=scsi0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0-0-0-0,id=scsi0-0-0-0,bootindex=2 -drive file=/xubuntu-12.04-desktop-amd64.iso,if=none,id=drive-scsi0-0-0-1,readonly=on,format=raw,cache=unsafe,aio=native -device scsi-cd,bus=scsi0.0,channel=0,scsi-id=0,lun=1,drive=drive-scsi0-0-0-1,id=scsi0-0-0-1,bootindex=1
Il 05/09/2012 00:13, ching ha scritto:
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Ah, ok. libvirt for now supports only booting from LUN 0. You can use
^^^^^^^
Oops, should have been SeaBIOS.
Quoted 11 lines
Quoted 8 lines
Quoted 8 lines
Quoted 6 lines
Quoted 6 lines
Quoted 4 lines
Quoted 4 lines
multiple targets instead of multiple units.
Paolo
it works. thanks a lot.
hope that libvirt will document it somewherePlease raise this issue on the libvirt lists, then.
actually, why is the problem related to libvirt, not qemu, nor seabios?
libvirt has generated the qemu command line with "bootindex" already.
Yes, it's SeaBIOS. It is documented in the code.
Paolo
Quoted 12 lines · Paolo Bonzini
Il 05/09/2012 00:13, ching ha scritto:
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Ah, ok. libvirt for now supports only booting from LUN 0. You can use
^^^^^^^Oops, should have been SeaBIOS.
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 4 lines
Quoted 4 lines
multiple targets instead of multiple units.
Paolo
it works. thanks a lot.
hope that libvirt will document it somewhere
Quoted 9 lines
Quoted 5 lines
Quoted 2 lines
Quoted 2 lines
Please raise this issue on the libvirt lists, then.
actually, why is the problem related to libvirt, not qemu, nor seabios?
libvirt has generated the qemu command line with "bootindex" already.
Yes, it's SeaBIOS. It is documented in the code.
Paolo
thank you very much for your kindly help.
ching