How to find the disk associated to a VM from XenServer CLI

How to find the disk associated to a VM from XenServer CLI

book

Article ID: CTX217612

calendar_today

Updated On:

Description

While troubleshooting storage issues, we might need to get the VM's disk and its associated Virtual block devices . This article will help to get the desired details from the VM


Instructions

1. Go to the XenServer Console either via XenCenter or via SSH over a putty session
2. Get the VM name-label for the VM for which we need to get the associated disks
3. Run the following command to see all the parametes related to the VM

 

#xe vm-disk-list vm=<VM name label>

Example output
 

xe vm-disk-list vm=Router



Disk 0 VBD:

uuid ( RO)             : f0fdb48d-d22e-68e5-6f8b-67d60eeffb24

    vm-name-label ( RO): Router

       userdevice ( RW): 0





Disk 0 VDI:

uuid ( RO)             : fca95c40-62d2-4bb9-86a0-cd5bc668d7f9

       name-label ( RW): 0

    sr-name-label ( RO): Local Storage

     virtual-size ( RO): 4294967296
 

VDI is the actual VHD files holding the Virtual machines data.

Here the VBD is the virtual block device which hold the association of a VDI to a Virtual Machine.