Originally created by @sickcodes on GitHub (Mar 14, 2021).
I'm trying to run but i got this error Unable to init server: Could not connect: Connection refused qemu-system-x86_64: cannot set up guest memory 'pc.ram': Cannot allocate memory QEMU 5.2.0 monitor - type 'help' for more information (qemu)
Can anyone help me?
I am trying the start OSX with this command sudo docker run --device /dev/kvm --device /dev/snd -v /tmp/X11-unix:/tmp/X11-unix -e "DISPLAY=${DISPLAY:-:0.0}" sickcodes/docker-osx:latest
Originally created by @sickcodes on GitHub (Mar 14, 2021).
I'm trying to run but i got this error `Unable to init server: Could not connect: Connection refused
qemu-system-x86_64: cannot set up guest memory 'pc.ram': Cannot allocate memory
QEMU 5.2.0 monitor - type 'help' for more information
(qemu)`
Can anyone help me?
I am trying the start OSX with this command
`sudo docker run --device /dev/kvm --device /dev/snd -v /tmp/X11-unix:/tmp/X11-unix -e "DISPLAY=${DISPLAY:-:0.0}" sickcodes/docker-osx:latest`
_Originally posted by @C9-Dev in https://github.com/sickcodes/Docker-OSX/issues/131#issuecomment-798802122_
adam
added the bug label 2025-12-29 05:23:01 +01:00
I'm trying to run but i got this error Unable to init server: Could not connect: Connection refused qemu-system-x86_64: cannot set up guest memory 'pc.ram': Cannot allocate memory QEMU 5.2.0 monitor - type 'help' for more information (qemu)
Can anyone help me?
I am trying the start OSX with this command sudo docker run --device /dev/kvm --device /dev/snd -v /tmp/X11-unix:/tmp/X11-unix -e "DISPLAY=${DISPLAY:-:0.0}" sickcodes/docker-osx:latest
@C9-Dev I am also getting this Issue, it is because the default RAM is 8GB, and in this case, the server has BELOW that amount and kills.
I am updating the image now, perhaps 90% of MemTotal's 8152908 kB?
user@pc:~$ docker run -it \
> --device /dev/kvm \
> -p 50922:10022 \
> -v /tmp/.X11-unix:/tmp/.X11-unix \
> -e "DISPLAY=${DISPLAY:-:0.0}" \
> sickcodes/docker-osx:latest
touch: cannot touch '': No such file or directory
chown: cannot access '': No such file or directory
ssh-keygen: generating new host keys: RSA DSA ECDSA ED25519
nohup: appending output to 'nohup.out'
qemu-system-x86_64: warning: dbind: Couldn't connect to accessibility bus: Failed to connect to socket /tmp/dbus-TT9MRS7Axy: Connection refused
QEMU 5.2.0 monitor - type 'help' for more information
(qemu) qemu-system-x86_64: cannot set up guest memory 'pc.ram': Cannot allocate memory
I've checked /dev/kvm permissions, xhost +, and if user in groups of libvirt, docker and kvm groups.
I'm not running in root account either.
I'm using these images
user@pc:~$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
sickcodes/docker-osx big-sur 24f7759e905b 21 hours ago 3.25GB
sickcodes/docker-osx latest 45c4d709ad41 21 hours ago 3.08GB
@yansigit commented on GitHub (Mar 18, 2021):
Hi, I'm still getting same issue
```
user@pc:~$ docker run -it \
> --device /dev/kvm \
> -p 50922:10022 \
> -v /tmp/.X11-unix:/tmp/.X11-unix \
> -e "DISPLAY=${DISPLAY:-:0.0}" \
> sickcodes/docker-osx:latest
touch: cannot touch '': No such file or directory
chown: cannot access '': No such file or directory
ssh-keygen: generating new host keys: RSA DSA ECDSA ED25519
nohup: appending output to 'nohup.out'
qemu-system-x86_64: warning: dbind: Couldn't connect to accessibility bus: Failed to connect to socket /tmp/dbus-TT9MRS7Axy: Connection refused
QEMU 5.2.0 monitor - type 'help' for more information
(qemu) qemu-system-x86_64: cannot set up guest memory 'pc.ram': Cannot allocate memory
```
I've checked /dev/kvm permissions, xhost +, and if user in groups of libvirt, docker and kvm groups.
I'm not running in root account either.
I'm using these images
```
user@pc:~$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
sickcodes/docker-osx big-sur 24f7759e905b 21 hours ago 3.25GB
sickcodes/docker-osx latest 45c4d709ad41 21 hours ago 3.08GB
```
Default RAM is 3GB, you can change to something like 5 or 10 because it will use all of it
-e RAM=5 \
@sickcodes commented on GitHub (Mar 19, 2021):
Try now since I changed https://github.com/sickcodes/Docker-OSX/commit/f6e0bfa202b4cc7d8cea50bb98b0655125a3a0cb
Default RAM is 3GB, you can change to something like 5 or 10 because it will use all of it
`-e RAM=5 \`
Another suitable candidate for increasing available RAM:
sync; echo 3 > /proc/sys/vm/drop_caches
Which clears your memory cache.
@sickcodes commented on GitHub (Mar 19, 2021):
Another suitable candidate for increasing available RAM:
`sync; echo 3 > /proc/sys/vm/drop_caches`
Which clears your memory cache.
@sickcodes commented on GitHub (Mar 19, 2021):
I removed `RAM=max` and changed the default to 3
```bash
export RAM="$(("$(head -n1 /proc/meminfo | tr -dc "[:digit:]") / 1000000"))"'
```
^This causes RAM creep. I left an idling machine on for 10 hours and I used about 16 of RAM by the end of it.
2GB is also slightly too small and causes mouse freezes (personally experienced, and seen in https://github.com/sickcodes/Docker-OSX/issues/207)
From the following reddit comment:
https://www.reddit.com/r/Proxmox/comments/8sy4sd/unable_to_start_vm/e13ghrz/?utm_source=reddit&utm_medium=web2x&context=3
Default RAM is 3GB, you can change to something like 5 or 10 because it will use all of it
-e RAM=5 \
How can i specify 16GB, can you post the full command please?
@gspagoni commented on GitHub (Aug 12, 2024):
> Try now since I changed [f6e0bfa](https://github.com/sickcodes/Docker-OSX/commit/f6e0bfa202b4cc7d8cea50bb98b0655125a3a0cb)
>
> Default RAM is 3GB, you can change to something like 5 or 10 because it will use all of it
>
> `-e RAM=5 \`
How can i specify 16GB, can you post the full command please?
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @sickcodes on GitHub (Mar 14, 2021).
I'm trying to run but i got this error
Unable to init server: Could not connect: Connection refused qemu-system-x86_64: cannot set up guest memory 'pc.ram': Cannot allocate memory QEMU 5.2.0 monitor - type 'help' for more information (qemu)Can anyone help me?
I am trying the start OSX with this command
sudo docker run --device /dev/kvm --device /dev/snd -v /tmp/X11-unix:/tmp/X11-unix -e "DISPLAY=${DISPLAY:-:0.0}" sickcodes/docker-osx:latestOriginally posted by @C9-Dev in https://github.com/sickcodes/Docker-OSX/issues/131#issuecomment-798802122
@sickcodes commented on GitHub (Mar 14, 2021):
@C9-Dev I am also getting this Issue, it is because the default RAM is 8GB, and in this case, the server has BELOW that amount and kills.
I am updating the image now, perhaps 90% of MemTotal's
8152908 kB?@sickcodes commented on GitHub (Mar 14, 2021):
user 100% of ram
90% ram
Or shall I set the default RAM to 2000 as that's the bare minimum anyway?
@yansigit commented on GitHub (Mar 18, 2021):
Hi, I'm still getting same issue
I've checked /dev/kvm permissions, xhost +, and if user in groups of libvirt, docker and kvm groups.
I'm not running in root account either.
I'm using these images
@sickcodes commented on GitHub (Mar 19, 2021):
How much RAM do you have
@yansigit commented on GitHub (Mar 19, 2021):
@sickcodes i have 16GB size rams
@sickcodes commented on GitHub (Mar 19, 2021):
Try now since I changed https://github.com/sickcodes/Docker-OSX/commit/f6e0bfa202b4cc7d8cea50bb98b0655125a3a0cb
Default RAM is 3GB, you can change to something like 5 or 10 because it will use all of it
-e RAM=5 \@sickcodes commented on GitHub (Mar 19, 2021):
Another suitable candidate for increasing available RAM:
sync; echo 3 > /proc/sys/vm/drop_cachesWhich clears your memory cache.
@sickcodes commented on GitHub (Mar 19, 2021):
I removed
RAM=maxand changed the default to 3^This causes RAM creep. I left an idling machine on for 10 hours and I used about 16 of RAM by the end of it.
2GB is also slightly too small and causes mouse freezes (personally experienced, and seen in https://github.com/sickcodes/Docker-OSX/issues/207)
From the following reddit comment:
https://www.reddit.com/r/Proxmox/comments/8sy4sd/unable_to_start_vm/e13ghrz/?utm_source=reddit&utm_medium=web2x&context=3
@sickcodes commented on GitHub (Mar 24, 2021):
sudo tee /proc/sys/vm/drop_caches <<< 3@gspagoni commented on GitHub (Aug 12, 2024):
How can i specify 16GB, can you post the full command please?