Issue
Diovani
Diovani
Offline
0
Hi All.

On the high avaliable enviroment, Is it possible to configure Linux RedHat + XEN to share the same hard disk area and delivery it to 2 different Virtual Machines (VM)?

Example: I have two VM´s and both needs to read and write the same disk area.

Regards,

Diovani
Responses (2)
  • Accepted Answer

    Lars Kurth
    Lars Kurth
    Offline
    Tuesday, August 06 2013, 02:38 PM - #permalink
    0
    Hi, presumably you are using XM & XEND (as you are targeting RHEL).

    If so, 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.

    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.
    The reply is currently minimized Show
  • Accepted Answer

    Lars Kurth
    Lars Kurth
    Offline
    Tuesday, August 06 2013, 02:44 PM - #permalink
    0
    An alternative would be to use symlinks
    The reply is currently minimized Show
Your Reply