Author Topic: virtual storage disk?  (Read 1502 times)

Offline loudog

  • Sr. Member
  • ****
  • Posts: 399
virtual storage disk?
« on: May 05, 2012, 06:21:00 PM »
reading through the vbox manual i was looking for the way to create a vdi disk image that any windows guests and hosts could access, read write to. kind of like a shared folder but on the virtual disk level. ;) it did not appear that this could be done other than usung a virtual disk to start and run guests on :-\ but i think a seperate vdi for all to share info on would simplify things when you have many guest os's. ::)
Friends don't let friends boot windows

Offline 7272andy

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1628
  • UK MLU
Re: virtual storage disk?
« Reply #1 on: May 09, 2012, 07:29:31 AM »
You have 2 options:

  • Start Vbox, select a machine and click Settings -> Storage right click on the controller and select add hard disk then follow the prompts
  • Create a new virtual machine, once created navigate to the new directory and remove the machine files with the exception of the vdi file, now continue as above but use an existing disk

Regards
« Last Edit: May 09, 2012, 08:41:56 AM by 7272andy »


Bare Metal 1         Bare Metal 2
Intel Celeron 420M   Intel i5 540M
2GB Ram              4GB Ram
Intel 943GM          Radeon HD 5650 PCI Express
RT2573               RT2790
32bit KDE            32&64bit KDE

Offline pags

  • Hero Member
  • *****
  • Posts: 2519
  • Keep it clean.
Re: virtual storage disk?
« Reply #2 on: May 09, 2012, 08:13:28 AM »
Are you looking to create a VDI that all your VMs would access concurrently (at the same time)?  If so, that is a bad idea...use Shared Folders, instead.

If you're planning for them to have exclusive access (one at a time), then it would work fine (but, still Shared Folders, or running samba might be a better approach).

Offline GermanTux

  • Hero Member
  • *****
  • Posts: 693
Re: virtual storage disk?
« Reply #3 on: May 09, 2012, 10:59:45 AM »
If you want something that any local node can access, your best bet is to create a VDI (and I would recommend a secondary vdi), then share it through SAMBA.  This cannot really be done through VirtualBox or VMWare. 

Offline pags

  • Hero Member
  • *****
  • Posts: 2519
  • Keep it clean.
Re: virtual storage disk?
« Reply #4 on: May 09, 2012, 11:06:25 AM »
If you want something that any local node can access, your best bet is to create a VDI (and I would recommend a secondary vdi), then share it through SAMBA.  This cannot really be done through VirtualBox or VMWare. 

Why not just share a directory from your host OS through Samba, and remove the overhead of another VM?

Offline YouCanToo

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 5337
  • Location: Lebanon, OR., USA
    • Spreading the word.......
Re: virtual storage disk?
« Reply #5 on: May 09, 2012, 04:27:09 PM »
I have to agree, a shared directory would me much simpler, and a whole lot less of a hassle.




Be sure to visit the NEW Knowledge Base


Linux is user-friendly- it's just picky who its friends are!

Offline loudog

  • Sr. Member
  • ****
  • Posts: 399
Re: virtual storage disk?
« Reply #6 on: May 09, 2012, 07:48:52 PM »
i believe the use of shared folders will only work if  ::)
1) you have guest additions installed. (not avalivable for 98 or ME) :P
2) your network adapter is enabled.  :P

  i do not let my windows vm's access the internet >:( (why give myself all the headaches involved with that) ;D so now the reason to use a simple vdi to share between them all. ;)
 i will try the storage option and see how it works and post back, ;) ;) also i dont forsee the need to have many vm's accessing the storage vdi at the same time. :)
Friends don't let friends boot windows

Offline pags

  • Hero Member
  • *****
  • Posts: 2519
  • Keep it clean.
Re: virtual storage disk?
« Reply #7 on: May 10, 2012, 06:32:52 AM »
i believe the use of shared folders will only work if  ::)
1) you have guest additions installed. (not avalivable for 98 or ME) :P
2) your network adapter is enabled.  :P

  i do not let my windows vm's access the internet >:( (why give myself all the headaches involved with that) ;D so now the reason to use a simple vdi to share between them all. ;)
 i will try the storage option and see how it works and post back, ;) ;) also i dont forsee the need to have many vm's accessing the storage vdi at the same time. :)

If you install SAMBA on your host, and use the networking you would have to use anyway with the VDI solution, you don't need the shared folders, nor the guest additions (and win9x will be fine).  You can still exclude the VMs from accessing the Internet (host-only, I think...but that's off the top of my head...check the VirtualBox manual).

Offline GermanTux

  • Hero Member
  • *****
  • Posts: 693
Re: virtual storage disk?
« Reply #8 on: May 10, 2012, 09:18:20 AM »

Why not just share a directory from your host OS through Samba, and remove the overhead of another VM?

My understanding is that loudog wants to give access to the directory to more than one host.  I could be wrong though. 

Offline pags

  • Hero Member
  • *****
  • Posts: 2519
  • Keep it clean.
