skip to Main Content

I installed CentOS 7.6 then installed all things QEMU on my machine. I have a SPARC image I need to bringing up in a VM. I’ve been using qemu-system-sparc.

$ qemu-system-sparc -m 256 -hda solaris_v2-qemu_v2.2.0.disk -nographic -bios ./openbios-sparc32

This is on a box on which I have Fedora-30 installed.

Can I use qemu-sparc to bring up my Solaris image: solaris_v2-qemu_v2.2.0.disk ?

If so, how?

BTW, qemu-sparc come with (on CentOS 7.6):

$ sudo yum install qemu*

PS> I’ve tried to install qemu-system-sparc on my CentOS box but ended up in a never-ending whack-a-mole game of dependencies.

2

Answers


  1. Chosen as BEST ANSWER

    After a great deal of web searches, I found this:

    QEMU as an userspace emulator

    QEMU usually comes in two flavors: qemu-system-* are system emulators (able to run entire operating systems as seen in the previous section), while qemu-* are userspace emulators (only able to run userspace applications).

    QEMU as an userspace emulator is thus able to directly execute a SPARC application, by emulating the syscalls that the application requests.

    Among the greatest features of this approach are:

    The output of application is directly displayed in the terminal, Arguments to applications are directly given through the command line, QEMU returns the return code of applications, etc. QEMU really just acts as a wrapper around the application, as time or nice do.

    The only complicated thing you have to do in this approach is to compile a cross-toolchain for SPARC, so SPARC programs can be compiled on the host computer. Such a cross-toolchain can be generated by using the fabulous crosstool-ng.

    So the answer appears to be: no, you CANNOT use qemu-sparc to run your image in a VM.


  2. You need the qemu-system-sparc, wich will "emulate" a sparc system.
    qemu-sparc will only emulate the CPU and syscalls, thus a SPARC compiled program (that you can extract from your disk image if needed) will run on non-sparc hosts, while most syscalls be "translated" by qemu into your host syscalls, thus a SPARC program can run on said host. file io, kernel stuff, it mostly get translated and run on your host. Handy for debugging or reverse engineering.

    Try:

    yum install qemu-kvm
    

    The dependencies are required ofcourse. Not very usefull in your case but you could also compile qemu yourself, maybe the dependencies overlap:
    git glib2-devel libfdt-devel pixman-devel zlib-devel

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search