Can't get VirtualBox to work. (ABANDONED)

Browsed around and found that Linux Mint 13 comes with VirtualBox.

Ran “sudo apt-get install virtualbox” in the terminal and followed what happened. Relevant info (AFIK): -

The following packages will be REMOVED
virtualbox-4.1 virtualbox-nonfree
The following NEW packages will be installed
libgsoap1 virtualbox virtualbox-dkms virtualbox-qt
0 upgraded, 4 newly installed, 2 to remove and 56 not upgraded.

Halfway down it reported: -

* No suitable module for running kernel found
[fail]

and the final lines were: -

"[i]DKMS: install completed.

  • Stopping VirtualBox kernel modules [ OK ]
  • Starting VirtualBox kernel modules [ OK ]
    Setting up virtualbox-qt (4.1.12-dfsg-2ubuntu0.1) …
    Processing triggers for libc-bin …
    ldconfig deferred processing now taking place[/i]"

However…when I run VirtualBox(Menu/Accessories/VirtualBox) and try to [Start] it I get: -

“FATAL: No bootable medium found! System halted.”

If I catch the [F12] I am offered: -

[i] "VirtualBox temporary boot device selection

Detected Hard disks:

IDE controller:

  1. Primary Master

Other boot devices:
f) Floppy
c) CD-ROM
l) LAN

b) continue booting"[/i]

All of these (I tried my bootable XP64 disk in the CD drive) return exactly the same “FATAL…” message.

What have I not set up correctly? I would have expected VB to detect my WinXP64 drive, which is SATA not IDE. The IDE “Primary Master” is, I would suggest, my Linux boot disk. The [Files] icon finds all my drives without any problem.

I am now somewhat stumped. :frowning:

Tony N

And the reason you’re not using KVM with virt-manager … ? ( this also comes with and is generally a more robust solution)

Sent from my Nexus S using Tapatalk 2

Firstly there’s a reason people don’t just tell you to install Virtualbox through the package manager …

a) it won’t be the latest version
and
b) it will likely install the OSS version that doesn’t support things like USB pass through.

So the first thing you want to do is remove it:

sudo apt-get remove virtualbox

then

sudo apt-get autoremove

Now send the output from:

dpkg -l | grep virtualbox

Mad Penguins suggestion -

KVM requires hardware acceleration, so won’t work with all CPU’s … but there’s an easy way to find out if your CPU supports everything KVM requires.

run:

sudo apt-get install cpu-checker

now what is the output from:

sudo kvm-ok

Send the output from those, and we’ll go from there :slight_smile:

Done

then
sudo apt-get autoremove

Done

Now send the output from:
dpkg -l | grep virtualbox

Output (grep)=

rc virtualbox 4.1.12-dfsg-2ubuntu0.1 x86 virtualization solution - base binaries
rc virtualbox-4.1 4.1.12-77245~Ubuntu~precise Oracle VM VirtualBox
ii virtualbox-guest-dkms 4.1.12-dfsg-2ubuntu0.1 x86 virtualization solution - guest addition module source for dkms
ii virtualbox-guest-utils 4.1.12-dfsg-2ubuntu0.1 x86 virtualization solution - non-X11 guest utilities
ii virtualbox-guest-x11 4.1.12-dfsg-2ubuntu0.1 x86 virtualization solution - X11 guest utilities
rc virtualbox-qt 4.1.12-dfsg-2ubuntu0.1 x86 virtualization solution - Qt based user interface


[b][u]Mad Penguins suggestion[/u][/b] -

KVM requires hardware acceleration, so won’t work with all CPU’s … but there’s an easy way to find out if your CPU supports everything KVM requires.

run:

sudo apt-get install cpu-checker

Output (cpu chk)=

Reading package lists… Done
Building dependency tree
Reading state information… Done
The following extra packages will be installed:
msr-tools
The following NEW packages will be installed
cpu-checker msr-tools
0 upgraded, 2 newly installed, 0 to remove and 56 not upgraded.
Need to get 15.6 kB of archives.
After this operation, 123 kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://archive.ubuntu.com/ubuntu/ precise/main msr-tools amd64 1.2-3 [9,052 B]
Get:2 http://archive.ubuntu.com/ubuntu/ precise/main cpu-checker amd64 0.7-0ubuntu1 [6,538 B]
Fetched 15.6 kB in 0s (84.7 kB/s)
Selecting previously unselected package msr-tools.
(Reading database … 171678 files and directories currently installed.)
Unpacking msr-tools (from …/msr-tools_1.2-3_amd64.deb) …
Selecting previously unselected package cpu-checker.
Unpacking cpu-checker (from …/cpu-checker_0.7-0ubuntu1_amd64.deb) …
Processing triggers for man-db …
Setting up msr-tools (1.2-3) …
Setting up cpu-checker (0.7-0ubuntu1) …

