# xen locking

**URL:** <https://forums.suse.com/t/xen-locking/35148>\
**Category:** SLES High Availability Extension\
**Created:** [July 15, 2020, 4:59pm UTC](https://forums.suse.com/t/xen-locking/35148 "2020-07-15T16:59:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![warper2](https://avatars.discourse-cdn.com/v4/letter/w/3ab097/32.png) [@warper2](https://forums.suse.com/u/warper2)\
**Post date:** [July 15, 2020, 4:59pm UTC](https://forums.suse.com/t/xen-locking/35148/1 "2020-07-15T16:59:55Z")

</div>

I am moving from sles 11 with HA to sles 12 HA. Under 11 with xen we would specify a directory for creating locks so the machine does not start on 2 machines at once. How do I accomplish the same in sles 12 so that machine does not start on 2 machines in anyway.  
Thank you kindly for any help.

---

<div class="post-metadata">

**Author:** ![strahil](https://avatars.discourse-cdn.com/v4/letter/s/b5ac83/32.png) [@strahil](https://forums.suse.com/u/strahil)\
**Post date:** [July 19, 2020, 5:50am UTC](https://forums.suse.com/t/xen-locking/35148/2 "2020-07-19T05:50:48Z")

</div>

You should be able to do the same as in SLES11. What is stopping you ?

---

<div class="post-metadata">

**Author:** ![warper2](https://avatars.discourse-cdn.com/v4/letter/w/3ab097/32.png) [@warper2](https://forums.suse.com/u/warper2)\
**Post date:** [July 19, 2020, 1:47pm UTC](https://forums.suse.com/t/xen-locking/35148/3 "2020-07-19T13:47:56Z")

</div>

It does not seem to work the same as in sles 11. But that makes sense. The sles 11 setup was an upgrade from sles 10. I think the locking worked different. I am using raw disks fo vm’s off a san. I can’t seem to get locking to work for the disks no matter what I do. Libvirt seems really different compered to when was using as send. Of course can’t go back. I have spent hours and hours searching on this. If you have any advice exactly what I need to do it would be greatly helpful. I know it uses locks but I never see locking files being created. So I have the issue that the vm could start on 2 machines and than corrupt it.

---

<div class="post-metadata">

**Author:** ![strahil](https://avatars.discourse-cdn.com/v4/letter/s/b5ac83/32.png) [@strahil](https://forums.suse.com/u/strahil)\
**Post date:** [July 19, 2020, 7:39pm UTC](https://forums.suse.com/t/xen-locking/35148/4 "2020-07-19T19:39:15Z")

</div>

Based on Internet and [this article](https://libvirt.org/internals/locking.html), it seems that the locking is already implemented unless you mark a disk shareable/read-only. Maybe you can create a VM to test the locking and try to start it on 2 hosts ,while still pointing to the same VM disk 🙂
