Use x86_64 Docker containers in Linux VMs on Apple silicon

Discussion in 'Installation and Configuration of Parallels Desktop' started by Mikhail Ushakov, Aug 8, 2023.

  1. Mikhail Ushakov

    Mikhail Ushakov Parallels Team

    Messages:
    504
    This thread is created to share feedback regarding the feature to run x86_64 binaries in Linux VMs on Apple silicon.
     
  2. RodolfoT

    RodolfoT Bit poster

    Messages:
    7
    Thanks a lot for this new Parallels version. I just want to express my utmost interest in a ubuntu x86 emulation that allow conda packages to be installed under the x86 architecture. Pretty much what has been done for docker, but also for conda. A lot of scientific research is still done using conda containers and right now most of the dependencies are ubuntu/linux-specific (x86).
     
  3. cyb3rw0lf

    cyb3rw0lf Junior Member

    Messages:
    13
    Does it work with kali linux?
    Do I need to install docker-ce:amd64 after the architecture has been added to use x86_64 dockers?
     
  4. viola

    viola Hunter

    Messages:
    149
    Please facilitate non-Linux x86 operating systems somehow. Some of us need to work on development of some things like newer/other OSes like Haiku, Vinix, FreeBSD, etc.

    Some of us DO operating system development for our own pet/hobby operating systems and need this functionality too and would like to keep everything in Parallels vs having to use UTM and qemu directly where possible.
     
  5. RodolfoT

    RodolfoT Bit poster

    Messages:
    7
    Unable to pull and run a linux/amd64 docker image using the standard Ubuntu x86 emulation.

    docker pull --platform linux/amd64 staphb/virsorter2
    docker run staphb/virsorter2
    WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested


    and if I run:
    docker run --platform linux/amd64 staphb/virsorter2

    nothing happens.
     
  6. loopbaq

    loopbaq Bit poster

    Messages:
    5
    Hi everyone,

    the preconfigured Ubuntu image works great for Docker container emulation. However Kali Linux doesn't seem to work. I followed this article: https://kb.parallels.com/en/129871.
    However I still get the following error message when running a container:

    WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
    exec /bin/sh: exec format error


    Is there anything we can do to solve this issue?
     
  7. loopbaq

    loopbaq Bit poster

    Messages:
    5
    Hi @cyb3rw0lf , did you find a solution to this?
    Thank you.
     
  8. cyb3rw0lf

    cyb3rw0lf Junior Member

    Messages:
    13
    For me is also not working on Kali Linux. When I try to run a x86_64 docker I get the following error:
    Code:
    docker start -ai 0a59aa1662b8
    rosetta error: unhandled auxillary vector type 28
     
  9. cyb3rw0lf

    cyb3rw0lf Junior Member

    Messages:
    13
    it's broken in kernel >6.3, also still broken in debian testing with kernel 6.4
     
    loopbaq likes this.
  10. RodolfoT

    RodolfoT Bit poster

    Messages:
    7

    I get the same issue you are having for the standard preconfigured ubuntu image. Did you manage to make the normal one work with x86 docker images?
     
  11. loopbaq

    loopbaq Bit poster

    Messages:
    5
    Hi RodolfoT,

    yes, that one worked for me. I pulled some x86 containers and they started up. The performance was pretty good.
     
    RodolfoT likes this.
  12. loopbaq

    loopbaq Bit poster

    Messages:
    5
    That's exactly the error I get now after a fresh Kali ARM install and following the steps outlined in the KB article.
    Code:
    docker start -ai 0a59aa1662b8
    rosetta error: unhandled auxillary vector type 28
    I found a similar error in the UTM Github forum here: https://github.com/utmapp/UTM/issues/5567
    Maybe the Parallels team @Mikhail Ushakov has some more insights. Would be great to know. My trial phase is about to expire.
     
  13. RodolfoT

    RodolfoT Bit poster

    Messages:
    7
    Hi Thomas,

    thanks for the reply. May I ask you a favor then? i am not able to run this docker and I am not sure if the problem is my machine or the docker itself.

    When I run pull and run, I get this:
    Code:
    docker pull --platform linux/amd64 staphb/virsorter2
    docker run staphb/virsorter2
    WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
    
    and if I run:
    Code:
    docker run --platform linux/amd64 staphb/virsorter2
    
    nothing happens.
     
  14. RodolfoT

    RodolfoT Bit poster

    Messages:
    7
    Could you please try to run that on your preconfigured Ubuntu machine?
     
  15. loopbaq

    loopbaq Bit poster

    Messages:
    5
    Hi @RodolfoT, I tried it on the preconfigured Ubuntu machine. I get an error when trying to run it without the --platform command
    Code:
    docker run staphb/virsorter2
    WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
    
    and nothing happens when running it with the --platform command. Looks like it is very dependent on the Docker container.

    However Kali Linux didn't work at all so far. I hope this helps.
     
  16. RodolfoT

    RodolfoT Bit poster

    Messages:
    7
    Hi @loopbaq, thanks a lot for giving it a try. It seems that some dockers are unfortunately not working... Thanks anyway.
     
  17. Carlos Lapao

    Carlos Lapao Parallels Team

    Messages:
    7
    I looked at that docker file for that specific image and that should be the output, the container is a run/exit and there is no output from it, you need to pass some sort of database, this of course in our Ubuntu pre-configured machine. In Kali Linux we found an issue and are investigating.

    Could you please provide more information on this? like an output from a machine where this is running as expected?
     
  18. RodolfoT

    RodolfoT Bit poster

    Messages:
    7
    Hi Carlos,

    thanks for looking into that. This is tool to detect viruses in metagenomic data (https://github.com/jiarong/VirSorter2). Essentially after installation there should be available an executable script called "virsorter" that can take as input data and spits out viral data. I don't know if it gets installed or what. Maybe I can still run the tool if I know where it was installed? maybe it is just a path issue.
     
  19. Carlos Lapao

    Carlos Lapao Parallels Team

    Messages:
    7
    Hi RodolfoT,

    Ok so the Dockerfile in that repo is very different from the one in the image you are downloading in docker
    the container on staphb (https://github.com/StaPH-B/docker-builds/blob/master/vibrant/1.2.1/Dockerfile) does not have any entry point as you can see here on line 51, this means the docker will run it and exit as there is nothing to do.

    But if you look at the one on that repo you just sent then this one (https://github.com/jiarong/VirSorter2/blob/master/Dockerfile) does indeed have a entrypoint, see line 8, now they do seem to probably depend on each other.

    I do not know how the app work but I will give it a go with this new docker and see if it runs in the Ubuntu pre-configured machine
     
  20. nsayer

    nsayer Member

    Messages:
    41
    I am attempting to follow the instructions at https://kb.parallels.com/en/129871 to upgrade an existing VM. I have Parallels tools installed, but do not see the checkbox on the CPU/memory config page to enable x86-64 binary emulation.
     

Share This Page