I already described this method a couple times in several posts, and ** vboxlive** has its own dedicaded thread already (Running Linux live CDs in disk-less virtual machines under VirtualBox). But I think this short howto might save you (and us) some time. Unfortunately it will also reduce the amount of questions about installing VirtualBox posted in this forum … but it is the side effect of doing things straight correctly.
|
|
This thread is NOT about the best version of VirtualBox (Oracle or OSE) to use. So if you think that installing the virtualbox package from openSUSE Oss repo is the best choice for you, it’s perfectly fine. You might also be right (I don’t know). It’s just not the right thread to discuss it.|
Assuming you want or need to use Oracle VirtualBox, here’s the fastest and safest way to install and get it work.
- It is the fastest, because all you need to do is to type 4 commands and give the root password twice.
You don’t need to do anything else (and you should not). - It is the safest, because in case you don’t have the latest kernel, it will update the kernel in order to install the right kernel-devel package.
The reason is that if you don’t run the latest kernel and don’t have the devel package already installed, the one you need for your kernel won’t be available in repo anymore. Thus, in such a case, you’ll have to update the kernel to be able to compile kernel modules. Notice that vboxlive doesn’t care and just updates the kernel. atiupgrade does it in a more clever way and let you compile modules on another but the latest kernel, provided the matching kernel-devel is already installed. Well, I’m afraid things are getting complicated here. It was supposed to be a short and simple howto. So forget about this kernel module stuff. The purpose of this method is to take you straight to the goal. - And finally it is also the easiest, because it will create the vboxusers group and add the current user (you) to this group.
That’s why we don’t open a root shell (su - ) but use ‘sudo’ and finally execute the last command as normal user. Of course we could use ‘su -l’ to add the repo and install vmscripts as root. But we would have to ‘exit’ the root shell afterwards before running the last command, and it would require 6 commands instead or 4 … but, as already mentioned, it is intended to be the “fastest” method as well.
Now here’s all you have to type and all you have to know (it doesn’t mean that knowing more would hurt though):
$ sudo zypper ar http://download.opensuse.org/repositories/home:/please_try_again/openSUSE_12.2/ PTA
$ sudo zypper --gpg-auto-import-keys refresh -r PTA
$ sudo zypper -n in vmscripts
$ vboxlive --install
Here’s a screenshot of what it does on a fresh install. You can tell that it’s a fresh install because of the (non fatal) Mounting Media failed error message. It is still looking for the install DVD.
http://imageshack.us/a/img23/43/vboxlivesmall.png](http://imageshack.us/a/img805/2210/vboxlive.png)
If you originally intended to run any other Linux distro live CD in a virtual machine, you could also save time by doing it directly. In this case, you would replace the last command with this one:
$ vboxlive -o ubuntu -D
or that one
$ vboxlive -o fedora -D
or, of course, that one too:
$ vboxlive -o opensuse -D
or many other ones (the list can be displayed with vboxlive -g), and VirtualBox - if missing at this point - would just get installed automatically.
- Option -D means that the script is going to download the iso image. You only need to use it the first time. Listing (vboxlive -G) and downloading the iso images didn’t work (from the beginning) when the firewall was on … and I just discovered why and fixed the bug (see this post: Opensuse 12.1) You must not have been very many to use this option… or you just never complain. Anyway, it is fixed.
See the vboxlive thread for more info.