Amazon Linux problems... #60

Open
opened 2025-12-28 23:22:46 +01:00 by adam · 14 comments
Owner

Originally created by @AlexMcConnell on GitHub (Jul 10, 2020).

Well, it's Amazon's own special implementation of Linux, so who knows if it's even possible to make this work, but...

SSH'd into my EC2 instance.

Ran:

sudo yum install libvirt qemu-kvm -y
sudo systemctl enable libvirtd.service
sudo systemctl enable virtlogd.service
sudo modprobe kvm

Exited and rebooted.

SSH'd back in, pulled the Docker image and ran:
docker run --privileged -e "DISPLAY=${DISPLAY:-:0.0}" -v /tmp/.X11-unix:/tmp/.X11-unix sickcodes/docker-osx

Failboat:

ssh-keygen: generating new host keys: RSA DSA ECDSA ED25519
Unable to init server: Could not connect: Connection refused
Could not access KVM kernel module: No such file or directory
qemu-system-x86_64: failed to initialize kvm: No such file or directory

Other stuff:

$ egrep -c '(svm|vmx)' /proc/cpuinfo
0
$ ls -l /dev/kvm
ls: cannot access /dev/kvm: No such file or directory
$ pgrep -a X
$ echo $SHELL
/bin/bash
$ echo $DISPLAY

$

Is this due to not having a display? Is there a way around not having a display?

Originally created by @AlexMcConnell on GitHub (Jul 10, 2020). Well, it's Amazon's own special implementation of Linux, so who knows if it's even possible to make this work, but... SSH'd into my EC2 instance. Ran: ``` sudo yum install libvirt qemu-kvm -y sudo systemctl enable libvirtd.service sudo systemctl enable virtlogd.service sudo modprobe kvm ``` Exited and rebooted. SSH'd back in, pulled the Docker image and ran: `docker run --privileged -e "DISPLAY=${DISPLAY:-:0.0}" -v /tmp/.X11-unix:/tmp/.X11-unix sickcodes/docker-osx` Failboat: ``` ssh-keygen: generating new host keys: RSA DSA ECDSA ED25519 Unable to init server: Could not connect: Connection refused Could not access KVM kernel module: No such file or directory qemu-system-x86_64: failed to initialize kvm: No such file or directory ``` Other stuff: ``` $ egrep -c '(svm|vmx)' /proc/cpuinfo 0 $ ls -l /dev/kvm ls: cannot access /dev/kvm: No such file or directory $ pgrep -a X $ echo $SHELL /bin/bash $ echo $DISPLAY $ ``` Is this due to not having a display? Is there a way around not having a display?
Author
Owner

@daraul commented on GitHub (Jul 14, 2020):

I'm having this problem with the VNC version as well.

@daraul commented on GitHub (Jul 14, 2020): I'm having this problem with the VNC version as well.
Author
Owner

@sickcodes commented on GitHub (Jul 15, 2020):

99% chance that they do not support hardware nested virtualization

@sickcodes commented on GitHub (Jul 15, 2020): 99% chance that they do not support hardware nested virtualization
Author
Owner

@sickcodes commented on GitHub (Jul 20, 2020):

Amazon Linux is actually Red Hat linux, so it will work.... but in this case, it's probably hardware nested virtualization that has been disabled.

Digital Ocean works

@sickcodes commented on GitHub (Jul 20, 2020): Amazon Linux is actually Red Hat linux, so it will work.... but in this case, it's probably hardware nested virtualization that has been disabled. Digital Ocean works
Author
Owner

@daraul commented on GitHub (Jul 20, 2020):

I can confirm Digital Ocean works, I'm using that as I type this comment, but don't expect to use xcode. Apple blocks requests from DO droplets.

Not sure if/how I can enable hardware nested virtualization on AWS, but I'll definitely have a closer look at their RHEL AMIs

