Install headless Ubuntu server to VirtualBox on windows - windows

I have recently started using VirtualBox to get my Linux environment rather than fully using Ubuntu. For me this works well. But recently i have realized that in the Ubuntu vm the only thing I use a lot is the terminal, mostly just because I need the Linux environment and not the full desktop.
So I tried installing Ubuntu server into a VM, which worked. But as soon as I reboot the machine, it fails after the system boot logo. After BIOS and where I would log on from the command line I simply get a black screen with a non blinking cursor. So I am never fully able to boot into the vbox.
I read up on the command line version, trying to run it headless and then connecting to it from demote desktop. after starting the vbox I am able to connect to the desktop and see the grub screen but after selecting Ubuntu I get that same non-blinking cursor.
So is this really possible? I tried cygwin but it never really felt adequate to me. I like and am very comfortable with the Ubuntu/Debian command line. How could I (if possible) accomplish this? I want to be bale to start up the VBox and get the full command line for that vbox session. Any ideas?
Ubuntu version: 10.10, VirtualBox v. 4.0.4 r70112 and I am on Windows 7 Ultimate.

You didn't mention the versions of Ubuntu and Virtualbox.
I failed twice to install full Ubuntu 10.10 over the latest VirtualBox 4.0.4 over Ubuntu (problems like those you describe), so I switched to Debian 6.0.
All you require to install Ubuntu headless is to install the server version, which you already did. If you get blank screens, tweak the ioapic settings in both VB and Ubuntu. Another tweak is to switch between IDE and SATA drivers for the main disk (the Grub in my non-virtualized Ubuntu hangs if there's USB media attached at boot time).
If you can run full Ubuntu on a VM, you can try downgrading it by removing the xserver-xorg package, or changing the default runlevel.
If all you want is a Linux consule, you can install Debian 6 without any GUI components.

Related

How to access anaconda prompt in ubuntu terminal installed in windows 10?

I have recently added the ubuntu terminal in my windows pc since certain packages were only supported in linux. Now for example if I were to access my packages that are present in my conda environments in my windows os through the linux terminal would it be possible? Will it still function the same way or do I have to manually install everything via the ubuntu terminal as well.
If I do have to install everything manually again, where will all the stored data be present? Which directories should I access?
How does this ubuntu terminal work exactly? Does it work in a similar manner if I were to dual boot it?
Yes, you can access all the packages from Ubuntu terminal. You don't have to install everything all-together again. WSL or Ubuntu on Windows can seamlessly integrate with windows. Even though Linux systems have different directory structure, Ubuntu terminal (or bash or WSL or Ubuntu for Windows) happen to maintain the directory structure for windows. So anything you install on Ubuntu terminal will be installed as to windows terms. But I wouldn't recommend mixing these two as it's very tricky. And also, WSL and dual-booting Ubuntu with windows are far from close. You can know more about it if you search online.
I would personally recommend installing Ubuntu as it makes programming a billion times easier. You don't have to install Ubuntu replacing windows. You can just install Ubuntu on a separate hard drive and just specify which drive to boot from on system start-up. If you use a laptop and don't have two drives, then create a new volume and use it as if it were an original drive.

How to access ruby from Ubuntu bash for windows

I started ROR development on windows using Ubuntu bash. For now it was going well but when i tried to debug ruby on window using Rubymine it said no ruby SDK specified. How can i access the ruby sdk from ubuntu bash?
In resume: maybe Rubymine is a windows-program which is not aware of the ruby (ROR) environment installed inside the windows10-WSL.
In more detail: before windows10 (with winxp, win7, etc) ubuntu and linux programs could not be installed inside windows. So in those cases, if you needed to use a linux program, you could download virtualbox, create a separate VirtualMAchine, install there your Ubuntu and then inside install the ubuntu programs (Ruby, ROR, etc)
With windows10, there is a new feature called WSL - Windows Subsystem for Linux, which allows a ubuntu system to be installed inside window. It uses some hidden virtualization/conversion to make it transparent for the user, and so any ubunut command can be run from the windows-console, without VirtualBox nor VirtualMachine - its looks as if windows could execute linux programs natively (but its just an ilusion though)
It looks like you installed ROR in the WSL-Ubuntu. And then installed RubyMine on windows. And then Rubymine tried to find the ROR-things in the windows directories but it did not found any. I guess its because Rubymine is not prepared to search within the WSL-Ubuntu for the ROR-things and so fails.
My second guess, is that the easiest solution could be to avoid using WSL-Ubuntu (as other programs wont be ready for it - currently it looks more of an experiment, not a real stable standard). And instead, try to do it all inside a Virtual-Box VirtualMachine, where you install ubuntu, all the programs you want (and they will run fine there), and avoid the WSL-mix. Even if this way requires a bit more work in the start - to prepare the VirtualBox and VM with ubuntu (youtube has many tutorials for this) - it will definitely save you time/headaches in the long-run when you need to install additional library/program/gem for your ROR environment

How can I run a docker windows container on osx?

I'm running docker for mac and want to start up a windows container. From what I see this should work via a virtual machine. But I'm unclear where to find out how to get it to work? Or does it only work for linux containers? Thanks in advance!
docker build nanoserver/
Sending build context to Docker daemon 2.56kB
Step 1/6 : FROM microsoft/nanoserver:10.0.14393.1480
10.0.14393.1480: Pulling from microsoft/nanoserver
bce2fbc256ea: Pulling fs layer
baa0507b781f: Pulling fs layer
image operating system "windows" cannot be used on this platform
I know I am late to the party but as of 2021, this is the easiest setup to get a windows container running on macOS:
https://github.com/StefanScherer/windows-docker-machine
Install vagrant and virtual box
Clone the repository above and change directory into it
vagrant up --provider virtualbox 2019-box
docker context use 2019-box
I followed this setup and I could use the following windows image
mcr.microsoft.com/windows/servercore:ltsc2019
Please note that the windows version of your host must match the container image. This is mentioned here: https://hub.docker.com/_/microsoft-windows
Windows requires the host OS version to match the container OS
version. If you want to run a container based on a newer Windows
build, make sure you have an equivalent host build.
See this link:
https://forums.docker.com/t/how-do-i-start-a-windows-docker-container-on-my-mac-os-x/12953/2
Text if you can't follow the link:
On OS X, get VirtualBox.
Get Windows Server 2016 Tech Preview 5 ISO167 (free download from Microsoft)
Create WS 2016 TP5 VM in virtualbox
Run this206 in the new VM
Now you can run Windows Containers in the VM. To make the setup a little easier to use, see this: https://forums.docker.com/t/windows-server-2016-tp5-docker-server-remote-management/10315/5317
You could also install Bootcamp on your machine which allows you to dual boot your computer between OS X and Windows 10. You could then use the full power of your hardware dedicated to Windows and docker instead of virtualization.
Additionally, you can make the use of VMWare Fusion for Mac OS or Parallels, which allow you to ALSO access the dual boot windows partition from within the Mac OS for maximum flexibility. During installation make sure you do not create a Virtual Machine drive, but instead access the bootcamp partition directly.

How to initialize and run Docker on windows?

I have Docker installed on Windows 7 platform. However when I try to run boot2docker start, the console gives me:
Failed to get machine 'boot2docker-vm': machine does not exist.
Ok, so I try to initialize the machine: boot2docker init. What now happens is even though I have the ISO image on the same path as docker, it tries to download a new image (and then fails to do so).
I uninstalled both OracleVM and GIT before installing them with boot2docker bundle as advised on Docker forums, but now I don't know how to proceed.
I had the same problem on a Windows 7 64 bit system when I installed the entire boot2docker package. It seems that running the solely 64-bit based boot2docker image from a 32-bit OS image (e.g. created by Virtualbox) does not work.
The solution for me was
to activate Intel Virtualisation Technolologies in my BIOS
(Lenovo X61 for me). Note that the settings can be found either
under CPU or Security.
choose a 64 bit OS version in VirtualBox and boot in with the
image obtained by boot2docker.
In case you're trying to do this now
For Windows 10 64-bit: Pro, Enterprise, or Education (Build 15063 or later), follow the instructions to install Docker Desktop here https://docs.docker.com/docker-for-windows/install/.
If you have Windows systems that do not meet the requirements of Docker Desktop for Windows(in my case Microsoft Windows 10 Home Single Language), you can install Docker Toolbox by following the instructions here https://docs.docker.com/toolbox/toolbox_install_windows/.
boot2docker does not support sharing directories on Windows IIRC. The way I run Docker on windows is:
install VirtualBox
install Vagrant
create a directory (let's say c:\vm\docker)
download this Vagrantfile and save it under c:\vm\docker\Vagrantfile
open a DOS command prompt
go to the directory cd c:\vm\docker
start the VM vagrant up and wait for it to install, start up and get provisionned
connect to the VM vagrant ssh
play with docker docker images, etc
Also you might want a real console instead of using the DOS command prompt:
install Git Bash for Windows
install Console
setup Console to use Git Bash (see this guide)
use Console to run the vagrant up and vagrant ssh commands

Installing MAC OS useing virtualbox On Windows 8.1

I am trying to install Mac(OSX-Mavericks) using virtualbox On Windows 8.1.
Everything works fine But, when MAC Installation setup starts in virtual machine, it keep on loading and do not start the installation wizard stays on the first screen.
I have waited for a log time like 3-4 hrs but unable to figure out the problem as there is no error.
I am using a dell(Inspiron 3537).
I have installed Mac on my previous Samsung laptop successfully in the same way.
I will provide other information on demand as I'm not sure where the problem is as setup loads but not starts the installation process.
Thanks in advance
enable virtualisation on your BIOS, it may helps.
Open an administrator CMD shell and try this:
cd "C:\Program Files\Oracle\Virtualbox"
VBoxManage modifyvm <name_of_your_vm> --cpuidset 00000001 000306a9 00020800 80000201 178bfbff
Then close/VirtualBox and open again (to save your new settings). Boot OSX with "-v" flag.

Resources