FusionCompute虚拟机删除快照失败,报错"快照正在使用中,不允许此操作"处理方法

发布时间:  2017-05-12 浏览次数:  39 下载次数:  0
问题描述

FusionCompute虚拟机删除快照,报错"快照正在使用中,不允许此操作"

处理过程

1、在Portal中执行删除快照任务,报错“快照正在使用中,不允许此操作。”

2、查看vrm日志

VRM02:/var/log/galaxenginelog/vrm # vi vrm.log
[2017-04-08 18:51:07,323] [DEBUG] [tomcat-exec-5] [ObjectPrivServiceInterface:isObjectOpAllowed 196] isVMOpAllowed operationCode:303.026
[2017-04-08 18:51:07,327] [DEBUG] [tomcat-exec-5] [ObjectPrivServiceInterface:isObjectOpAllowed 192] isVMOpAllowed enter, requestBody:{"objectId":"i-0000003B","parentId":null} operation:DELETESNAPSHOT objType:2
[2017-04-08 18:51:07,328] [DEBUG] [tomcat-exec-5] [ObjectPrivServiceInterface:isObjectOpAllowed 196] isVMOpAllowed operationCode:303.026
[2017-04-08 18:51:07,329] [DEBUG] [tomcat-exec-5] [BpmServicesInterface:deleteVmSnapshot 826] BpmServicesManager :delete Snapshot enter
[2017-04-08 18:51:07,333] [DEBUG] [tomcat-exec-5] [DeleteSnapshotHandle:deleteVmSnapshot 121] enter delete snapshot handle : 4478, isDelVm = false
[2017-04-08 18:51:07,333] [DEBUG] [tomcat-exec-5] [VmSnapshotUtil:queryVmSnapshotBySnapshotId 125] query snapshot snapshotId :4478
[2017-04-08 18:51:07,336] [INFO ] [tomcat-exec-5] [DeleteSnapshotHandle:checkSnapshotHaveDiffVol 368] enter check volume have diffVol
[2017-04-08 18:51:07,336] [DEBUG] [tomcat-exec-5] [VmSnapshotVolumeUtil:queryVolumesBySnapshotId 124]  queryVolumesBySnapshotId snapshotId :4478
[2017-04-08 18:51:07,337] [DEBUG] [tomcat-exec-5] [DeleteSnapshotHandle:checkSnapshotHaveDiffVol 380] query add ID : 42
[2017-04-08 18:51:07,337] [DEBUG] [tomcat-exec-5] [DeleteSnapshotHandle:checkSnapshotHaveDiffVol 380] query add ID : 43
[2017-04-08 18:51:07,338] [DEBUG] [tomcat-exec-5] [DeleteSnapshotHandle:checkSnapshotHaveDiffVol 380] query add ID : 44
[2017-04-08 18:51:07,341] [DEBUG] [tomcat-exec-5] [DeleteSnapshotHandle:checkSnapshotHaveDiffVol 387] brm rsp is : 0
[2017-04-08 18:51:07,359] [ERROR] [tomcat-exec-5] [DeleteSnapshotHandle:deleteVmSnapshot 165] Snapshot may be in use 4478

(数字4478为快照id
[2017-04-08 18:51:07,359] [ERROR] [tomcat-exec-5] [RestExceptionHandler:resolveException 62] resolveException in
10430031:快照正在使用中,不允许此操作。

3、登录vrm数据库,根据日志打印的快照id,查询快照是否处于受保护状态:

Select is_protected,snapshot_id from tbl_snapshot_vm where snapshot_id=4478;

4、如果查到,说明快照当前处于被保护状态。即之前在当前快照上有任务运行,快照处于“加锁”状态,不允许删除。

解决方案

步骤 1      确认该虚拟机快照不再使用

                            步骤 2      登录vrm数据库,修改快照状态update tbl_snapshot_vm set is_protected=’0 where snapshot_id=4478;

 
 

步骤 3      等待一段时间,虚拟机删除成功。

 


 

 

 

 

 

 


 

END