Martin Kletzander
2014-Feb-18 08:33 UTC
Re: [libvirt-users] Problems with qemu-system-arm and isa-serial
On Tue, Feb 18, 2014 at 09:10:58AM +0100, Martin Kletzander wrote:> On Mon, Feb 17, 2014 at 05:01:05PM +0100, Niccolo Rigacci wrote: > > Hi, > > > > I'm trying to use libvirt for an armel virtual machine hosted > > into an x86_64 box. > > > > I know the command line to start qemu-system-arm directly, but I > > cannot figure a proper .xml configuration file to let libvirt do > > this job. > > > > We're still missing a full support for qemu-system-arm because it has > different options, works differently and so on. > > > The main problem is that I want a serial console attached via > > telnet, this is the Qemu incantation: > > > > -serial telnet::4000,server,nowait,nodelay > > > > this is an old-style for -chardev serial, I believe > > > Wahtever I do in libvirt, I get this paramter added: > > > > -device isa-serial > > > > and this is new-style for x86 qemu, however, arm-based qemu haven't > adopted this option yet. >To be a bit more precise, only *some* machine types support this option, others may have adopted it, but don't use it properly and what you describe is most probably properly adopted option, but qemu not adding an ISA controller (apart from non-arm qemu which has it always). Can you send me the output of 'virsh capabilities' and 'virsh dumpxml <domain_name>' so I can have a look at what's the particular type of machine you are using for which we should not use '-device isa-serial'? Thanks, Martin> > which causes Qemu to fail: > > > > qemu-system-arm -M versatileab -device isa-serial \ > > -kernel vmlinuz-2.6.32-5-versatile > > qemu-system-arm: -device isa-serial: No 'ISA' bus found for device 'isa-serial' > > > > How can I instead have -device pl011, or just have the default > > devices provided by qemu-system-arm, i.e. to prevent libvirt from > > adding the -nodefaults switch? > > > > libvirt adds -nodefault and similar options (and has to add them) > because otherwise there are devices which libvirt doesn't know of and > is thus unable to work properly. I found one small thing in the code > which might help you, I'll cook-up a patch and will put you in Cc > when sending, can you try compiling it with that patch added (or from > git when pushed) to see whether that will help you? > > Have a nice day, > Martin > > > Thank you! > > > > -- > > Niccolo Rigacci - http://www.rigacci.net/ > > Campi Bisenzio - Firenze - Italy > > Tel. Office: +39-055-9331021, Mobile: +39-327-5619352 > > > > _______________________________________________ > > libvirt-users mailing list > > libvirt-users@redhat.com > > https://www.redhat.com/mailman/listinfo/libvirt-users> _______________________________________________ > libvirt-users mailing list > libvirt-users@redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-users
Martin Kletzander
2014-Feb-18 08:55 UTC
Re: [libvirt-users] Problems with qemu-system-arm and isa-serial
On Tue, Feb 18, 2014 at 09:33:01AM +0100, Martin Kletzander wrote:> On Tue, Feb 18, 2014 at 09:10:58AM +0100, Martin Kletzander wrote: > > On Mon, Feb 17, 2014 at 05:01:05PM +0100, Niccolo Rigacci wrote: > > > Hi, > > > > > > I'm trying to use libvirt for an armel virtual machine hosted > > > into an x86_64 box. > > > > > > I know the command line to start qemu-system-arm directly, but I > > > cannot figure a proper .xml configuration file to let libvirt do > > > this job. > > > > > > > We're still missing a full support for qemu-system-arm because it has > > different options, works differently and so on. > > > > > The main problem is that I want a serial console attached via > > > telnet, this is the Qemu incantation: > > > > > > -serial telnet::4000,server,nowait,nodelay > > > > > > > this is an old-style for -chardev serial, I believe > > > > > Wahtever I do in libvirt, I get this paramter added: > > > > > > -device isa-serial > > > > > > > and this is new-style for x86 qemu, however, arm-based qemu haven't > > adopted this option yet. > > > > To be a bit more precise, only *some* machine types support this > option, others may have adopted it, but don't use it properly and what > you describe is most probably properly adopted option, but qemu not > adding an ISA controller (apart from non-arm qemu which has it > always). Can you send me the output of 'virsh capabilities' and > 'virsh dumpxml <domain_name>' so I can have a look at what's the > particular type of machine you are using for which we should not use > '-device isa-serial'? >Sorry for spamming so much about this, I should've thought about that more before the first reply. I looked at the code and this should be fixed since commit v1.1.2-9-g3a2beae [1]. Fromt hat I guess you are using version 1.1.2 or older. Please update your libvirt and le us know if that problem persists. Have a nice day, Martin [1] http://libvirt.org/git/?p=libvirt.git;a=commitdiff;h=3a2bea> Thanks, > Martin > > > > which causes Qemu to fail: > > > > > > qemu-system-arm -M versatileab -device isa-serial \ > > > -kernel vmlinuz-2.6.32-5-versatile > > > qemu-system-arm: -device isa-serial: No 'ISA' bus found for device 'isa-serial' > > > > > > How can I instead have -device pl011, or just have the default > > > devices provided by qemu-system-arm, i.e. to prevent libvirt from > > > adding the -nodefaults switch? > > > > > > > libvirt adds -nodefault and similar options (and has to add them) > > because otherwise there are devices which libvirt doesn't know of and > > is thus unable to work properly. I found one small thing in the code > > which might help you, I'll cook-up a patch and will put you in Cc > > when sending, can you try compiling it with that patch added (or from > > git when pushed) to see whether that will help you? > > > > Have a nice day, > > Martin > > > > > Thank you! > > > > > > -- > > > Niccolo Rigacci - http://www.rigacci.net/ > > > Campi Bisenzio - Firenze - Italy > > > Tel. Office: +39-055-9331021, Mobile: +39-327-5619352 > > > > > > _______________________________________________ > > > libvirt-users mailing list > > > libvirt-users@redhat.com > > > https://www.redhat.com/mailman/listinfo/libvirt-users > > > > > _______________________________________________ > > libvirt-users mailing list > > libvirt-users@redhat.com > > https://www.redhat.com/mailman/listinfo/libvirt-users> _______________________________________________ > libvirt-users mailing list > libvirt-users@redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-users
Niccolo Rigacci
2014-Feb-18 09:03 UTC
Re: [libvirt-users] Problems with qemu-system-arm and isa-serial
On Tue, Feb 18, 2014 at 09:33:01AM +0100, Martin Kletzander wrote:> > > > > Wahtever I do in libvirt, I get this paramter added: > > > > > > -device isa-serial > > > > > > > and this is new-style for x86 qemu, however, arm-based qemu haven't > > adopted this option yet. > > > > To be a bit more precise, only *some* machine types support this > option, others may have adopted it, but don't use it properly and what > you describe is most probably properly adopted option, but qemu not > adding an ISA controller (apart from non-arm qemu which has it > always). Can you send me the output of 'virsh capabilities' and > 'virsh dumpxml <domain_name>' so I can have a look at what's the > particular type of machine you are using for which we should not use > '-device isa-serial'?This is the command line I use to start qemu directly: qemu-system-arm -M versatileab -m 256 \ -kernel vmlinuz-2.6.32-5-versatile \ -initrd initrd.img-2.6.32-5-versatile \ -hda "debian_squeeze_armel_standard.qcow2" -boot order=c \ -netdev tap,id=hostnet0,ifname=tap72,script=/home/kvm/armel/qemu-ifup \ -device rtl8139,netdev=hostnet0,id=net0,mac=52:54:00:00:03:72 \ -nographic -serial telnet::4000,server,nowait,nodelay \ -append "root=/dev/sda1 console=ttyAMA0" Adding the -nodefaults I had to use this command line (not exactly equivalent and not perfectly streamlined, but it starts): /usr/bin/qemu-system-arm -M versatileab -m 256 \ -smp 1,sockets=1,cores=1,threads=1 \ -name armel -uuid bf9adc6c-f05c-2698-1cf0-278fd86dc19a \ -nographic -no-user-config -nodefaults \ -rtc base=utc -no-shutdown \ -kernel /home/kvm/armel/vmlinuz-2.6.32-5-versatile \ -initrd /home/kvm/armel/initrd.img-2.6.32-5-versatile \ -append "root=/dev/sda1 console=ttyAMA0" \ -device piix3-usb-uhci,id=usb,bus=pci,addr=0x1.0x2 \ -device pl011 \ -drive file=/home/kvm/armel/debian_squeeze_armel_standard.qcow2,if=scsi \ -device lsi \ -boot order=c \ -netdev tap,id=hostnet0,ifname=tap72,script=/home/kvm/armel/qemu-ifup \ -device rtl8139,netdev=hostnet0,id=net0,mac=52:54:00:00:03:72 \ -serial telnet::4000,server,nowait,nodelay I attach the virsh capabilities and the machine xml (which is not functional). -- Niccolo Rigacci - http://www.rigacci.net/ Campi Bisenzio - Firenze - Italy Tel. Office: +39-055-9331021, Mobile: +39-327-5619352
Cole Robinson
2014-Feb-18 14:49 UTC
Re: [libvirt-users] Problems with qemu-system-arm and isa-serial
On 02/18/2014 04:03 AM, Niccolo Rigacci wrote:> On Tue, Feb 18, 2014 at 09:33:01AM +0100, Martin Kletzander wrote: >>> >>>> Wahtever I do in libvirt, I get this paramter added: >>>> >>>> -device isa-serial >>>> >>> >>> and this is new-style for x86 qemu, however, arm-based qemu haven't >>> adopted this option yet. >>> >> >> To be a bit more precise, only *some* machine types support this >> option, others may have adopted it, but don't use it properly and what >> you describe is most probably properly adopted option, but qemu not >> adding an ISA controller (apart from non-arm qemu which has it >> always). Can you send me the output of 'virsh capabilities' and >> 'virsh dumpxml <domain_name>' so I can have a look at what's the >> particular type of machine you are using for which we should not use >> '-device isa-serial'? > > This is the command line I use to start qemu directly: > > qemu-system-arm -M versatileab -m 256 \ > -kernel vmlinuz-2.6.32-5-versatile \ > -initrd initrd.img-2.6.32-5-versatile \ > -hda "debian_squeeze_armel_standard.qcow2" -boot order=c \ > -netdev tap,id=hostnet0,ifname=tap72,script=/home/kvm/armel/qemu-ifup \ > -device rtl8139,netdev=hostnet0,id=net0,mac=52:54:00:00:03:72 \ > -nographic -serial telnet::4000,server,nowait,nodelay \ > -append "root=/dev/sda1 console=ttyAMA0" > > > Adding the -nodefaults I had to use this command line (not > exactly equivalent and not perfectly streamlined, but it starts): > > /usr/bin/qemu-system-arm -M versatileab -m 256 \ > -smp 1,sockets=1,cores=1,threads=1 \ > -name armel -uuid bf9adc6c-f05c-2698-1cf0-278fd86dc19a \ > -nographic -no-user-config -nodefaults \ > -rtc base=utc -no-shutdown \ > -kernel /home/kvm/armel/vmlinuz-2.6.32-5-versatile \ > -initrd /home/kvm/armel/initrd.img-2.6.32-5-versatile \ > -append "root=/dev/sda1 console=ttyAMA0" \ > -device piix3-usb-uhci,id=usb,bus=pci,addr=0x1.0x2 \ > -device pl011 \ > -drive file=/home/kvm/armel/debian_squeeze_armel_standard.qcow2,if=scsi \ > -device lsi \ > -boot order=c \ > -netdev tap,id=hostnet0,ifname=tap72,script=/home/kvm/armel/qemu-ifup \ > -device rtl8139,netdev=hostnet0,id=net0,mac=52:54:00:00:03:72 \ > -serial telnet::4000,server,nowait,nodelay >What libvirt and qemu version are you using? - Cole