Showing posts with label VirtualBox. Show all posts
Showing posts with label VirtualBox. Show all posts

Friday, May 27, 2016

Virtualbox crashing VMs on startup

FYI:

*WARNING* Almost *all* of my VM's stopped working today.  I got some error on startup - but before they could really even start to start up.
*In case you have this problem* here is the work around I figured out, it is strange:
1. In virtual box there are some alternate ways to start a VM, one is called "Detachable Start"
2. Start your failing VM using "Detachable Start", you may have to start it twice
3. When it starts is will have crashed Windows and rebooted Windows ( so you will not have the state you saved the VM in )
4. Once it starts, snapshot it and that new snapshot will start up normally.

Monday, August 3, 2015

Ubuntu on VirtualBox with Dual Network Interfaces

I needed to be able to reach the internet from a Ubuntu VM, and be able to get into it from my host machine, and I needed its IP address to be fixed.

I could not use the Bridged Adapter setting because the VM was going to be part of my work domain, and I found that if I shut it down for a while, or switched snapshots it would occasionally change its IP address.

A configuration that works for me is to make it have 2 adapters.

In VirtualBox Manager I went to:
File -> Preferences -> Network -> Host-only Networks
Verified there was an entry and set it up to have a DHCP server.

In my VM settings I set up so that network adapter 1 was host only, and 2 was NAT.

I then installed Ubuntu Server.

I told it to use the 2nd adapter for internet.

After it started I did:
vi /etc/network/interfaces
Which only showed:

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth1
iface eth1 inet dhcp

So I tacked this onto the end of it:

auto eth0
iface eth0 inet dhcp

And then rebooted.

Now it can ping the host (Windows in my case), and the host can ping it, and I can ssh into it.