Author Topic: Vbox installation - Unusual question  (Read 1053 times)

Offline Xenaflux

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3834
Vbox installation - Unusual question
« on: March 14, 2012, 08:58:26 PM »
First things first.
I have both Firefox and Thunderbird installed on /mnt/data/xxxxx
This means I can access them from any OS I install on my HD

Second.
Question:
Is there a way I can achieve the same with Virtualbox ? ( install or move to /mnt/data/Vboks )

A--install as " per my desire " is not possible.
B--Move it and change some files manually ....yes - no ?
c--Other ( whatever crosses your mind )

I think you got the idea.
I searched both the web and forum ( stopped as I got only results referring to different OS in one Vb )
I searched their website...no results....but very possible I entered the wrong Keywords

Please note : I am aware of making backups / export / import and all that.

Thanks for your time

Xena
« Last Edit: March 16, 2012, 07:34:12 PM by Xenaflux »
The great thing in this world is not so much where we stand,
as in what direction we are moving.
                                                    (Oliver Wendell Holmes )

Offline Xenaflux

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3834
Re: Vbox installation - Unusual question
« Reply #1 on: March 14, 2012, 09:33:19 PM »
Would this one be helpful ?
or
Is this going to be a mess/disaster

http://www.virtualbox.org/manual/ch02.html#idp5540784

copy and paste for your convenience

Performing a manual installation

If, for any reason, you cannot use the shell script installer described previously, you can also perform a manual installation. Invoke the installer like this:

./VirtualBox.run --keep --noexec

This will unpack all the files needed for installation in the directory install under the current directory. The VirtualBox application files are contained in VirtualBox.tar.bz2 which you can unpack to any directory on your system. For example:

sudo mkdir /opt/VirtualBox
sudo tar jxf ./install/VirtualBox.tar.bz2 -C /opt/VirtualBox

or as root:

mkdir /opt/VirtualBox
tar jxf ./install/VirtualBox.tar.bz2 -C /opt/VirtualBox

The sources for VirtualBox's kernel module are provided in the src directory. To build the module, change to the directory and issue

make

If everything builds correctly, issue the following command to install the module to the appropriate module directory:

sudo make install

In case you do not have sudo, switch the user account to root and perform

make install

The VirtualBox kernel module needs a device node to operate. The above make command will tell you how to create the device node, depending on your Linux system. The procedure is slightly different for a classical Linux setup with a /dev directory, a system with the now deprecated devfs and a modern Linux system with udev.

On certain Linux distributions, you might experience difficulties building the module. You will have to analyze the error messages from the build system to diagnose the cause of the problems. In general, make sure that the correct Linux kernel sources are used for the build process.

Note that the /dev/vboxdrv kernel module device node must be owned by root:root and must be read/writable only for the user.

Next, you will have to install the system initialization script for the kernel module:

cp /opt/VirtualBox/vboxdrv.sh /etc/init.d/vboxdrv

(assuming you installed VirtualBox to the /opt/VirtualBox directory) and activate the initialization script using the right method for your distribution. You should create VirtualBox's configuration file:

mkdir /etc/vbox
echo INSTALL_DIR=/opt/VirtualBox > /etc/vbox/vbox.cfg

and, for convenience, create the following symbolic links:

ln -sf /opt/VirtualBox/VBox.sh /usr/bin/VirtualBox
ln -sf /opt/VirtualBox/VBox.sh /usr/bin/VBoxManage
ln -sf /opt/VirtualBox/VBox.sh /usr/bin/VBoxHeadless
ln -sf /opt/VirtualBox/VBox.sh /usr/bin/VBoxSDL
The great thing in this world is not so much where we stand,
as in what direction we are moving.
                                                    (Oliver Wendell Holmes )

Offline JALU

  • Sr. Member
  • ****
  • Posts: 455
  • Just Another Linux User
Re: Vbox installation - Unusual question
« Reply #2 on: March 14, 2012, 10:17:52 PM »
I'm not sure of your question Xena...
Are you intending to install Virtual Box on many OS's but use the same xxxx.vdi file located on a data partition?
Cages

Offline Xenaflux

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3834
Re: Vbox installation - Unusual question
« Reply #3 on: March 14, 2012, 10:27:11 PM »
yes, that is what I intend

example
sda5........PClinuxOS-kde4-test
sda6........PClinuxOS-kde4-daily use
sda7------PClinuxOS-FullMonty
sda8........PClinuxOS-XFCE
sda9........PClinuxOS-LXDE
sda10......Mint-kde
sda11......Fedora231

Use ONE VDI for all of them

5 to 9 could be possible
10 and 11 could//will create problems
The great thing in this world is not so much where we stand,
as in what direction we are moving.
                                                    (Oliver Wendell Holmes )