now what is the output from:
sudo kvm-ok

Output (kvm)=

INFO: /dev/kvm does not exist
HINT: sudo modprobe kvm_amd
INFO: Your CPU supports KVM extensions
KVM acceleration can be used


Send the output from those, and we'll go from there :)

Mark to the rescue - again!

Thanks mate,

Tony N

P.S. Please note, I have finally sorted out the “quote-unquote” procedure.

You might also find KVM is “fractionally” quicker, esp. on IO for anything supporting virtio drivers. (which is pretty much everything bar Centos)

OK, looks like you’re good to go with KVM/virt-manager :slight_smile:

I must explain that I’m new to this approach myself, so we’ll be finding our way through it together … but as MP says (if your hardware supports it) it’s probably a better solution.

OK, let’s install kvm and virt-manager:

sudo apt-get install kvm virt-manager

Now lets’ check if you’re in the kvm group …

REBOOT (not sure if this is necessary, but won’t hurt)

Now send the output from:

groups

and

kvm

Done

Now lets' check if you're in the kvm group ..

REBOOT (not sure if this is necessary, but won’t hurt)

Now send the output from:

groups

Output=“tony adm cdrom sudo dip plugdev lpadmin sambashare”

and
kvm

Output=(relevant details after )
window headed QEMU


Booting from ROM…
iPXE (PCI 00:03.0) starting execution…ok
iPXE initialising devices…ok

iPXE 1.0.0+ – Open Source Network Boot Firmware – http://ipxe.org
Features: HTTP iSCSI DMS TFTP AoE bzImage COMBOOT ELF MBOOT PXE PXEXT

net0 52:54 blah, blah, blah to

Nothing to boot: no such file or directory (iPXE - open source boot firmware [err:2d03e1])
No more network devices

Booting from Hard Disk…
Boot failed: could not read the boot disk

Booting from Floppy…
Boot failed: etc

No bootable device


This window was not ‘active’ so I couldn’t copy it.
Not sure what it was trying to boot, “kvm” or “WinXP”

I put a bootable floppy in the Floppy drive and got a similar result, except that after the “Features” line I got a prompt: -

“iPXE>”

The mouse was not active in this window, but the keyboard was. I typed in “help” and got a list of 38 acceptable commands, some of which were similar to DOS commands, but most of which were new to me.

Typing “exit” did take me out of that window, but resulted in the window as above.

As I had seen, after typing “exit”, an attempt to boot from CDROM, I put my bootable XP64 disk in the drive and re-ran the “exit” command, but it didn’t ‘see’ the CDROM drive as bootable.

Over to the experts.

Tony N

Type “virt-manager”

Sent from my Nexus S using Tapatalk 2

Hi Mad Penguin,

did that, and got this: -


Virtual Machine Connection Failure

Unable to connect to libvirt:

Failed to connect socket to ‘/var/run/libvirt/libvirt-sock’: Permission denied

Verify that:

  • The ‘libvirt-bin’ package is installed
  • The ‘libvirtd’ daemon has been started
  • You are member of the ‘libvirtd’ group

When I entered “sudo apt install libvirt” I got: - “E: Unable to locate package libvirt”.

When I entered “groups” I got: - “tony adm cdrom sudo dip plugdev lpadmin sambashare”.

It would seem that I’m not a member. How do I join? Please?

Tony N

OK, the “Users and Groups” GUI application may not be installed by default in 12.04/12.10, so run:

sudo apt-get install gnome-system-tools

Now fire up “Users and Groups” … then click “Manage Groups” … scroll down to “libvirtd”, and double-click it … in the resulting “Group ‘libvirtd’ Properties” dialog box, make sure your username is ticked … click “OK” … close the other dialog boxes that are still open.

REBOOT.

when rebooted, run:

groups

and post the output.

also try:

virt-manager

Yeah, what Mark said … :slight_smile:

To find out why, do ls -la on the file it says you don’t have permission to access, i.e;

# ls -la /var/run/libvirt/libvirt-sock
srwxrwx--- 1 root libvirtd 0 Nov  9 12:13 /var/run/libvirt/libvirt-sock

Note from this, full access is available to “root” and to anyone in the “libvirtd” group.
As you want to run virt-manager as a user, and as the program seems to need access to this file, your only option is to join the group … :slight_smile:

