How to use vhd-util to Scan for Orphaned or Bad VHD Files

How to use vhd-util to Scan for Orphaned or Bad VHD Files

book

Article ID: CTX139224

calendar_today

Updated On:

Description

This article details how to use vhd-util to scan for Orphaned/Bad VHD Files.

Requirements

  • CLI connection to XenServer host, preferably through an SSH client

  • Basic CLI command usage (grep, less, tail)

  • LVM, EXT, or NFS storage type


Instructions

Complete the following procedure:
  1. Identify the SR that has a bad VHD using the SMlog. You will see errors regarding exception or scan errors with reference to a python script.

  2. Run the vhd-util command.
  • For LVM/iSCSI/HBA: vhd-util scan -f -m "VHD-*" -l VG_XenStorage-<UUID of SR> -p
  • For NFS/EXT: vhd-util scan -f -c -p  -m /var/run/sr-mount/<sr-uuid>/*.vhd
  1. Find the uuid of the VHD. You may see errors such as header/footer errors, missing parent, or corrupt. When identified, decide how best to resolve the scan error.

Environment

This software application is provided to you as is with no representations, warranties or conditions of any kind. You may use and distribute it at your own risk. CITRIX DISCLAIMS ALL WARRANTIES WHATSOEVER, EXPRESS, IMPLIED, WRITTEN, ORAL OR STATUTORY, INCLUDING WITHOUT LIMITATION WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NONINFRINGEMENT. Without limiting the generality of the foregoing, you acknowledge and agree that: (a) the software application may exhibit errors, design flaws or other problems, possibly resulting in loss of data or damage to property; (b) it may not be possible to make the software application fully functional; and (c) Citrix may, without notice or liability to you, cease to make available the current version and/or any future versions of the software application. In no event should the software application be used to support ultra-hazardous activities, including but not limited to life support or blasting activities. NEITHER CITRIX NOR ITS AFFILIATES OR AGENTS WILL BE LIABLE, UNDER BREACH OF CONTRACT OR ANY OTHER THEORY OF LIABILITY, FOR ANY DAMAGES WHATSOEVER ARISING FROM USE OF THE SOFTWARE APPLICATION, INCLUDING WITHOUT LIMITATION DIRECT, SPECIAL, INCIDENTAL, PUNITIVE, CONSEQUENTIAL OR OTHER DAMAGES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. You agree to indemnify and defend Citrix against any and all claims arising from your use, modification or distribution of the software application.

Issue/Introduction

This article details how to use vhd-util to scan for Orphaned/Bad VHD Files.

Additional Information

For detailed information on vhd-util, please go through below article

https://support.citrix.com/article/CTX201296