Virtual box not working - Macbook Pro 2020 M1, MacOS-Big Sur
Asked Answered
C

6

8

I am trying to boot up a saved am using Macbook pro with M1 chip.

I tried the steps given at this answer. But was not able to boot up the VM. Can someone confirm this problem or already found out a solution to it?

I got the error "The virtual machine 'Ubuntu 20.04 64bit 1' has terminated unexpectedly during startup with exit code 1 (0x1)." below: enter image description here

Covenantee answered 25/3, 2021 at 6:31 Comment(0)
C
5

<New user, reputation too low to comment on David's post!>

As per David Leitko's answer, VirtualBox is an x86 (more specifically, AMD64/x86_64) virtualization hypervisor. However, it appears from various discussions I've seen on this topic that many users don't really understand what this really means.

So, it means not only that VirtualBox only runs on x86 CPUs, but also that it requires all the other elements of the x86 platform. These include system memory, various bus controllers (PCI, USB), hard disk controllers, sound cards, graphics, BIOS/UEFI, etc. None of these take the same form on the Apple Silicon platform - i.e. they don't use any of the standards built up in the PC ecosystem over the last 40 years.

So, not only will VirtualBox not work on Apple Silicon, it will never work on Apple Silicon. There will never be any way to run a VirtualBox image that ran on an Intel Mac on an Apple Silicon Mac. Ever.

The canonical discussion thread on the VirtualBox forums that covers this in more detail is here.

Cathode answered 1/7, 2021 at 12:13 Comment(3)
In VirtualBox 6.1.18 (released January 19 2021) there was some Mac Big Sur enhancements, M1 chips seems to be supported but trough emulation via Rosetta 2. bullfrag.com/…Euchology
Does VirtualBox work with MacBook Pro i7 Big Sur?Androw
@TomBomb VirtualBox does indeed work on Intel MacBook Pros running both Big Sur (I can personally confirm this) and Monterey (as of VirtualBox 6.1.30, see in this thread).Cathode
A
3

If you are looking for solution to run some virtual machine on Mac M1 like Ubuntu, you should take a look on UTM. It is a free tool (paid if installing via Apple Store). It has QEMU under the hood. QEMU - is a hardware emulator that can emulate x86 processors. Thus UTM is able to run x86 Ubuntu.

I was able to install and run Ubuntu 22 on my Mac M1, but it works extremely slow. Installation of a minimal configuration took around 1 hour. Optionally you may take already installed ubuntu 14.04 x86 from UTM download gallery. But comparing to VirtualBox for M1 which is still in Developer Preview in 2023, at least Ubuntu on UTM works although it may take 2-5 seconds to handle each mouse click. While Ubuntu started in VirtualBox crashes.

So if you really need x86 guest OS you can try UTM. It is very slow at the moment, but still an option.

Allister answered 22/5, 2023 at 12:42 Comment(0)
O
1

VirtualBox is an x86 virtualization hypervisor. It only runs on an x86 platform. See https://www.virtualbox.org

While Rosetta 2 will run many x86 apps very well on an M1 Mac, virtualization products are not supported per this Apple document

Ostium answered 25/3, 2021 at 19:32 Comment(3)
Oh, I see. Any other way to make virtual box work?Covenantee
I would imagine that if Oracle gets VirtualBox running on M1, it would only support ARM guests and not x86. That’s the approach that Parallels is taking.Ostium
In VirtualBox 6.1.18 (released January 19 2021) there was some Mac Big Sur enhancements, M1 chips seems to be supported but trough emulation via Rosetta 2. bullfrag.com/…Euchology
E
1

Had the same issue on Mac OS Big Sur 11.4 when I was trying to add my Ubuntu instance (on Intel tho), nothing suggested here and other topics helped. Turned out you have to give access (Full Disc Access) to Virtual Box in Settings. Go to Settings -> Security & Privacy -> Privacy -> Full Disc Access -> plus sign (unlock it if needed) -> choose Virtual Box Application -> Open. After that I was able to choose my Ubuntu image in Finder.

Everywhere answered 24/6, 2021 at 15:49 Comment(0)
E
-1

I just had the exact same problem after updating my VirtualBox app on MacOS Big Sur. What worked for me was to go to System Preferences - Security & Privacy - General, and then click the Allow button to allow extensions by Oracle (first click the lock symbol in the lower left of the screen and enter your password).

Actually, during installation I got this pop-up window telling me to do this, but I wasn't quite sure what exactly it wanted me to do. Only after getting this error I took the trouble of looking closer, ahem...

Hope this will fix your problem too!

Eon answered 25/3, 2021 at 7:12 Comment(1)
I didn't get any pop-up. Also, when I go to Security & Privacy, I don't see any button/text/checkbox for Allow extensions by Oracle even after I unlocked it by clicking left icon.Covenantee
O
-1

Here is an example to set up ubuntu server in Mac m1/m2 laptop:

docker-compose.yaml:

version: "3.9"

services:
  ssh_ubuntu:
    platform: linux/amd64
    image: yingshaoxo/ubuntu_ssh_server_for_the_stupid_apple_macos_m1_system:v1
    ports:
      - "2222:22"
    environment:
      - ssh_root_password=yingshaoxo
    volumes:
      - "~/ubuntu_docker:/root"
    restart: unless-stopped
docker-compose up -d

Then you can connect to it by using:

ssh [email protected] -p 2222

The default password is yingshaoxo


Reference:

https://hub.docker.com/r/yingshaoxo/ubuntu_ssh_server_for_the_stupid_apple_macos_m1_system

Obtect answered 6/4, 2023 at 5:49 Comment(3)
"Stupid Apple Macos M1 System" sounds strange. Is this a secure Docker image?Dirham
It is open sourced.Obtect
I built it by myself.Obtect

© 2022 - 2024 — McMap. All rights reserved.