mounting VDI files on centos guest, ubuntu host (newbie)

Discussions related to using VirtualBox on Linux hosts.
Post Reply
LittlDo
Posts: 3
Joined: 12. Jun 2013, 00:22

mounting VDI files on centos guest, ubuntu host (newbie)

Post by LittlDo »

Hi,
apologies in advance if I'm posting to the wrong place. I've spent better part of a day trying to understand how to mount vdi files to my virtual machine. It's so confusing for a newbie with so many sites/comments/versions.

I'm running ubuntu 12.0.4 as host, centos 6 as guest os.
No problems getting the vm configured with 1 vdi and installing centos.
now I want to add additional vdi (each on their own physical disk drive) for multiple file systems.

I've created and added the vdi files to the vm settings thru the VB manager|storage. so under the sata controller I have 5 vdi's listed. the base vm, and 1 for each of the additional vdi's

searching for how to mount the vdi files I found ....how-to-mount-virtualbox-vdi-image/
I run into a problem when I can't find the nbd module
I have qemu-kvm installed successfully. but it looks like nbd isn't installed
other attempts of using yum to install nbd fail. yum install nbd , yum install qemu-common, etc.

I found this posting for installing nbd on centos
../en/2012/08/21/how-to-install-nbd-on-centos/
it points to the rpm repository where the ndb module resides. but no instructions on how to load

then I found
.../centos-6-rhel-6/epel-x86_64/nbd-2.9.20-7.el6.x86_64.rpm.html
it says
Download the latest epel-release rpm from .../pub/epel/6/x86_64/
Install epel-release rpm: # rpm -Uvh epel-release*rpm
Install nbd rpm package: # yum install nbd

it doesn't quite say how to download the file. but entering the literal command on the centos guest, I get 'No such file'
I'm familar with wget, so I tried that and got excited, but it only downloaded the index files

looking for instructions about how to download files I found a package to add a downloadonly option.
then I realized I could use the shared folder. so I downloaded the .rpm to the host. put the file in the shared folder and I can now see the rpm in the guest.
but how do I install the rpm.
I tried
rpm -Uvh nbd-2.9.20-2...rpm
I get a warning NOKEY
and package already installed.
then um install nbd -- nothing to do
modprobe ndb -- module nbd not found.
GRIRR

I must be doing something wrong. I'm so far down the rabbit hole.

Is using more than 1 VDI so strange?

Someone please take pitty on me. please
:)

doug
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: mounting VDI files on centos guest, ubuntu host (newbie)

Post by mpack »

You dont need to "mount" vdi files in the guest OS. You just create the virtual machine, specifying what hd size you want. Don't worry about what that consists of on the host.
LittlDo
Posts: 3
Joined: 12. Jun 2013, 00:22

Re: mounting VDI files on centos guest, ubuntu host (newbie)

Post by LittlDo »

but I want to have multiple file systems on different disks within the vm.

I created the primary vdi/vhd, specifying the size and started the machine.

are you saying that I can only have 1 VDI file connected to a vm?
noteirak
Site Moderator
Posts: 5229
Joined: 13. Jan 2012, 11:14
Primary OS: Debian other
VBox Version: OSE Debian
Guest OSses: Debian, Win 2k8, Win 7
Contact:

Re: mounting VDI files on centos guest, ubuntu host (newbie)

Post by noteirak »

In the VM settings, go into the Storage section, and in the middle you'll see the different controllers. Simply attach your VDIs to your SATA/IDE controller.
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
LittlDo
Posts: 3
Joined: 12. Jun 2013, 00:22

Re: mounting VDI files on centos guest, ubuntu host (newbie)

Post by LittlDo »

I did that.
how to I see the devices then from the guest os. they are listed in fdisk -l, but I'm unable to mount them.
noteirak
Site Moderator
Posts: 5229
Joined: 13. Jan 2012, 11:14
Primary OS: Debian other
VBox Version: OSE Debian
Guest OSses: Debian, Win 2k8, Win 7
Contact:

Re: mounting VDI files on centos guest, ubuntu host (newbie)

Post by noteirak »

The devices are just simulated hard drives. You still need to create partitions in them, format, etc.
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
Post Reply