Howto use ONE VDI-Image on TWO concurrent VMs?

Discussions related to using VirtualBox on Linux hosts.
madd_KIS
Posts: 4
Joined: 26. Aug 2008, 16:04

Howto use ONE VDI-Image on TWO concurrent VMs?

Post by madd_KIS »

Hello,

I'd like to use ONE vdi.img on TWO VM-Guests with a clusterfilesystem like GFS/GFS2/OCF2. So if once a VDI is in use a second VM cannot use the same VDI.

How to disable this behavior? maybe i could hardlink that VDI in the filesystem, but that looks not nice.

Madd :?:
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Post by Sasquatch »

How many data ports does a typical hard drive have? Just one. So you can use the hard drive in one computer at a time. If you want to share it, use it through the network.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
madd_KIS
Posts: 4
Joined: 26. Aug 2008, 16:04

Post by madd_KIS »

hmmmmmm ....
not in all cases.

if you have a iscsi-card, and (multiple) paths to a SAN, can have acces to ONE disk from multiple Hosts.
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Post by Sasquatch »

Well, it's not supported by VB.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
madd_KIS
Posts: 4
Joined: 26. Aug 2008, 16:04

Post by madd_KIS »

ok, thx.

reason why i asking for is that this will work with vmware.
But i want to VB (because it's OpenSource) and i do not want to use vmware.

in a (german) howto that discribe this situation is here http://www.open-sharedroot.org/document ... -howto.pdf on page 8.

I hope so, that will implemented in the future.

Madd
TerryE
Volunteer
Posts: 3572
Joined: 28. May 2008, 08:40
Primary OS: Ubuntu other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Ubuntu 10.04 & 11.10, both Svr&Wstn, Debian, CentOS
Contact:

Post by TerryE »

I agree that this is a perfectly sensible future extension request. However there are all sorts of distributed lock management issues that you need to be careful with so adding this isn't going to be easy. VMware have the advantage that their ESX product is a premium datacentre product and can be priced accordingly. This gives them the revenue stream to develop such functionality. Once they've developed it for ESX, they can back-port it to other VMware products.

After all the main reason that they give away VMware server is because this enables developers and small scale users a zero cost entry and this creates a natural feeder market for ESX use. I have a great deal of admiration for the Company, the product and the innovation contribution to the Virtualisation market.

VBox occupies an entirely different niche. It is a small and compact VMM implementation, with excellent graphics performance and mouse integration for standard VESA applications. The revenue streams are limited and therefore Sun need to make careful cost/benefit trade-offs in any decision to add extra functionality.
Read the Forum Posting Guide
Google your Q site:VirtualBox.org or search for the answer before posting.
chungy
Volunteer
Posts: 132
Joined: 26. Jan 2008, 10:27

Post by chungy »

EMC (the company that owns VMware) has a revenue of ~$11 billion. Sun Microsystems has a revenue of ~$14 billion. It's not like Sun is the little guy (EMC is slightly smaller, but still quite a large entity), I can't imagine that money is a real factor in this.

The real factor here is the technical feat. Unless you want the hard disks to be read-only, all the guests will have to synchronize with each other and make sure the filesystem doesn't become corrupt because two or more OSes have mounted the same filesystem... and this just doesn't happen in the real world of computing.
TerryE
Volunteer
Posts: 3572
Joined: 28. May 2008, 08:40
Primary OS: Ubuntu other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Ubuntu 10.04 & 11.10, both Svr&Wstn, Debian, CentOS
Contact:

Post by TerryE »

chungy wrote:...Sun Microsystems has a revenue of ~$14 billion...I can't imagine that money is a real factor in this.
Sorry, but from my professional background this is exactly how it is. Each business stream and product line has to work within strict business plans and P&L. Variations against plan have to go though strict change and approval processes. If you need an extra M€ then you need to get this approved on the basis of a business plan.
chungy wrote:...The real factor here is the technical feat...and this just doesn't happen in the real world of computing.
Sorry, but I've got to disagree with this one on two levels. First don't believe the MS achievements set the bounds of possibility. When I last looked at this, the best that MS had released was an active/passive system where one system was read-write and the other read-monitor, but with a heartbeat so that the control could flick if the active node stalls. However, Digital's VMS supported active-active clustering where nodes could symmetrically share file systems and other shared resources. This was robust and worked extremely well. The key thing you need is the OS to support a lean and fast Distributed Lock Manager (DLM) in the heart of its kernel, plus some other Comp Sci techniques that were pretty much hammered out in the 70s and 80s.

My second point is that this whole issue of integrity is actually the business of the guest OSs and not the VMMs. All the VMM needs to do is to properly virtualise whatever the shared I/O channel mechanism to the multiple VMMs and again this is a standard problem.

Notwithstanding this, the devil is in the detail and if this takes a man-year, say $150K built up cost, to realise then someone needs to make a business case for an extra $1M revenue or whatever to cover this.
Read the Forum Posting Guide
Google your Q site:VirtualBox.org or search for the answer before posting.
chungy
Volunteer
Posts: 132
Joined: 26. Jan 2008, 10:27

Post by chungy »

Clusters might pool resources together to appear as a single filesystem, but they all have independent disks at the low-level...

But anyhow, VirtualBox's code is under the GPL (at least all the relevant parts for this discussion), Sun isn't necessarily forced to code all the features itself. If someone else really needs it, and has the resources, they could implement it completely independently (weather or not money is involved in the development), then license it appropriately for Sun to re-use the code for the proprietary version of VirtualBox. So really, all this talk of Sun providing developers the monetary resources misses the whole picture.
TerryE
Volunteer
Posts: 3572
Joined: 28. May 2008, 08:40
Primary OS: Ubuntu other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Ubuntu 10.04 & 11.10, both Svr&Wstn, Debian, CentOS
Contact:

Post by TerryE »

Windows clusters might pool resources together to appear as a single filesystem but they all have independent disks at the low-level. That wasn't the case for OpenVMS; for example you could have up to 3 systems and 4 disk arrays on a single SCSI chain (in fact with both dual ported onto multiple chains). The systems shared the file systems symmetrically. They could also serve the disks over the network at a block access level. It all worked; was amazingly resilient, and pretty scalable. There is absolutely nothing stopping you doing the same today with iSCSI -- apart from architectural limitations of both the NT and Linux kernels: neither has a decent DLM as part of the kernel function.
chungy wrote:... So really, all this talk of Sun providing developers the monetary resources misses the whole picture.
It just doesn't work this way, and in reality FLOSS doesn't rely on individuals like me. The real reason for the success of the FLOSS model is the dominance of MS. The only way that the other vendors can compete is by federating their resources. GPL is primarily a way of doing this bit enabling companies to protect their commercial interests whilst pooling when they have to. They choose to donate N engineer-years of effort to develop FLOSS product because it is ultimately in their commercial interest to do so, and every incorporate company in the US has a legal obligation to maximise the profits of its shareholders. That's just the way of our capitalist world.
Read the Forum Posting Guide
Google your Q site:VirtualBox.org or search for the answer before posting.
chungy
Volunteer
Posts: 132
Joined: 26. Jan 2008, 10:27

Post by chungy »

TerryE wrote:Windows clusters might pool resources together to appear as a single filesystem but they all have independent disks at the low-level.
Heh, I had no idea that it was even possible to cluster Windows computers. Guess you learn something new every day :)

