Dobrev.EU Blog

Things I want to share

Releasing Stale VDI

| Comments

So you are now trying to boot a VM in XenServer but you are getting the error “VDI is not Available”. This means that VM crashed, Xen Host crashed, or something just bad happen. Either way you need your server back.

Find the UUID of the VDI in question

Step 1
1
[root@UK2SR114 ~]# xe vdi-list

Note exactly what UUID maps to which drive is on your server. This is going to remove the VDI from the VM so we can reattach it correctly. So drive order does matter, you don’t want to switch an OS VDI with a data VDI.

Step 2
1
[root@UK2SR114 ~]# xe vdi-forget uuid=<VDI UUID we found in step 1>

Open XenCenter and navigate to the SR with your VDI. Hit rescan Now goto your VM with issues and attach the VDI via the storage tab Boot your VM

In case you’re not exactly sure which VDI is the failing one you can always try to start the VM from the CLI first

Get failed VDI UUID
1
2
3
4
5
6
7
8
[root@UK2SR114 ~]# xe vm-list | grep -B 1 -A 1 -i myvm 
uuid ( RO)           : 31a684e4-34bc-2a3e-6b61-c98ca33a1681
  name-label ( RW): MyVM (10.0.0.80)
 power-state ( RO): halted
[root@UK2SR114 ~]# xe vm-start uuid=31a684e4-34bc-2a3e-6b61-c98ca33a1681 
Error code: SR_BACKEND_FAILURE_46
Error parameters: , The VDI is not available [opterr=VDI 605ad751-e626-4a5d-99ae-79829e0ff8b7 already attached RW],
[root@UK2SR114 ~]# xe vdi-forget uuid=605ad751-e626-4a5d-99ae-79829e0ff8b7

Comments