dockerapple-m1podmanapple-siliconazure-sql-edge

docker-compose / podman compose SQL Server on Apple Silicon /Mac M! Segmentation Fault


SQL Server used to run smoothly and then after a disk full issue I had to rebuild the podman vm. Then the problem started: I would get a segmentation fault even running with platform: "linux/amd64".

Even worse: removing the platform I would get an error with the volume mapping I had working before for no reason:

  sqlserver:
    container_name: "sqlserver_db"
    image: "mcr.microsoft.com/azure-sql-edge"
    platform: "linux/amd64"
    ports:
      - "1433:1433"
    restart: always
    environment:
      ACCEPT_EULA: "Y"
      SA_PASSWORD: "*****"
    volumes:
      - sqlserver_db_vol:/var/opt/mssql

In addition to that I tested another container I had working before and I got the same problem:

services:
  mssql:
    image: mcr.microsoft.com/mssql/server:2022-latest
    container_name: mssql
    ports:
      - "1433:1433"
    volumes:
      - mssql_data:/data
    restart: always 
    environment:
      MSSQL_PID: "Developer"
      DB_NAME: "db"
      MSSQL_SA_PASSWORD: "******"
      ACCEPT_EULA: "Y"
volumes:
  mssql_data:

Solution

  • After a lot of trouble I figured it out that the issue was related to the vm type created by podman. The VM being created was that one:

    "/Users/felipegouveiae/.config/containers/podman/machine/libkrun"

    The previous one was actually applehv (Apple Hypervisor):

    "/Users/felipegouveiae/.config/containers/podman/machine/applehv"

    When I destroyed the libkrun vm and created a new one with Apple Hypervisor all the containers were working again!