We moved this page to our Documentation Portal. You can find the latest updates here. |
Issue
Error shows up in the logs while deleting the virtual machine:
Running: Storage API Call: PUT 192.168.10.2:8080/lvm/Datastore/onapp-xxxxxxxxxxxxxx/VDisk/yyyyyyyyyyyyyy "{\"state\":2}"
OnApp::Actions::Fatal Storage API Call failed: {"result"=>"FAILURE", "Error"=>"Error running lvchange: One or more specified logical volume(s) not found.\n"}
Fatal: OnApp::Actions::Fatal Storage API Call failed: {"result"=>"FAILURE", "Error"=>"Error running lvchange: One or more specified logical volume(s) not found.\n"}
Executing Rollback...
Environment
Any OnApp using LVM Datastore
Resolution
Create the disk on the hypervisor in the correct data store (volume group), it is likely you would need to ssh into the Hypervisor / Compute Resource or Backup Server. The server mentioned in the Storage API call should work just fine for this.
Taken from the example above:
[onapp@cp]# ssh root@192.168.10.2 [onapp@cp]# lvcreate -L1G -n yyyyyyyyyyyyyy onapp-xxxxxxxxxxxxxx
This will create an empty 1GB disk so that the delete VM will not fail to be destroyed on the next attempt. Run the destroy through the interface and it should complete normally.
Sometimes there is also an error if the new LV is only of 1GB, so it may be needful to create the new LV with the size of the deleted disk and try again.
Cause
The issue is caused due to the fact that the database was not correctly updated and OnApp is trying to delete the logical volume for the second time, after it was deleted from the datastore.