@daraul commented on GitHub (Jul 20, 2020): I can confirm Digital Ocean works, I'm using that as I type this comment, but don't expect to use xcode. [Apple blocks requests from DO droplets](https://github.com/fastlane/fastlane/issues/14602#issuecomment-483589035). Not sure if/how I can enable hardware nested virtualization on AWS, but I'll definitely have a closer look at their RHEL AMIs
Author
Owner

@sickcodes commented on GitHub (Jul 20, 2020):

I can confirm Digital Ocean works, I'm using that as I type this comment.

Not sure if/how I can enable hardware nested virtualization on AWS, but I'll definitely have a closer look at their RHEL AMIs

Haha excellent! 😝🚀🚀

@sickcodes commented on GitHub (Jul 20, 2020): > I can confirm Digital Ocean works, I'm using that as I type this comment. > > > > Not sure if/how I can enable hardware nested virtualization on AWS, but I'll definitely have a closer look at their RHEL AMIs Haha excellent! 😝🚀🚀
Author
Owner

@LcTrKiD commented on GitHub (Jul 21, 2020):

Is it expensive in DO? I want to have macOS ephimeral runners for my Gitlab CI/CD but an AWS metal instance is pretty much for my use case...

@LcTrKiD commented on GitHub (Jul 21, 2020): Is it expensive in DO? I want to have macOS ephimeral runners for my Gitlab CI/CD but an AWS metal instance is pretty much for my use case...
Author
Owner

@sickcodes commented on GitHub (Jul 21, 2020):

The most economical way to do it is in the following way:

docker commit at the stage you want your machine, or copy the .img to somewhere.

Then use their API, or terraform, to run the server for the time required, and then delete it after.

@sickcodes commented on GitHub (Jul 21, 2020): The most economical way to do it is in the following way: docker commit at the stage you want your machine, or copy the .img to somewhere. Then use their API, or terraform, to run the server for the time required, and then delete it after.
Author
Owner

@sickcodes commented on GitHub (Jul 21, 2020):

Is it expensive in DO? I want to have macOS ephimeral runners for my Gitlab CI/CD but an AWS metal instance is pretty much for my use case...

I am not familiar with their bare metals but it would probably work.

@sickcodes commented on GitHub (Jul 21, 2020): > Is it expensive in DO? I want to have macOS ephimeral runners for my Gitlab CI/CD but an AWS metal instance is pretty much for my use case... I am not familiar with their bare metals but it would probably work.
Author
Owner

@ykhandelwal913 commented on GitHub (Aug 11, 2020):

@daraul were you able to run it on amazon linux?

@ykhandelwal913 commented on GitHub (Aug 11, 2020): @daraul were you able to run it on amazon linux?
Author
Owner

@sickcodes commented on GitHub (Aug 11, 2020):

@daraul were you able to run it on amazon linux?

@ykhandelwal913 it will run on bare metal only, source: https://www.reddit.com/r/aws/comments/eo85jr/ec2_instance_types_that_support_nested/

Edit: this thread could be old news though

@sickcodes commented on GitHub (Aug 11, 2020): > @daraul were you able to run it on amazon linux? @ykhandelwal913 it will run on bare metal only, source: [https://www.reddit.com/r/aws/comments/eo85jr/ec2_instance_types_that_support_nested/](https://www.reddit.com/r/aws/comments/eo85jr/ec2_instance_types_that_support_nested/) Edit: this thread could be old news though
Author
Owner

@ykhandelwal913 commented on GitHub (Aug 11, 2020):

Thanks @sickcodes for prompt response. sorry for reopening the old thread.

@ykhandelwal913 commented on GitHub (Aug 11, 2020): Thanks @sickcodes for prompt response. sorry for reopening the old thread.
Author
Owner

@daraul commented on GitHub (Aug 12, 2020):

I never got a chance to look at their RHEL AMI's @ykhandelwal913, but if I do I'll be back.

@daraul commented on GitHub (Aug 12, 2020): I never got a chance to look at their RHEL AMI's @ykhandelwal913, but if I do I'll be back.
Author
Owner

@iambenmitchell commented on GitHub (Aug 23, 2020):

If you are in the EU, Hetzner is a great host to use. They have servers in Germany and Finland. Super cheap prices. I have 10Gbps connection for €39 p/m (not including the server cost)

@iambenmitchell commented on GitHub (Aug 23, 2020): If you are in the EU, Hetzner is a great host to use. They have servers in Germany and Finland. Super cheap prices. I have 10Gbps connection for €39 p/m (not including the server cost)
Author
Owner

@KStartups commented on GitHub (Jul 25, 2025):

If you are in the EU, Hetzner is a great host to use. They have servers in Germany and Finland. Super cheap prices. I have 10Gbps connection for €39 p/m (not including the server cost)

@iambenmitchell Sorry to ping you 5 years later, can you link me to the exact Hetzner product you used to deploy this on the cloud?

@KStartups commented on GitHub (Jul 25, 2025): > If you are in the EU, Hetzner is a great host to use. They have servers in Germany and Finland. Super cheap prices. I have 10Gbps connection for €39 p/m (not including the server cost) @iambenmitchell Sorry to ping you 5 years later, can you link me to the exact Hetzner product you used to deploy this on the cloud?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/Docker-OSX#60