As for the rest... uh, FLOSS has been around longer than Microsoft's dominance has been.
rizzo
Posts: 9
Joined: 27. Aug 2008, 18:11
Primary OS: MS Windows 7
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Ubuntu, CentOS
Location: Manitowoc, Wisconsin, USA

Post by rizzo »

DAMN! I was hoping to do an Oracle-RAC-on-VirtualBox tutorial, basically translating this similar VMware tutorial.

Another website mentioned I could do something similar by using iscsi. From what I understand (which probably isn't much), you make one of the VMs an iscsi server and share it's disks to the other VMs.

http://opensourceexperiments.wordpress. ... ard-disks/

Anyone know if this makes sense?
TerryE
Volunteer
Posts: 3572
Joined: 28. May 2008, 08:40
Primary OS: Ubuntu other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Ubuntu 10.04 & 11.10, both Svr&Wstn, Debian, CentOS
Contact:

Post by TerryE »

Rizzo, welcome to the forum :-)

As you may have guessed from my last post the issues of integrity are really Guest OS bases or in your Oracle case Apps based since 10g does implement a heartbeat and DLM within its rack infrastructure. The issue about sharing FS across systems primarily relates to VDI based file systems.

At the back of my mind I was brooding about using file systems that might naturally permit dual r/w. The two options that I thinking might work were:
  • creating two rawvmdks which both point to the same partition. Each machine opens its VMDK privately but in reality they talk to the same partition.
  • using iSCSI. Your referenced article seems to have got something going. So this might be worth trying.
