Hi, On 05/06/17 12:10, Christoph Biedl wrote: > Hello, > > in a desperate attempt to understand #852962, thus salvaging ycmd and > youcompleteme for stretch, I tried to set up an emulated mipsel machine > using libvirt/qemu, and failed horribly. There are tons of documents > out there, many years old, contradicting, not helping. > > So: Is this feasible at all? I could use a pointer then. > > So far: Create a virtual machine, with installer CD and virtual disk. > Then libvirt needs a patch by Aurilien[1][2]. Then libvirt complains > about mips_bios.bin although some pages[3] state this was no > longer required. Providing a dummy image, the machine starts, but shows > just a blank screen and qemu eats 100% CPU. Then booting via "Direct > kernel boot", ditto. I've tried several "console=" parameters, no > avail. Perhaps libvirt plays tricks on me, wasn't the first time. You have to use direct kernel booting on mips. If you provide a dummy bootloader, qemu will execute it and just hang. I remember trying to use libvirt some time ago on mips and having to manually specify the base address of the serial port on malta. I found this config file but its a few years old so it might not work anymore. > It *is* possible to start qemu-system-mipsel directly, with an > additional '-serial stdio' parameter, but for reasons I'd really like to > control the machine using libvirt, and I fail to see how to fiddle the > kernel console into the libvirt terminal. > > - What did I miss? > - How comes appearently nobody encounters such issues? I expect there are very few users of qemu-mipsel with libvirt. Some of the issues you've encountered may be genuine bugs. Thanks, James
<domain type='qemu' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
<name>debian-vm-1-qemu1</name>
<uuid>c48e51ea-ba43-4de6-bd20-21469badae9e</uuid>
<memory unit='KiB'>2097152</memory>
<currentMemory unit='KiB'>2097152</currentMemory>
<vcpu placement='static'>1</vcpu>
<os>
<type arch='mips64el' machine='malta'>hvm</type>
<kernel>/var/lib/libvirt/boot/vmlinux-mips64el</kernel>
<initrd>/var/lib/libvirt/boot/initrd-mips64el</initrd>
<cmdline>root=/dev/vda console=ttyS0 mem=2048m net.ifnames=0</cmdline>
<boot dev='hd'/>
</os>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<emulator>/usr/bin/qemu-system-mips64el</emulator>
<disk type='file' device='disk'>
<driver name='qemu' type='raw'/>
<source file='/var/lib/libvirt/images/debian-vm-1-qemu1'/>
<target dev='vda' bus='virtio'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
</disk>
<controller type='pci' index='0' model='pci-root'/>
<controller type='usb' index='0' model='piix3-uhci'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
</controller>
<serial type='pty'>
<target port='0'/>
<address type='isa' iobase='0x3f8' irq='0x4'/>
</serial>
<console type='pty'>
<target type='serial' port='0'/>
<address type='isa' iobase='0x3f8' irq='0x4'/>
</console>
<memballoon model='virtio'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</memballoon>
</devices>
<qemu:commandline>
<qemu:arg value='-cpu'/>
<qemu:arg value='MIPS64R2-generic'/>
</qemu:commandline>
</domain>
Attachment:
signature.asc
Description: OpenPGP digital signature