Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.

Bug 234477

Summary: Sharing multiple files as disks between VMs has problems
Product: Red Hat Enterprise Linux 5 Reporter: Jonathan Earl Brassow <jbrassow>
Component: xenAssignee: Daniel Berrange <berrange>
Status: CLOSED NOTABUG QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 5.0CC: xen-maint
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-04-17 01:32:17 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Jonathan Earl Brassow 2007-03-29 15:42:06 UTC
Description of problem:
I have 3 machines.  If I create a file to be used as a common drive between the
3 machines, it works fine.  My config line for that is as follows:

# Other xen config files have different hda, but same hdb
disk = [ 'file:/root/JB1,hda,w', 'file:/root/JB-common-1,hdb,w!' ]

# Illustrate successful run
[root@bid-08 ~]# for i in 1 2 3 ; do xm create /etc/xen/jx$i; done
Using config file "/etc/xen/jx1".
Started domain jb-xen-01
Using config file "/etc/xen/jx2".
Started domain jb-xen-02
Using config file "/etc/xen/jx3".
Started domain jb-xen-03

However, if I try to have 2 or more files for multiple shared drives, I can only
start two virtual machines.

# New disk line from xen config files
disk = [ 'file:/root/JB1,hda,w', 'file:/root/JB-common-1,hdb,w!',
'file:/root/JB-common-2,hdc,w!' ]

# Illustration of failure
[root@bid-08 ~]# for i in 1 2 3 ; do xm create /etc/xen/jx$i; done
Using config file "/etc/xen/jx1".
Started domain jb-xen-01
Using config file "/etc/xen/jx2".
Started domain jb-xen-02
Using config file "/etc/xen/jx3".
Error: destroyDevice() takes exactly 3 arguments (2 given)

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. create at least 2 files to be used as hard drives on VMs
2. try to start more than 2 VMs that share more than one drive

Comment 1 Stephen Tweedie 2007-04-07 20:18:02 UTC
Are these PV or FV guests, btw?  For PV, you want "tap:aio:" instead of "file:".

But it still looks like a bug in the python code somewhere.

Comment 2 Jonathan Earl Brassow 2007-04-09 16:33:24 UTC
FV guest

Comment 3 Daniel Berrange 2007-04-19 15:52:07 UTC
You are limited to 8 loop devices by default.  Your config has 3 disks, so 3x3
== 9 loop devices - one more than you have. If you need more then you can use
the 'max_loop' parameter for the loop.ko kernel module, but adding an
appropriate line to /etc/modprobe.conf

Comment 4 Jonathan Earl Brassow 2007-04-19 16:05:59 UTC
Indeed, that is the problem.  Makes sense.

Would it be possible to print an error that said something like, "Max number of
loop devices exceeded" ?  Then I would have figured it out by myself pretty quickly.

So, this is NOTABUG; but I won't change the state if you want to make error
message changes.

Comment 5 Bill Burns 2008-04-17 01:32:17 UTC
Closing as not a nbug as per comment #4.