Re: [opensuse] A Quick Start - VirtualBox Howto



Alexey Eremenko escribío:
On Feb 8, 2008 11:07 AM, David C. Rankin <drankinatty@xxxxxxxxxxxxxxxxxx> wrote:
Listmates,

Just had my first experience with XP running in VirtualBox and
...wow... this is the greatest thing since sliced bread. Most all of the
following information was taken from the VirtualBox help file provided
in /usr/share/doc/packages/VirtualBox. Here is a quick howto I put
together while installing and configuring virtualbox. I hope you find it
useful:


Pre-Install:

(1) If you would like to take a look at the user manual before taking
the plunge, grab it here:

wget http://www.virtualbox.org/download/UserManual.pdf

Install:

(1) If you have installed vbox OSE, Remove remove it and download the
binary SuSE rpm from VirtualBox (for both 10.2 and 10.3). The openSuSE
vb will work fine, but the binary from virtualbox provides a few
additional features.

Software Management to remove OSE; or
sudo rpm -e $(rpm -qa | grep virtual)

(2) Check/Install pam-devel

sudo zypper in pam-devel

(3) Download the vb binary from the virtualbox web site for usb
functionality

wget
http://www.virtualbox.org/download/1.5.4/VirtualBox-1.5.4_27034_openSUSE103-1.i586.rpm

(4) Install vb

sudo rpm -Uvh VirtualBox-1.5.4_27034_openSUSE103-1.i586.rpm

The kernel modules are automatically built by: /etc/init.d/vboxdrv setup

Post Install:

(1) 20:07 Rankin-P35a~> sudo modprobe vboxdrv

(2) Edit your /etc/group file and add yourself to the vboxusers group or
use Yast->Group Management to do the same thing.

20:14 Rankin-P35a~> grep vbox /etc/group
vboxusers:x:113:david

(3)

Starting VirtualBox and Setting up your First Virtual Machine:

(1) Start vb from:

the start menu "System->Emulator->innotek VirtualBox" or;

the commandline with "VirtualBox"

(2) Create your first virtual machine by choosing "New" from the menu bar

(3) Follow the prompts to allocate RAM and the virtual hard disk space
for your guest OS. For windows XP as a guest OS 512M of RAM and 10G of
virtual hard disk space is sufficient. You can get away with 384M of ram
and still have a fast virtual machine, just don't go crazy with
simultaneous applications. To see what you can spare, from a console,
check your available ram with "free -tm" and disk free space with "df -h")

Note: the RAM allocated is taken away from your Host OS (openSuSE)
while the guest OS is running. So if your total RAM is 1G and you
allocate 512M for your guest OS, that leaves you only 512M for your
original host OS.

Also Note: the virtual hard disk space is allocated by default under
your home directory which places the virtual disk on your /home
parition. This is a good thing since under the default openSuSE install
your /home partition has the greatest amount of disk space.

Laptop Note: by default vb assigns the "right control" key as the
"hostkey" that is used to transfer keyboard and mouse control to and
from the virtual machine when it is running. Many laptops do not have a
"right control" key. In vb under File->Preferences, you can easily set
the hostkey to the "right alt" key which is a good logical replacement.

Installing Windowx XP as the guest OS:

You can either install XP using the install cd or you can create and
.iso file from the cd and mount the image as the cd drive for installing
XP. The benifit of installing from the .iso image is that file transfer
rates are much better than reading from the actual cd and allows the XP
install to be completed in as little as 10 minutes instead of the usual
40-60 minutes. To create the iso, simply use dd. (example dd
if=/dev/cdrom of=~/win_install_disk.iso) You can then mount the iso
directly as the cdrom seen by the gues machine. Installing XP is the
same as the regular install:

(1) Just pop the cd in your drive or select the .iso to mount as the cd
drive.

(2) Press "Start" to boot the guest os and start the install, continue
as usual.

(3) Configure Windows to your liking;

Installing the VirtualBox "guest additions"

Install VBoxGuestAdditions.iso which contains the additions that
integrate the host and guest mouse and provide virtual display drivers
that allow you to resize your guest window to virtually any size. The
iso is located in: /usr/share/virtualbox/VBoxGuestAdditions.iso

(1) use the "Devices" menu to Mount CD/DVD-ROM and then navigate to and
select the /usr/share/virtualbox/VBoxGuestAdditions.iso file. The
installer will automatically run if you have autoload enabled, if not go
the cdrom and run setup.exe

(2) After the install has completed shutdown and restart your guest os
and you will have all of the additional mouse/keyboard and display
additions. (they are cool) If for some reason the driver install hangs
on your hardware, just use the "Machine Menu" and "Reset" the guest os.
The changes will take effect on restart.