Anyway why don't you and chungy have a play. Just make sure that you have a back-up of the partition / FS and expect to have some failures and corruptions during testing. Good luck with the experiment.
Read the Forum Posting Guide
Google your Q site:VirtualBox.org or search for the answer before posting.
rizzo
Posts: 9
Joined: 27. Aug 2008, 18:11
Primary OS: MS Windows 7
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Ubuntu, CentOS
Location: Manitowoc, Wisconsin, USA

Post by rizzo »

I'm about halfway there. I've created some empty image files with dd on my host OS (fedora 9), set them up as loopback block devices with losetup and then added them to ietd.conf and am sharing them as iscsi disks.

In my vbox vm, I've successfully discovered them. That's where I left off this afternoon. I plan to shortly create the partition table and do the rest and then clone the VM, which will be the moment of truth.
wzis
Posts: 14
Joined: 13. Sep 2008, 05:51

I don't understand why shared disks not supported

Post by wzis »

TerryE wrote:
chungy wrote:...Sun Microsystems has a revenue of ~$14 billion...I can't imagine that money is a real factor in this.
Sorry, but from my professional background this is exactly how it is. Each business stream and product line has to work within strict business plans and P&L. Variations against plan have to go though strict change and approval processes. If you need an extra M€ then you need to get this approved on the basis of a business plan.
chungy wrote:...The real factor here is the technical feat...and this just doesn't happen in the real world of computing.
Sorry, but I've got to disagree with this one on two levels. First don't believe the MS achievements set the bounds of possibility. When I last looked at this, the best that MS had released was an active/passive system where one system was read-write and the other read-monitor, but with a heartbeat so that the control could flick if the active node stalls. However, Digital's VMS supported active-active clustering where nodes could symmetrically share file systems and other shared resources. This was robust and worked extremely well. The key thing you need is the OS to support a lean and fast Distributed Lock Manager (DLM) in the heart of its kernel, plus some other Comp Sci techniques that were pretty much hammered out in the 70s and 80s.

My second point is that this whole issue of integrity is actually the business of the guest OSs and not the VMMs. All the VMM needs to do is to properly virtualise whatever the shared I/O channel mechanism to the multiple VMMs and again this is a standard problem.

Notwithstanding this, the devil is in the detail and if this takes a man-year, say $150K built up cost, to realise then someone needs to make a business case for an extra $1M revenue or whatever to cover this.
As you said, VBox doesn't need to worry about the DLM, it's the responsibility of clusterware(such as Veritas CVM) running on guest machines. So, for basic disk sharing, it shouldn't be that difficult to implement, and I don't believe this task can take a man-year. Once the basic disk sharing implemented, further enhancement should be put on SCSI3 PGR support emulation.
Post Reply