Re: virtual storage disk?
« Reply #9 on: May 10, 2012, 09:34:57 AM »

Why not just share a directory from your host OS through Samba, and remove the overhead of another VM?

My understanding is that loudog wants to give access to the directory to more than one host.  I could be wrong though. 

Do you mean "host"?  I suspect you mean "Guest".  Sharing the files on the network will give the best control, allow the VM "HOST" access to the files as well, and also allow concurrent access, if desired (but that is not a requirement, and the files can be accessed singularly, as well).
Additionally, hosting the file share on the HOST negates the need to run another VM (if sharing), or have the files encapsulated in a VDI (if being attached to various VMs...which may need to be switch "on the fly" prior to VM startup...I don't recall how VirtualBox behaves if a VDI is attached to more than one VM at a time, regardless of its power state)...

Offline loudog

  • Sr. Member
  • ****
  • Posts: 399
Re: virtual storage disk?
« Reply #10 on: May 10, 2012, 03:01:15 PM »
hmmm, so much practical advice. 8) it is in fact the guest os's that i wish to share the storage between but if samba can be used without the guests having to have the network adapter enabled then that sounds like a more desirable solution. :) i will look into that. at the moment i am trying to help a friend to run the LOTRO game in linux ;) so i need to make a quick post in software. will post back. ;D
Friends don't let friends boot windows

Offline djohnston

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 6227
  • I don't do Windows
Re: virtual storage disk?
« Reply #11 on: May 11, 2012, 01:13:46 AM »

it is in fact the guest os's that i wish to share the storage between but if samba can be used without the guests having to have the network adapter enabled then that sounds like a more desirable solution. :)


Samba is Microsoft's SMB messaging protocol and will need networking enabled on the guest(s) to work.
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 7272andy

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1628
  • UK MLU
Re: virtual storage disk?
« Reply #12 on: May 11, 2012, 04:48:13 AM »
hmmm, so much practical advice. 8) it is in fact the guest os's that i wish to share the storage between but if samba can be used without the guests having to have the network adapter enabled then that sounds like a more desirable solution. :) i will look into that. at the moment i am trying to help a friend to run the LOTRO game in linux ;) so i need to make a quick post in software. will post back. ;D

Sounds like you need to set the network adapter to Internal Networking, the manual states
Quote
Internal Networking is similar to bridged networking in that the VM can directly communicate with the outside world. However, the "outside world" is limited to other VMs on the same host which connect to the same internal network.

Even though technically, everything that can be done using internal networking can also be done using bridged networking, there are security advantages with internal networking. In bridged networking mode, all traffic goes through a physical interface of the host system. It is therefore possible to attach a packet sniffer (such as Wireshark) to the host interface and log all traffic that goes over it. If, for any reason, you prefer two or more VMs on the same machine to communicate privately, hiding their data from both the host system and the user, bridged networking therefore is not an option.

Internal networks are created automatically as needed, i.e. there is no central configuration. Every internal network is identified simply by its name. Once there is more than one active virtual network card with the same internal network ID, the VirtualBox support driver will automatically "wire" the cards and act as a network switch. The VirtualBox support driver implements a complete Ethernet switch and supports both broadcast/multicast frames and promiscuous mode.

In order to attach a VM's network card to an internal network, set its networking mode to "internal networking". There are two ways to accomplish this:

    You can use a VM's "Settings" dialog in the VirtualBox graphical user interface. In the "Networking" category of the settings dialog, select "Internal Networking" from the drop-down list of networking modes. Now select the name of an existing internal network from the drop-down below or enter a new name into the entry field.

    You can use

    VBoxManage modifyvm "VM name" --nic<x> intnet

    Optionally, you can specify a network name with the command

    VBoxManage modifyvm "VM name" --intnet<x> "network name"

    If you do not specify a network name, the network card will be attached to the network intnet by default.

Unless you configure the (virtual) network cards in the guest operating systems that are participating in the internal network to use static IP addresses, you may want to use the DHCP server that is built into VirtualBox to manage IP addresses for the internal network. Please see the section called “VBoxManage dhcpserver” for details.

As a security measure, the Linux implementation of internal networking only allows VMs running under the same user ID to establish an internal network.

Regards


Bare Metal 1         Bare Metal 2
Intel Celeron 420M   Intel i5 540M
2GB Ram              4GB Ram
Intel 943GM          Radeon HD 5650 PCI Express
RT2573               RT2790
32bit KDE            32&64bit KDE

Offline djohnston

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 6227
  • I don't do Windows
Re: virtual storage disk?
« Reply #13 on: May 11, 2012, 05:30:59 PM »

Sounds like you need to set the network adapter to Internal Networking,


Good solution. I learned something new.
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 loudog

  • Sr. Member
  • ****
  • Posts: 399
Re: virtual storage disk?
« Reply #14 on: May 17, 2012, 06:10:42 PM »
yes that is somthing that i believe will work. 8)
Friends don't let friends boot windows