When the GUI appears, add a connection to “localhost” (all default settings once you select “connect”) and you should then see an option to add a new VM. What you will need is an ISO image of the CD you want to install from … for example, RIP a copy of Ubuntu 12.04 and store the image in /var/lib/libvirt/images as ubuntu_12.04.iso, then when you come to add a VM it should let you select this as the “ISO” to install from.

Slight problem, I don’t seem to have “Users and Groups” and therefore not “Manage Groups”.

If I enter “users” in the terminal I just get “tony tony”, “groups” gives the same as before.

Perhaps it’s a different name, or route, in Mint from Ubuntu?

Tony N

Open a terminal and run:

users-admin

That should fire up “Users and Groups”.

Yes, thanks Mark. That did the business as far adding “libvirtd” to my “groups” which now read: -

“tony adm cdrom sudo dip plugdev lpadmin sambashare libvirtd”

Only problem now is, I don’t really know how to use it. “virt-manager” brings up the “Virtual Machine Manager” window, but I’ve no idea where I go from there.

New VM (“Create a new virtual machine”) offers an option “Import existing disk image” which I think is probably what I would like to do, but would that import the OS from my WinXP64 drive, or just the app I want to run?

I’m there, but now I am I’m even more confused.

Tony N

NO, it won’t import an already installed OS … it will only import a VM disk image (say from another PC).

What are you trying to do exactly ? … install XP in a VM ?

Well Mark, that was my original idea. I was hoping that whatever was installed in a VM would be there the next time I opened it. I suppose the problem is in my lack of understanding as to exactly what is a VM, and how it works.

Does it install on a hard drive partition? If so, does the partition have to be on the hard drive that has Linux installed or can it be on a different drive? If it doesn’t create a partition for itself do I need to create it?

I had a look at the libvirt.org site, but that only served to confuse me even more.

I’m beginning to wonder whether I might be better off running as much of my everyday stuff as possible, email, office etc., under Linux and, when I have design work to do, re-booting into Windows.

Tony N

No it doesn’t require a partition … virtual machines are stored as files on the host PC.

I'm beginning to wonder whether I might be better off running as much of my everyday stuff as possible, email, office etc., under Linux and, when I have design work to do, re-booting into Windows.

Maybe … if you didn’t have hardware acceleration I’d agree with you … I’d certainly agree you should use Linux native apps where possible, but it may be worth cheecking out a VM for your CAD (?) apps, just to see how they run, as it would mean you don’t have to reboot.

Do you know how to create an ISO image of your XP installation CD ?

Actually - no. I’m sure that would be a help. But having said that, there have been a lot of updates to XP since my installation CD was created. Would I be able to update the VM file created from the ISO, created from my installation CD?

No it doesn't require a partition .. virtual machines are stored as files on the host PC.

Can I choose the location of the VM files?

it may be worth checking out a VM for your CAD (?) apps, just to see how they run, as it would mean you don't have to reboot.

Are you saying here that a VM file is ‘app’ specific? If this is the case where does the VM find the OS?

Tony N

Are you saying here that a VM file is 'app' specific? If this is the case where does the VM find the OS?

NO … a VM is exactly what it sounds like, it is a Virtual PC, as far as the guest OS and software is concerned it is being loaded onto a “physical” PC … but you can start and stop the virtual PC from within the Host OS … make sense ?

there have been a lot of updates to XP since my installation CD was created. Would I be able to update the VM file created from the ISO, created from my installation CD?

You should be able to update the Windows “guest” OS as though it was running on a “physical” PC … that said, XP is not as straight forward to update as it used to be.

Can I choose the location of the VM files?

Most likely … you can in Virtualbox, so I’d be surprised if you can’t in virt-manager.


OK, now to create an ISO image of your XP installation CD …

I’m going to assume you have Brasero installed … if so -

First, insert the disc from which you want to make an ISO image. Wait until, and make sure, an icon for the disc appears on your desktop, indicating the disc has been read and mounted.

Next, open Brasero and select the Disc Copy function.

On the Copy CD/DVD dialog, change Select a disc to write to to ISO by clicking on the drop-down itself (not the properties button) and choosing Image file.

Click the Properties button and choose a name (such as WinXP.iso) and location for the output ISO image and then click Close.

Verify your settings and then click Start copy.

Mad Penguin suggests the ISO image should be stored at /var/lib/libvirt/images but if it won’t let you create it there, just create it in your Home folder and we’ll move it later.


Another option would be -

dd if=/dev/sr0 of=/path/to/where/you/want/to/save/WinXP.iso

where -
/dev/sr0 = your CD drive

But I wouldn’t advise using “dd” if you’re not comfortable with the command line :wink:


Another option would be to install and use AcetoneISO … then use the “Generate ISO from CD/DVD” option … see the pic here: