I needed to see which VM had the VDI in use so I executed the following command. This command will give me a list of the UUID's associated with the VM LBFDM01. I will focus on the C:\ drive.
[root@fsxensvr20 ~]# xe vdi-list name-label=LBFDM01
uuid ( RO) : bb53e15c-7312-48dc-a736-ce5b9935b145
name-label ( RW): LBFDM01
name-description ( RW): LBFDM01 Data
sr-uuid ( RO): 66f24970-843f-0b80-9400-404585e64f42
virtual-size ( RO): 214748364800
sharable ( RO): false
read-only ( RO): false
uuid ( RO) : f1b8ed87-f6c4-4aa5-a996-bf9db2ef4be8
name-label ( RW): LBFDM01
name-description ( RW): LBFDM01 Data
sr-uuid ( RO): 66f24970-843f-0b80-9400-404585e64f42
virtual-size ( RO): 214748364800
sharable ( RO): false
read-only ( RO): false
===================
uuid ( RO) : 7ead0b63-1bf4-48d4-bd2d-c52f739cfec5
name-label ( RW): LBFDM01
name-description ( RW): LBFDM01 C:\drive
sr-uuid ( RO): 66f24970-843f-0b80-9400-404585e64f42
virtual-size ( RO): 53687091200
sharable ( RO): false
read-only ( RO): false
uuid ( RO) : 86488985-ece7-412c-8b31-ef2f210872d5
name-label ( RW): LBFDM01
name-description ( RW): LBFDM01 C:\drive
sr-uuid ( RO): 66f24970-843f-0b80-9400-404585e64f42
virtual-size ( RO): 53687091200
sharable ( RO): false
read-only ( RO): false
==========================
I then needed to associate which VM is associated with which VDI. So I ran the following command
==========================
[root@fsxensvr20 ~]# xe vbd-list vdi-uuid=7ead0b63-1bf4-48d4-bd2d-c52f739cfec5 params=vm-uuid
Basically says that this disk c52f739cfec5 is associated with these (2) VMs
vm-uuid ( RO) : 505ebabd-9edb-2cd3-dc2c-08721ee74c7a
vm-uuid ( RO) : de6e9d15-6d8d-d0a8-4ce8-aee90f1dd6ca
====================================
Once I new the VM UUID associated with the VDI I then ran the following command to determine the power-state on the VM
====================================
[root@fsxensvr20 ~]# xe vm-list uuid=505ebabd-9edb-2cd3-dc2c-08721ee74c7a
uuid ( RO) : 505ebabd-9edb-2cd3-dc2c-08721ee74c7a
name-label ( RW): Transfer VM for VDI 7ead0b63-1bf4-48d4-bd2d-c52f739cfec5
power-state ( RO): running
[root@fsxensvr20 ~]# xe vm-list uuid=de6e9d15-6d8d-d0a8-4ce8-aee90f1dd6ca
uuid ( RO) : de6e9d15-6d8d-d0a8-4ce8-aee90f1dd6ca
name-label ( RW): LBFDM01
power-state ( RO): halted
=======================================
As you can see the Transfer VM is still in a running state which is causing the initial error message of the VDI being in use. I ran the following command to shutdown the Transfer VM
=======================================
[root@fsxensvr20 ~]# xe vm-shutdown uuid=505ebabd-9edb-2cd3-dc2c-08721ee74c7a
Once this was done I was able to start the VM LBFDM01
I agree; thumps up !
ReplyDeleteAfter a "xe vm-export" my VM wouldn't start in GUI :-(
It said "This operation cannot be performed because a VDI is in use by some other operation."
To identify the "running" Transfer from VM... I tried this in CLI
#xe vm-start vm=name-of-my-vm
Output:
This operation cannot be performed because this VDI is in use by some other operation
vdi: 287b33d4-8752-4cd7-a117-8e6ac3251226 (name-of-my-vm disk 0)
operation:
Then I did this to view all vm's using this uuid:
# xe vbd-list vdi-uuid=287b33d4-8752-4cd7-a117-8e6ac3251226
Then just did a:
# xe vm-shutdown uuid=annoying vm-uuid ( RO) from the list above
Now I could start the VM.
/Erik
Gracias !!
ReplyDeleteMuchas gracias, me sacaron de un apuro.
ReplyDelete