[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Debian on qemu-system-sparc64



On Mon, Jan 25, 2016 at 12:05 PM, Adrian Davey <adrian@beth2.org> wrote:
> Hi all,
>
> Just thought I'd share a couple of things to help people use debian on
> emulated sparc64 (sun4u).
>
> Currently, graphics is not functioning

Interesting. This used to work with Debian 7 and older QEMU versions.
Is it regression in Debian or qemu-system-sparc64/OpenBIOS ?

Could you please check if Debian 7 also hangs in your setup?

Regards,
Artyom

> so once installed using Adrian's
> wonderful debian d-i iso [1] from message thread [2], you need to make sure
> that systemd it not going to make modprobe load the DRM modules, else you
> hang your VM.
>
> For DRM blacklisting:
>
> debian-sparc64:#$ cat /etc/modprobe.d/drm-blacklist.conf
>
> # blacklist of DRM modules that do not load on qemu-system-sparc64 sun4u
> blacklist drm
> blacklist bochs-drm
> blacklist ttm
>
> For sanity, loading initrd at 4.0MB rather than 14MB+:
>
> edit /etc/initramfs-tools/initramfs.conf to not install every module
> #MODULES=most
> MODULES=dep
>
>
> I found having the following entry in /etc/silo.conf rather handy for
> debugging the last couple of weeks:
>
> image = /vmlinuz
>         label = linux-emergency
>         append = "initrd=/initrd.img root=/dev/sda1
> systemd.unit=emergency.target"
>
> I prefer to run VMs using libvirt, and use the gui from virt-manager so I
> use the following xml in virsh, hope this helps other people. If you edit
> the VM config be sure to check what pci slots are automatically reset to
> lower numbers that then collide with predefined machine config in
> qemu-system-sparc64.
>
> <!--
> WARNING: THIS IS AN AUTO-GENERATED FILE. CHANGES TO IT ARE LIKELY TO BE
> OVERWRITTEN AND LOST. Changes to this xml configuration should be made
> using:
>   virsh edit debian-unstable-sparc64
> or other application using the libvirt API.
> -->
>
> <domain type='qemu'>
>   <name>debian-unstable-sparc64</name>
>   <uuid>ccd8b5c2-b8e4-4d5e-af19-9322cd8e55bf</uuid>
>   <memory unit='KiB'>1048576</memory>
>   <currentMemory unit='KiB'>1048576</currentMemory>
>   <vcpu placement='static'>1</vcpu>
>   <resource>
>     <partition>/machine</partition>
>   </resource>
>   <os>
>     <type arch='sparc64' machine='sun4u'>hvm</type>
>   </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-sparc64</emulator>
>     <disk type='file' device='disk'>
>       <driver name='qemu' type='qcow2' cache='none' io='native'/>
>       <source
> file='/path/to/vm/images/default/debian-unstable-sparc64.qcow2'/>
>       <target dev='hda' bus='ide'/>
>       <boot order='1'/>
>       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
>     </disk>
>     <disk type='block' device='cdrom'>
>       <driver name='qemu' type='raw' cache='none' io='native'/>
>       <target dev='hdc' bus='ide'/>
>       <readonly/>
>       <address type='drive' controller='0' bus='1' target='0' unit='0'/>
>     </disk>
>     <controller type='ide' index='0'/>
>     <controller type='usb' index='0'>
>       <address type='pci' domain='0x0000' bus='0x00' slot='0x06'
> function='0x0'/>
>     </controller>
>     <controller type='pci' index='0' model='pci-root'/>
>     <interface type='network'>
>       <mac address='52:54:00:ce:98:e8'/>
>       <source network='default'/>
>       <model type='virtio'/>
>       <address type='pci' domain='0x0000' bus='0x00' slot='0x09'
> function='0x0'/>
>     </interface>
>     <serial type='pty'>
>       <target port='0'/>
>     </serial>
>     <console type='pty'>
>       <target type='serial' port='0'/>
>     </console>
>     <video>
>       <model type='vga' vram='16384' heads='1'/>
>       <address type='pci' domain='0x0000' bus='0x00' slot='0x07'
> function='0x0'/>
>     </video>
>     <memballoon model='none'/>
>   </devices>
> </domain>
>
> Enjoy debian on emulated sparc64. Is it fast? Erm no, but it is fun and a
> useful way to test d-i images. I am sure that booting off IDE for silo,
> kernel and initrd and then using virtio disks would make things better for
> IO, but not tried it yet. I think single threaded qemu sparc64 cpu is more
> the limiting factor, however.
>
> Thanks go to the debian sparc porters and the qemu developers!
>
> Regards,
>
> Adrian
>
>
>
> [1]
> https://people.debian.org/~glaubitz/debian-cd/debian-9.0-sparc64-NETINST-1.iso
> [2] https://lists.debian.org/debian-sparc/2016/01/msg00097.html
>



-- 
Regards,
Artyom Tarasenko

SPARC and PPC PReP under qemu blog: http://tyom.blogspot.com/search/label/qemu


Reply to: