Wow it’s been busy as we approach the end of the year. I am going through my Inbox as I can and I really appreciate all the comments and emails from you all. Really makes it worth while hearing how these posts are helping out there in the real world.
Here’s a quick fix for today. PVS 6.1 environment with latest updates started showing the following error anytime a VM attempted to boot:
Vdisk is locked. 0xffff8017
The fix is not that painful but you will need to kick off everyone that is still connected and running using that vDisk. So there is an outage involved in this procedure for people that use that image.
1. Tell all your users that are still connected to save their work and log off. This is going to be a complete outage for anyone that uses that particular image.
2. Go to your DDC and put the Desktop Group in maintenance mode. This will prevent the DDC from attempting to start up VMs and potentially lock up the vDisk while you are working on it. Then Force Shutdown on all the VMs. Verify in XenCenter they are all shutdown.
3. RDP to a single PVS server and in the PVS Console, go to the Store and right click on your vDisk. Verify there is no gold lock next to the vDisk. If there is clear all the locks. Then click “Unassign from Selected Devices(s)…”
4. Make sure all your VMs are checked and click Unassign
5. If you have maintenance versions, I suggest you merge them at this point. You’ll want to use the “Merged Base – Last base + all updates from that base” option so you get an nice single .vhd file to play with.
6. Once you have verified you have a nice little .vhd file you can rename it if you wish. Now copy that .vhd file and the associated .pvp file to all your other PVS stores. Get all your PVS servers in sync and check the replication status. They should all have blue dots:
7. Now go back to your Store view and right click on your vDisk. You should now see an option to Delete. Click it.
8. MAKE SURE you DO NOT check the Delete the associated VHD files check box. Just hit Yes only. All it does is delete it from the PVS database. It will not touch anything in your Store this way. Better safe than sorry. Do this on all your PVS servers.
9. Now right click on “Store” and click “Add or Import Existing vDisk…”
10. Click Search to search your Store for vDisks. Only check that new .vhd you had created in step 5 and 6 above. Then click Add once it stops being greyed out.
11. It will be imported in Private mode every time. Go ahead and switch it to Standard mode. You might also want to check Cache type, Enable Active Directory machine account password management, and KMS on the Microsoft Volume Licensing tab because all that stuff will likely not carry over for you.
12. Now go to your Device Collection. In this example I have 20+ Devices that need this particular vDisk golden image. I’m not going to sit here and click and modify each one. So I will set the vDisk on the first VM only.
13. Now right click that VM you just set and click “Copy Device Properties…”
14. Hit “Clear All”, then check “vDisk Assignment” only, then hit Copy.
15. Now just highlight all your other VMs, right click in the highlighted area, and click Paste. Instantly all your VMs will be assigned that vDisk.
16. Now just boot up a couple of VMs and verify the “Vdisk is locked. 0xffff8017” error is gone. Then disable Maintenance mode on your DDC and you’re back in business. Don’t forget to tell your users to log back in. You can delete all those old .vhd, .avhd, and .pvp files from old versions of your image if you like or archive them somewhere. It will help keep your Store nice and clean.
Jason Samuel is a visionary product leader and trusted advisor with a proven track record of shaping strategy and driving technology innovation. With extensive expertise in enterprise end-user computing, security, cloud, automation, and virtualization technologies, Jason has become a globally recognized authority in the IT industry. His career spans consulting for hundreds of Fortune 500 enterprises across diverse business sectors worldwide, delivering cutting-edge digital solutions from Citrix, Microsoft, VMware, Amazon, Google, and NVIDIA that seamlessly balance security with exceptional user experiences.
Jason’s leadership is amplified by his dedication to knowledge-sharing as an author, speaker, podcaster, and mentor within the global IT and technology community. Recognized with numerous prestigious awards, Jason’s contributions underscore his commitment to advancing technology and empowering organizations to achieve transformative results. Follow him on LinkedIn.
Dragon64
July 18, 2013 at 6:36 AM
I have found that if you just delete the LOK file associated to the VHD file that you are using and then reset the target it works like a champ without having to do all this other stuff. Furthermore, I notice that if the LOK file is 1k instead of the normal 0k that is when it happens.
Melvin
October 28, 2013 at 10:05 AM
Hi Jason,
I dont have multiple versions of the vdisk, but getting same issue. I have 4 PVS servers but cant find some under replication status . Any Suggestions
Srinivas
November 3, 2014 at 7:54 AM
Can we delete .lok file when the target devices are connected ?
Srinivas
November 4, 2014 at 4:57 AM
@Dragon64
Hi Dragon64,
how to get rid of that vdisk lok file size. in my case its as you said, its coming if the size is 1Kb. any thoughts.
THanks,
Srinivas