Create VM without OS with Vagrant - virtualbox

For testing of automated OS deploy on a hardware cluster, I need Vagrant to create few VMs without OS installed, with just network boot enabled.
I succesfully created base box image and configured boot order with Vagrant.
Problem is that Vagrant dies after waiting for VM to boot (which it doesn't, because it has nothing to boot), trying to set up ssh forwarding, shared folders etc.
Is there any way I can tell Vagrant to just power on the machine and not try to configure or boot it?

Vagrant's idea is to manage already installed boxes. It has some requirements for them. SSH or other login access is a fundamental one.
If you just want to spin up a VirtualBox VM, you can call VBoxManage etc. directly.

Related

How can you run a proxmox server on a ubuntu EC2 instance

I would like to run a proxmox server on a Ubuntu EC2 Instance.
I know this may sound crazy but I do not have any spare hardware to run a promox server on. Would it be possible to run this on a Ubuntu EC2 Instance?
If i was to download proxmox on a flash drive, can i insert it into my computer and install it (overiding) the ubuntu instance and just using the hardware? Is this possible AWS?
It is possible to run Proxmox on EC2, but if you want to host VM guests you need to run on an instance type that supports nested virtualisation, which is only the "metal" instances. These start at about $4/hour.
Running containers works fine on any standard x64 instance type, though.
I posted a guide to installing Proxmox on EC2 here:
https://github.com/thenickdude/proxmox-on-ec2
The tricky parts that the guide fixes up automatically are harmonising the network configuration generated by Debian's cloud-init package with Proxmox's nonstandard ifupdown2 package.

Google Cloud Instance showing SSH instead of RDP (Windows instead of Linux)

I have a Windows Instance running in Google Cloud with two disks (ie boot disk and empty drive).
I manually logged into the machine and copied boot data into empty drive. I removed the boot and tried to spin up the VM with the empty drive and it was successful.
However, instead of showing RDP connect button now it is showing SSH. Any idea on why this is happening or how to solve the issue?
Which version of Windows are you installing?
Some new versions of Windows Server like "Core" versions only have access by SSH, the procedure that you have performed seems a little bit strange.
My suggestion is to redeploy your VM and check your attached disk looking for everything that is right on the boot disk.

How can I run Docker in a AWS Windows Server environment?

Thing I'd tried:
Toolbox on Windows Server 2012 R2. Disabled Hyper-V to allow virtualbox. I cannot enable virtualization as it's on the physical bios.
Installed Docker EE on Windows Server 2016 w/Containers EC2. Installed correctly. Daemon is running. BUT, I can't pull a single image beside the hello-world:nanoserver. So I hunted down the windowsservercore and nanoserver, still doesn't work because they are out of date. The repo from the frizzm person at Docker.com doesn't work when you try to pull it.
Started again with a fresh Windows Server 2016 instance. I disabled Hyper-V and installed ToolBox. Doesn't work.
How do I run Docker in a windows server environment in AWS?
All of the vids/tuts seem so simple, but I sure can't get it to work. I'm at a lose.
You don't actually need to install Docker for Windows (formerly known as the Docker Toolbox) in order to utilize Docker on Windows Server.
First, it's important to understand that there are two different types of containers on the Windows Server 2016 platform: Windows Containers and Hyper-V containers.
Windows Containers - runs on top of the Windows Server kernel, no virtual machines used here
Hyper-V Containers - virtual machine containers, each with their own kernel
There's also a third option that runs on top of Hyper-V called Linux Containers on Windows (LCOW), but we won't get into that, as it appears you're specifically asking about Windows containers.
Here are a couple options you can look at:
Bare Metal Instances on AWS
If you absolutely need to run Windows Hyper-V containers on AWS, or want to run Linux containers with Docker for Windows, you can provision the i3.metal EC2 instance type, which is a bare metal instance. You can deploy Windows Server 2016 onto the i3.metal instance type, install Hyper-V, and install Docker for Windows. This will give you the ability to run both Linux containers (under a Hyper-V Linux guest), Hyper-V containers, and Windows containers.
ECS-Optimized AMI
Amazon provides an Amazon Machine Image (AMI) that you can deploy EC2 instances from, which contains optimizations for the Amazon Elastic Container Service (ECS). ECS is a cloud-based clustering service that enables you to deploy container-based applications across an array of worker nodes running in EC2.
Generally you'll use ECS and the ECS-optimized AMI together to build a production-scale cluster to deploy your applications onto.
Windows Server 2016 with Containers AMI
There's also a "Windows Server 2016 with Containers" AMI available, which isn't the same as the ECS-optimized AMI, but does include support for running Docker containers on Windows Server 2016. All you have to do is deploy a new EC2 instance, using this AMI, and you can log into it and start issuing Docker commands to launch Windows containers. This option is most likely the easiest option for you, if you're new to Windows containers.
EC2 instances do not allow for nested virtualization (EC2 instances are themselves virtual machines). Docker for Windows uses Hyper-V under the hood, and Docker Toolbox uses Virtualbox under the hood, so neither of those solutions are viable.
Even if you were able to run them on a Windows EC2 instance, the performance wouldn't be that great due to the fact that Docker for Windows mounts files into the Docker VM via Samba, which is not very fast.
If you want to run Linux containers, you should probably run them on Linux. It's very fast to get set up, and all of the Docker commands that you're used to with Docker for Windows should still work.
It is possible to run docker on windows. Run the following command to set it up.
docker-machine create --driver amazonec2 aws01
What this command does is create a new EC2 linux instance, and connects up docker to that linux instance. When docker commands are run on your windows instance the docker commands actually are sent to the linux instance, executed, and the results are returned to the windows EC2 instance.
Here's Docker's documentation on it. I hope this helps.
https://docs.docker.com/machine/drivers/aws/#aws-credential-file
I know this contradicts your question a little; but you might also consider running it on one of the new ec2 Mac OS instances, which are bare metal. Worked for me.

GUI tools to access AWS EC2 running Ubuntu

I'm asking this here because google couldn't point me out in the proper direction. Are there any available tools for manipulating an EC2 instance via SSH using a GUI. I'm not very familiar with Ubuntu CLI commands (I actually crashed an instance by doing something over putty) so a GUI is my only option. What I actually want to do is to install a Glassfish web server on the instance. All necessary ports are forwarded (4848,8080,80).

What does vagrant-aws provide and how to use it in production version?

I have used Vagrant with default Virtualbox provider. It uses Virtualbox to simulate a OS, such as Ubuntu 14.04 on my local computer.
Vagrant has AWS provider as well. I have read the Official document, but I am confused about the following things:
Where does this provider runs on, my local computer or the AWS instance?
If it runs on my local computer and only simulates the AWS instance, why does the SSH key need to be set?
If it runs on the AWS instance, will the intended AMI, such as Ubuntu 14.04, being setup directly on the instance or through simulating tools used by AWS to simulate a OS on the instance, like what Virtual box does based on the local computer?
As Vagrant adds in overhead on the system by using Simulating Provider, whether is it a good idea to use Vagrant in production version? If not, how to put the Vagrant box into the production server, such as the AWS instance?