Notes on CLI installation of a VM on Ubuntu-8.04

Discussions related to using VirtualBox on Linux hosts.
Post Reply
wikiterra
Posts: 3
Joined: 9. Aug 2009, 03:49
Primary OS: Ubuntu 8.04
VBox Version: OSE Debian
Guest OSses: ubuntu 8.04

Notes on CLI installation of a VM on Ubuntu-8.04

Post by wikiterra »

Hi all,

I'm undertaking a project to set up 3 VMs to host my own personal website. VBox is running on a gui-less Ubuntu 8.04LTS, and I'm installing the same for all my VMs. One is for MySQL, one for Wordpress, and one for a pylons web application. I just wanted to share a few things that tripped me up during the process. Right now I've gotten one mostly set up (it's running, with the bridged interface working, but I'm not sure what's up with the internal networking).

1. If you use a bridge interface, you have to specify which network device to use. Use this command:

Code: Select all

VBoxManage modifyvm "your-vm-name" --bridgeadapter<N> eth<X>
where N and X are the numbers of your bridge adapter and host network device (usually eth0 if you only have one NIC). If you don't do this, you'll receive this error:

Code: Select all

Error: failed to start machine. Error message: Failed to open/create the internal network 'HostInterfaceNetworking-' (VERR_INTNET_FLT_IF_NOT_FOUND).
Unknown error creating VM (VERR_INTNET_FLT_IF_NOT_FOUND)
2. When loading the iso to be used, the instructions tell you to first register the iso -- "VBoxManage openmedium dvd /full/path/to/dvd.iso" and then attach it to the vm -- "VBoxManage modifyvm "Windows XP" --dvd /full/path/to/dvd.iso". YOU MUST USE THE FULL PATH. For openmedium, the relative path will work, but for modifying the vm, you must give it the entire path to the iso, because the program runs from the ~/.VirtualBox directory. Having a relative path will end in it trying to use ~/.VirtualBox/path/to/dvd.iso when really you meant for it to be in ~/path/to/dvd.iso. This is the error you will receive if you make this mistake:

Code: Select all

ERROR: Could not access the image file '/home/jonathan/.VirtualBox/downloads/ubuntu-8.04.3-server-amd64.iso' (VERR_FILE_NOT_FOUND)
Details: code VBOX_E_FILE_ERROR (0x80bb0004), component DVDImage, interface IDVDImage, callee nsISupports
Context: "OpenDVDImage(Bstr(dvd), emptyUUID, dvdImage.asOutParam())" at line 1268 of file VBoxManageModifyVM.cpp
Also, during the install process of the guest's OS, it couldn't find the DHCP server. I don't know what's up with that (though my router is 192.168.2.1, so maybe that was a problem) but it didn't matter since I'm setting it to have a static IP address. After manually configuring the IP, DNS, etc, it worked fine.

I'll update this post with any other notes I have to share as I make progress. Hope this is helpful to someone out there on the intertubes...
wikiterra
Posts: 3
Joined: 9. Aug 2009, 03:49
Primary OS: Ubuntu 8.04
VBox Version: OSE Debian
Guest OSses: ubuntu 8.04

Re: Notes on CLI installation of a VM on Ubuntu-8.04

Post by wikiterra »

Just want to post an update.

Today I was able to set up my second guest (also 8.04LTS). For some reason the auto configure was able to find the dhcp server this time around, though I changed it to static anyway after the install.

As far internal networking goes, I've got it up and running now and it seems fine, but there were a few hitches along the way. First is that the manual seems to be a bit confusing if not self-contradictory. On page 88:
Internal networks are created automatically as needed, i.e. there is no central configuration. Every internal network is identified simply by its name. Once there is more than one active virtual network card with the same internal network ID, the VirtualBox support driver will automatically “wire” the cards and act as a network switch.
Except it doesn't actually set up the internal network automatically. I assumed that's what this meant, which would result in the network with the default name of "intnet" already set to go. (Since both guests have eth1 set to internal networking.) But that's not the case--i needed to use the "dhcpserver" command (pg 125) to set up the network.

Also, I'm not sure if it's because I didn't set the network up until after the 2 VMs were installed, but I had to manually add the entry for eth1 (the card connected to the internal network) in /etc/network/interfaces. And once I set them to get static IPs, I got an error on both once I restarted the networking interfaces -- "SIOCDELRT: No such process." I looked around a bit and found one page that suggested I might have a problem with the broadcast address, but I double checked and found that I was setting it to what it got automatically from the vbox dhcp server anyway (10.0.0.255). I don't know what I'm missing, but the two guests are able to ping each other over the internal network. I don't like having unknown errors, but if it ain't broke, don't fix it...

If anyone has any ideas on that let me know though.
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: Notes on CLI installation of a VM on Ubuntu-8.04

Post by Sasquatch »

The whole point about Internal Networking is that you have to do the same as with a home network connected to a hub or switch, without a router or DHCP server. I haven't heard about a DHCP server being available from VB for the Internal Network option. If you enabled it somehow, please disable it and stick to static addresses like you've done for the bridged adapters. Use a range that is not the same as your bridged network, but you already know that. You don't need to set a broadcast address to make it all work, I don't have one set on my Host and it still has full network options. If you leave it out, it will be configured automatically.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
baf
Volunteer
Posts: 829
Joined: 27. Sep 2008, 06:18
Primary OS: Mac OS X Leopard
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: linux,xp,win7
Location: Luleå or Skellefteå, Sweden

Re: Notes on CLI installation of a VM on Ubuntu-8.04

Post by baf »

"SIOCDELRT: No such process." Just means that there was no default route when it was tried to remove it. So don't care.
Oh and you should not have a gateway defined on the internal net.
Some say: "You learn as long as you live".
My way: "You live as long as you learn".
wikiterra
Posts: 3
Joined: 9. Aug 2009, 03:49
Primary OS: Ubuntu 8.04
VBox Version: OSE Debian
Guest OSses: ubuntu 8.04

Re: Notes on CLI installation of a VM on Ubuntu-8.04

Post by wikiterra »

@Sasquatch

From the user manual (pg 125):
The “dhcpserver” commands allow you to control the DHCP server that is built into VirtualBox. You may find this useful when using internal or host-only networking.
Before I used that command to configure and enable the internal network ("intnet"), eth1 on both guests wasn't working. I don't know if I did something wrong during the installation of the guests, but that's just how it was for me. Also I am using static ip addresses on the 10.0.0.* network. And I'll disable the setting for the broadcast address as per your suggestion.

@baf

Thanks, that helped. Once I disabled the gateway setting and restarted the net interfaces I didn't get that error.
Post Reply