I have an Amazon ec2 instance running Amazon Linux AMI 2018.03. I would like to create a startup service but I can't use systemctl as I'm not on Amazon Linux 2.
The service is a Python script that I would like to run at startup and be able to start/stop. How would I do this?
Amazon Linux 1 is using sysvinit system, unlike systemd in Amazon Linux 2. One way of setting it up to manage your service is shown here.
However, Amazon Linux 1 has only few months left of its lifetime:
Update on Amazon Linux AMI end-of-life
Thus if you can, please consider using Amazon Linux 2. Sooner or later you will have to switch to AL2 anyway for security reasons, so may try doing this now.
Related
I'm trying to run a Linux (ubuntu LTS) container inside a windows server 2019 OS. The problem is that the windows OS runs as an AWS instance.
There have been problem for me trying to achieve this and I've been reading somewhat different opinions on the internet regarding whether or not it is possible. Some say it will be possible on a .metal instance which is bare metal. Currently I've been trying running it on a regular t3 instance with has virtualization type HVM.
To sum up my questions are:
Is running a linux container on windows aws instance possible?
If yes, how?
If not, will it be possible on a bare metal instance?
Please keep in mind that I need the container to run in a Windows environment due to multiple tasks the the OS needs to achieve (and I don't want multiple instances)
In order to use Docker Desktop on Windows, you need either Hyper-V or Windows Susbsystem for Linux enabled (which at its turn requires Hyper-V). Both solutions demand of VT-x capabilities, but you're running inside a VM, which means that is not so easy to achieve.
It is called "nested virtualization", and it is not supported in common EC2 virtual machines. (source)
You can certainly run Linux containers on a bare metal Windows instance (but why you should? it is way cheaper and simpler to create a Linux virtual machine on EC2 and communicate it with your Windows host). Should still that be your purpose, you can install Windows Server 2019 with Hyper-V. (tutorial)
Another alternative for SMALL, SMALL things, that could work without nested virtualization (I haven't tried), would be using WSL1. (more info)
WSL1 uses a compatibility layer between Windows and Linux system calls, without actually virtualizing the operating system. Some folks have been able to install Docker 17.09 on WSL1, but this is a very adventurous path I would not recommend taking.
I am aware of creating LPARs via HMC and WPARs from LPAR on AIX
But, on my laptop (company owned), how can I create a WPAR (or) WPAR equivalent on RHEL 6
You can't create true Linux based WPARs, as this is something that is done within the AIX Virtual Machine (LPAR). Probably something that is like it in a way, is a Linux Docker host and containers (clients), in the same way WPAR uses related libraries for the versions of AIX in the WPAR host. Docker does this too, but in a more feature rich environment.
I recommend that you take a look at the 'Getting Started With Containers' page on the Docker website.
I myself run a VirtualBox VM inside my laptop as a Docker host enabling me to create many if not hundreds of docker containers.
I'm trying to configure an application to run on Google Cloud. I was able to start a VM running Windows 2008 Server (64bit) and install VMWare Player inside it. Then I tried to install and boot a second VM within VMWare Player, and Windows crashed.
So, my question is, does Google Cloud support "nesting" VMs in this fashion?
In case it matters, the "inner" VM's operating system was Linux (also 64-bit).
You cannot run Virtual Machine inside the GCE VM, as Virtualization is not enabled in any of the machines which are created under GCE. Currently Google doesn't have this functionality in its VMs.
Even if you tried to enable the Hyper-V in the Windows Sever GCE instance it will not allow you to do this because the processor should support the version of hardware assisted Virtualization.
I would suggest to create another Linux VM on Google Cloud Services, if you still need another machine.
Nested support in GCE is now in Beta (as of September 2017):
Documentation:
https://cloud.google.com/compute/docs/instances/enable-nested-virtualization-vm-instances
Blog posting:
https://cloudplatform.googleblog.com/2017/09/introducing-nested-virtualization-for.html
Disclosure: I work at Google on GCE.
My company has decided to migrate our base server images from Ubuntu Server to Amazon Linux. In the past we would spin up an Ubuntu Server LTS box from vagrantbox.es to emulate an instance in our AWS stack, but Amazon only provides an AMI.
According to the Amazon Linux AMI FAQ, updates are custom tailored depending on the EC2 region the AMI is launched in, which might have issues with exporting an AMI to VDI. I've also read that Amazon Linux removes a lot of cruft from RHEL and Fedora to make it a server-optimized distribution.
How can I emulate Amazon Linux in an environment where I might not have a persistent network connection?
Apart from switching to yum, what pitfalls should I expect in running Amazon Linux locally?
Is there some pre-built vagrant box for Amazon Linux that gets around these pitfalls?
Amazon does not provide an image of its distribution for use on other VM platforms. You may find these blog posts useful though; they provide detailed instructions for building Amazon Linux disk images, and in the last article he provides direct links to images he built for VMWare and VirtualBox.
Amazon Linux is based on CentOS so you could also start there.
I want to fire up an linux EC2 instance that has VNC installed by default. Something like Ubuntu, where I can fire up, and VNC right in to configure.
I've observed all of the AMI's that are available, and the closest thing I can come to, is:
SuSE Linux Enterprise Server 11 sp3 (HVM) - ami-xxxxxxx
SuSE Linux Enterprise Server 11 Service Pack 3 (HVM), EBS-backed. Nvidia driver installs automatically during startup for GPU instances.
I assume that this has graphic capabilities, but you know what they say about assumptions.
Does anybody know of an image that has this? I just want to fire up an instance that I can get right into, not through SSH.
The images you are looking at are designed for the largest (HVM) instances. The second one is intended for GPU instances. Probably not what you are looking for if you just want VNC.
Often most AMI's don't have any desktop systems installed as they are generally intended to be run as headless servers. But you should be able to take a base Ubuntu instance, install a desktop system and vnc and then repackage it as an AMI for your own use.