Offline JALU

  • Sr. Member
  • ****
  • Posts: 455
  • Just Another Linux User
Re: Vbox installation - Unusual question
« Reply #4 on: March 14, 2012, 10:49:46 PM »
Xena,
Did you consider tweaking  ~/.VirtualBox/VirtualBox.xml and path the control files in ~/VirtualBox + the xxxx.vdi to the data partition?

Offline Xenaflux

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3834
Re: Vbox installation - Unusual question
« Reply #5 on: March 15, 2012, 12:02:24 AM »
considered.....yes
looked for....yes
found.....no

thanks, I will give this a go.
but my Q is, will this be enough  ?

I have a question:
Say, I install in sda5 ( kde4 ) ...change path  .... works OK
Say, I install in sda6 ( xfce ).....change path.....works OK

Then KDE4 updates " Certain files " but Sproggy decides that this update is not necessary for XFCE

Where do I stand then ?
Of course, I could just go ahead and try, but I like to know as much as possible before hand
The great thing in this world is not so much where we stand,
as in what direction we are moving.
                                                    (Oliver Wendell Holmes )

Offline kjpetrie

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3996
Re: Vbox installation - Unusual question
« Reply #6 on: March 15, 2012, 05:37:09 AM »
Moving all your machine files to a directory in /mnt/data/ and replacing ~/Virtualbox VMs with a symbolic link to it should allow you to open them in any OS, providing you are careful with ownership and permissions.

You would still need to install VB in each distro.
« Last Edit: March 15, 2012, 05:39:46 AM by kjpetrie »
-----------
KJP
-----------------------------------------------------------
PClos64 RC1 on Intel D945GCLF2 motherboard (Atom 330), 2GB DDR2 RAM, Maxtor STM325031, HL-DT-ST DVDRAM GSA-H42N, Amilo LSL 3220T monitor. Also Acer 5810TG (with custom kernel) and Asus eeePC 2G surf

Offline Xenaflux

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3834
Re: Vbox installation - Unusual question
« Reply #7 on: March 15, 2012, 05:49:46 AM »
Quote
Moving all your machine files to a directory in /mnt/data/ and replacing ~/Virtualbox VMs

OK, ...a question
Would there be any difference between " Moving"   and   " copying " ?
( yes, I realize moving is copy and delete, but.... )

And I read something like each install having a unique "something"-number

If this is true, and do 2 installs, I will have 2 different tnumbers.
Unless the calculation is based on same hardware . If calculation is based on sda5 or sda6, where/how do I change

Of course, if this is not so, so much the better,
The great thing in this world is not so much where we stand,
as in what direction we are moving.
                                                    (Oliver Wendell Holmes )

Offline kjpetrie

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3996
Re: Vbox installation - Unusual question
« Reply #8 on: March 15, 2012, 11:35:34 AM »
Moving to a new partition is done by copying and deleting. Moving within a partition is done by renaming the hard link, so in this case, you can do it either way as the result will be the same.

Every virtual disc file has a unique UUID, which can cause problems if you copy the files and try to attach both to machines in the same VB install. I have never had any problem mounting my VM partition and opening machines.

It is important that whole machines are stored on this partition (not just the main disc files as used to be the default a few years ago - if you have any of these old machines you will have problems if you suspend them in one OS and start them in another!) and that the Guest Additions on any machine match the oldest version of VB it will be opened with. Otherwise it should just work.
-----------
KJP
-----------------------------------------------------------
PClos64 RC1 on Intel D945GCLF2 motherboard (Atom 330), 2GB DDR2 RAM, Maxtor STM325031, HL-DT-ST DVDRAM GSA-H42N, Amilo LSL 3220T monitor. Also Acer 5810TG (with custom kernel) and Asus eeePC 2G surf

Offline Xenaflux

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3834
Re: Vbox installation - Unusual question
« Reply #9 on: March 15, 2012, 07:31:51 PM »
Quote
It is important that whole machines are stored on this partition (not just the main disc files as used to be the default a few years ago - if you have any of these old machines you will have problems if you suspend them in one OS and start them in another!) and that the Guest Additions on any machine match the oldest version of VB it will be opened with. Otherwise it should just work

Thanks for the info.
For today I will rest this, as I only will have the occasional 3 minutes here and 2 minuted there for being with my computer.
Tomorrow I have free time and peace.

See you later
Thanks
Xena
The great thing in this world is not so much where we stand,
as in what direction we are moving.
                                                    (Oliver Wendell Holmes )

Offline djohnston

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 6227
  • I don't do Windows
Re: Vbox installation - Unusual question
« Reply #10 on: March 16, 2012, 02:17:32 AM »