Thats it! I have been running virtualbox for a couple of days XP,
Quickbooks Pro all work great! No rebooting ever just to get to the
accounting software now. A thanks to all that pointed me towards VirtualBox!


--

Hi David !

Since, you're both a SUSEr (SUSE user) and a Virtual Box user, you
will be glad to know, that I wrote a guide, and "pushed"
VirtualBox+Guide into openSUSE 10.3.

The guide can be found at:
http://forgeftp.novell.com/lfl/.html/virtualbox.html
-or- It is available offline for openSUSE 10.3 users:
Install: "lessons4lizards.rpm", then do: Start->Help->Lessons for
Lizard->VirtualBox

So, instead of writing from scratch, we could sit together, and update
the guide.


Nice guide!

I've used a startup script to enable the tap interfaces. I'm passing it along for yet another way of doing the bridging. I use static addresses and I turn on ip_forwarding in my firewall.

#! /bin/bash
# Linux static host networking interface initialization
#

# chkconfig: 35 30 60
# description: permanent host networking setup
#
### BEGIN INIT INFO
# Provides: tapnet
# Required-Start: $network
# Required-Stop:
# Default-Start: 3 5
# Default-Stop:
# Description: permanent host networking setup
### END INIT INFO

PATH=$PATH:/bin:/sbin:/usr/sbin
TAPDEV="/dev/net/tun"

. /etc/init.d/functions

fail_msg() {
echo_failure
echo
}

succ_msg() {
echo_success
echo
}

begin() {
echo -n "$1"
}

fail() {
fail_msg
echo "($1)"
exit 1
}

running() {
NAME=$1
ip link show | grep ": $NAME" | while read L; do
OIFS=$IFS
IFS=" :"
set $L
IFS=$OIFS
echo $2
done
}

start() {
interface=$(running tap0)

if [ -z "$interface" ]; then
openvpn --mktun --dev tap0
ip link set up dev tap0

ip addr add 192.168.89.1/24 dev tap0
ip route add 192.168.89.0/24 dev tap0

# From a security perspective, I think it makes
# sense to remove this, and have users who need
# it explictly enable in their --up scripts or
# firewall setups.

#echo 1 > /proc/sys/net/ipv4/ip_forward

fi

}

stop() {
interface=$(running tap0)

if [ -z "$interface" ]; then
ip link set down dev tap0
openvpn --rmtun --dev tap0
fi

}


restart() {
stop_network && start_network
}

status() {
if running tap0; then
echo "tap networking is loaded."
else
echo "tap networking is not loaded."
fi
}

case "$1" in
start)
start
;;
stop)
stop
;;
restart)
restart
;;
status)
status
;;
*)
echo "Usage: `basename $0` {start|stop|restart|status}"
exit 1
esac

exit


--
Brian Millett - [ Sheridan and Kosh, "Hunter, Prey"]
"What do you want?"
'Never ask that question.'

--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx



Relevant Pages

  • Re: [opensuse] Info : VirtualBox Tutorial
    ... Here are some of the virtualbox notes I have squirreled away. ... For x86_64 installations, you must also install: ... For windows XP as a guest OS 512M of RAM and 10G of virtual hard disk ... Configuring openSuSE 10.3 for USB support in Virtualbox ...
    (SuSE)
  • [opensuse] A Quick Start - VirtualBox Howto
    ... Most all of the following information was taken from the VirtualBox help file provided in /usr/share/doc/packages/VirtualBox. ... Post Install: ... Starting VirtualBox and Setting up your First Virtual Machine: ... For windows XP as a guest OS 512M of RAM and 10G of virtual hard disk space is sufficient. ...
    (SuSE)
  • Re: Does anyone run Open Solaris under VirtualBox?
    ... VirtualBox provides its own virtual ... NIC with DHCP for the guest. ... I just enabled NWAM with SVCADM and it brought up the connection. ... delete your current guest and install from the ...
    (comp.unix.solaris)
  • Re: Installing XP-Pro
    ... Install XP in a virtual machine. ... as a dual boot along with the Vista that it came with. ... The disk spins, various programs are read from it ok, and then when it ... A similar program is VirtualBox. ...
    (microsoft.public.windowsxp.basics)
  • Re: ubuntu-users Digest, Vol 45, Issue 231
    ... Hi, Steve, I have installed virtualbox, now I can't load winXP as a guest ... I think Ubuntu can be a Windows competitor soon... ... Re: New install. ... The system has 2 465 gig drives attached to an HP Nvidia RAID ...
    (Ubuntu)