My Favorites

Close

Please to see your favorites.

  • Bookmark
  • Email Document
  • Printer Friendly
  • Favorite
  • Rating:

How to share a XEN disk with two or more virtual machines

This document (7004451) is provided subject to the disclaimer at the end of this document.

Environment

SUSE Linux Enterprise Server 10 Service Pack 2
SUSE Linux Enterprise Server 11

Situation

Customer needs to share a disk file (i.e. /var/lib/xen/images/VM-NAME/disk0) or a physical device (i.e. /dev/sdb1) with two or more XEN virtual machines in order to be able to install a cluster services like Linux Pacemaker or Novell Cluster Services.

Resolution

You need to change the option "w" (write) to w! in the XEN virtual machine configuration file located at /etc/xen/vm/VM-NAME/vm-name. Then, add the shared disk information into all virtual machines configuration files you want to share it with.

Remember that all configuration files should have the "!" (exclamation point) in the shared disk line as demonstrated below.

In the following example, xvdb disk is the one that will be shared.

- Default configuration for a non shared disk
disk=[ 'file:/var/lib/xen/images/vm-name/disk0,xvda,w','file:/var/lib/xen/images/vm-name/disk1,xvdb,w', ]

than, all you need to do is including "!" as shown below:
disk=[ 'file:/var/lib/xen/images/vm-name/disk0,xvda,w','file:/var/lib/xen/images/vm-name/disk1,xvdb,w!', ]

Once you have changed it, you need to refresh that information in the XEN database. You can achieve that running the following command:
xm new -f vm-name

In addition, you can run "xm list -l vm-name |grep -i w!" command after changing it, in case you want to verify wether the virtual machine configuration file was updated in the xen database or not.

xm list -l vm-name |grep -i w!
            (mode 'w!')

In case you don't see the "!" (exclamation point), review your configuration before starting your XEN virtual machine.



Disclaimer

This Support Knowledgebase provides a valuable tool for NetIQ/Novell/SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:7004451
  • Creation Date:16-SEP-09
  • Modified Date:27-APR-12
    • SUSESUSE Linux Enterprise Server

Did this document solve your problem? Provide Feedback

< Back to Support Search

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

Join Our Community

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.


SUSE Customer Support Quick Reference Guide SUSE Technical Support Handbook Update Advisories
Support FAQ

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.

Go to Customer Center