It is important that whole machines are stored on this partition (not just the main disc files as used to be the default a few years ago - if you have any of these old machines you will have problems if you suspend them in one OS and start them in another!) and that the Guest Additions on any machine match the oldest version of VB it will be opened with. Otherwise it should just work.


@Xenaflux,

I sometimes reuse old archived virtual machines. In some cases, I've found the easiest method to start the thing up again is to copy or move the vdi file(s), (which are the VM disks). I'll then create a new VM in VirtualBox. When asked to create a new disk or use an existing one, I just point to the copied vdi.

There are some options that exist now, as well, that didn't exist in the past. For example, you can clone a machine by highlighting it, clicking on the Snapshots button in the right pane, then clicking the Clone button. That will give you a full working copy. You can also export and import appliances from the main File menu. But, as kjpetrie pointed out, you'll want to work with VMs that are in a powered off state. And, if there are any (back-in-time) snapshots of the VM, you'll want to copy the whole thing. The whole VMs are now stored in the ~/VirtualBox VMs folder, with each VM name having its own folder. The ~/.VirtualBox folder contains program settings only.

« Last Edit: March 16, 2012, 02:19:06 AM by djohnston »
Bare metal                           VBox
AMD Athlon 7750 Dual-Core    Single core
4GiB RAM                              1GiB RAM
nVidia GeForce FX 5200          64MB video
LXDE 32bit                            KDE 64bit

Registered Linux User #416378

Offline Xenaflux

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3834
Re: Vbox installation - Unusual question
« Reply #11 on: March 16, 2012, 02:53:35 AM »
Quote
@Xenaflux,

I sometimes reuse old archived virtual machines. In some cases, I've found the easiest method to start the thing up again is to copy or move the vdi file(s), (which are the VM disks). I'll then create a new VM in VirtualBox. When asked to create a new disk or use an existing one, I just point to the copied vdi.

There are some options that exist now, as well, that didn't exist in the past. For example, you can clone a machine by highlighting it, clicking on the Snapshots button in the right pane, then clicking the Clone button. That will give you a full working copy. You can also export and import appliances from the main File menu. But, as kjpetrie pointed out, you'll want to work with VMs that are in a powered off state. And, if there are any (back-in-time) snapshots of the VM, you'll want to copy the whole thing. The whole VMs are now stored in the ~/VirtualBox VMs folder, with each VM name having its own folder. The ~/.VirtualBox folder contains program settings only.

Thanks a lot.

I will have to look at the whole " thing " again tomorrow, and figure out for myself the difference what I really need and what I just want//like to have, and the efforts//potential problems that go with it.

Tomorrow, as today my house looks more like a 'Bar' than a classroom ( I teach at home too )

OK, thanks. See you manana
The great thing in this world is not so much where we stand,
as in what direction we are moving.
                                                    (Oliver Wendell Holmes )

Offline Xenaflux

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3834
Re: Vbox installation - Unusual question
« Reply #12 on: March 16, 2012, 08:14:13 PM »
OK guys
I have a 1000 word story, but will make it short.
I decided to start from scratch.
I have destroyed all but winxplegal-win7legal-win98legal-( as reinstalling and updating may give problems with registration )
I have a 32bit computer and a 64bit computer ( hardware wise)

On the 32 bit computer I will re-install those I need (pclos) and those I want ( ArtistX ---skole-linux----bio-linux and a few other educational ones )
I will go the way of making a full install, full update, and then Export (Distroxyz.ova )
Then, regardless in which distribution I use Virtualbox, regardless on which partition I install, and regardless on which piece of Harware I work,  I always can Import the one I need/want. From that point I will have to manage with clones, snapshots and backups
I do not foresee any problems here, as it is uncomplicated. Maybe a little more time and space consuming.

On the 64 bit computer, I will go the other way ( as original spoken of and received answer on )
I will see how it goes with using one VDI only, and use the advice/notes/opinion of auzziebob, kjpetrie and djohnston .
This will be a little more trial and error and time consuming, I guess, but I have to know it.

And most important....I have sworn to myself to read the manual, from A to Z. :o :o
Note: as for my individual needs , I can just make one install and be done with it.
But I am one of 5 people who have promised to help a financial crippled school ( for poor kids ) to setup and kick-start their " computer setup ". All hardware ( donated ) is from before 2010.
My part is -Virtualbox - a few pdf tools - Teamviewer - Disk burning - Diff-tools - few other small ones -  and if " that " teacher keeps smiling at me , I do Midi as well  ;D
I hope I didn't take on more than I can chew. But I have time till 30 April.

I will mark this tread as < closed > , not as 'solved'

Thanks to all of you
Xena
The great thing in this world is not so much where we stand,
as in what direction we are moving.
                                                    (Oliver Wendell Holmes )