在群里,有朋友问到,使用kvm的主机,迁移VM失败。在迁移的时候UI上选择迁移主机的时候提示(not suitable),迁移操作后的报错log如下:
log 写道
2013-05-10 12:21:12,906 DEBUG [agent.transport.Request] (StatsCollector-1:null) Seq 12-1822163042: Received: { Ans: , MgmtId: 165160840324569, via: 12, Ver: v1, Flags: 10, { GetStorageStatsAnswer } }
DEBUG [cloud.async.AsyncJobManagerImpl] (catalina-exec-23:null) submit async job-110, details: AsyncJobVO {id:110, userId: 2, accountId: 2, sessionKey: null, instanceType: None, instanceId: null, cmd: com.cloud.api.commands.MigrateVMCmd, cmdOriginator: null, cmdInfo: {"response":"json","sessionkey":"+UUFHn2vEgL8D23672YRc8DKh6s\u003d","virtualmachineid":"577fecb0-5e1a-4d8e-a986-e9b5ff482a41","hostid":"837fc7af-4c52-4945-a85a-a1e581241eeb","ctxUserId":"2","_":"1368159672367","ctxAccountId":"2","ctxStartEventId":"370"}, cmdVersion: 0, callbackType: 0, callbackAddress: null, status: 0, processStatus: 0, resultCode: 0, result: null, initMsid: 165160840324569, completeMsid: null, lastUpdated: null, lastPolled: null, created: null}
2013-05-10 12:21:13,531 DEBUG [cloud.async.AsyncJobManagerImpl] (Job-Executor-71:job-110) Executing com.cloud.api.commands.MigrateVMCmd for job-110
2013-05-10 12:21:13,556 INFO [cloud.vm.VirtualMachineManagerImpl] (Job-Executor-71:job-110) Migrating VM[User|kvmtest1] to Dest[Zone(Id)-Pod(Id)-Cluster(Id)-Host(Id)-Storage(Volume(Id|Type-->Pool(Id))] : Dest[Zone(1)-Pod(1)-Cluster(1)-Host(12)-Storage()]
2013-05-10 12:21:13,576 DEBUG [cloud.storage.StorageManagerImpl] (Job-Executor-71:job-110) Preparing 1 volumes for VM[User|kvmtest1]
2013-05-10 12:21:13,594 DEBUG [agent.transport.Request] (Job-Executor-71:job-110) Seq 12-1822163043: Sending { Cmd , MgmtId: 165160840324569, via: 12, Ver: v1, Flags: 100111, [{"PrepareForMigrationCommand":{"vm":{"id":7,"name":"i-2-7-VM","type":"User","cpus":2,"speed":2,"minRam":4294967296,"maxRam":4294967296,"arch":"x86_64","os":"CentOS 6.0 (64-bit)","bootArgs":"","rebootOnCrash":false,"enableHA":true,"limitCpuUse":false,"vncPassword":"45f1e9bf5d1cdaa8","params":{},"uuid":"577fecb0-5e1a-4d8e-a986-e9b5ff482a41","disks":[{"id":6,"name":"ROOT-7","mountPoint":"/primary","path":"173f67f8-45ad-4af7-899f-0d8a8597b73c","size":5368709120,"type":"ROOT","storagePoolType":"NetworkFilesystem","storagePoolUuid":"df6510f2-e971-3713-8fdd-aa6c5fe8d72c","deviceId":0},{"id":7,"path":"nfs://10.1.111.150condary/template/tmpl/2/203//203-2-6cee0418-f55e-37cc-88ba-aae74dd8b3f5.iso","size":0,"type":"ISO","storagePoolType":"ISO","deviceId":0}],"nics":[{"deviceId":0,"networkRateMbps":200,"defaultNic":true,"uuid":"976fab39-6b0e-44e9-868d-8b495a33b68b","ip":"10.1.111.185","netmask":"255.255.255.0","gateway":"10.1.111.254","mac":"06:1a:5a:00:00:19","dns1":"8.8.8.8","dns2":"8.8.4.4","broadcastType":"Vlan","type":"Guest","broadcastUri":"vlan://untagged","isolationUri":"ec2://untagged","isSecurityGroupEnabled":false}]},"wait":0}}] }
2013-05-10 12:21:13,843 DEBUG [agent.transport.Request] (AgentManager-Handler-7:null) Seq 12-1822163043: Processing: { Ans: , MgmtId: 165160840324569, via: 12, Ver: v1, Flags: 110, [{"PrepareForMigrationAnswer":{"result":true,"wait":0}}] }
2013-05-10 12:21:13,843 DEBUG [agent.manager.AgentAttache] (AgentManager-Handler-7:null) Seq 12-1822163043: No more commands found
2013-05-10 12:21:13,844 DEBUG [agent.transport.Request] (Job-Executor-71:job-110) Seq 12-1822163043: Received: { Ans: , MgmtId: 165160840324569, via: 12, Ver: v1, Flags: 110, { PrepareForMigrationAnswer } }
2013-05-10 12:21:13,850 DEBUG [cloud.capacity.CapacityManagerImpl] (Job-Executor-71:job-110) VM state transitted from :Running to Migrating with event: MigrationRequestedvm's original host id: 1 new host id: 12 host id before state transition: 1
DEBUG [cloud.capacity.CapacityManagerImpl] (Job-Executor-71:job-110) Hosts's actual total CPU: 45624 and CPU after applying overprovisioning: 45624
2013-05-10 12:21:13,856 DEBUG [cloud.capacity.CapacityManagerImpl] (Job-Executor-71:job-110) We are allocating VM, increasing the used capacity of this host:12
2013-05-10 12:21:13,856 DEBUG [cloud.capacity.CapacityManagerImpl] (Job-Executor-71:job-110) Current Used CPU: 0 , Free CPU:45624 ,Requested CPU: 4
2013-05-10 12:21:13,856 DEBUG [cloud.capacity.CapacityManagerImpl] (Job-Executor-71:job-110) Current Used RAM: 0 , Free RAM:33609699328 ,Requested RAM: 4294967296
2013-05-10 12:21:13,856 DEBUG [cloud.capacity.CapacityManagerImpl] (Job-Executor-71:job-110) CPU STATS after allocation: for host: 12, old used: 0, old reserved: 0, actual total: 45624, total with overprovisioning: 45624; new used:4, reserved:0; requested cpu:4,alloc_from_last:false
2013-05-10 12:21:13,856 DEBUG [cloud.capacity.CapacityManagerImpl] (Job-Executor-71:job-110) RAM STATS after allocation: for host: 12, old used: 0, old reserved: 0, total: 33609699328; new used: 4294967296, reserved: 0; requested mem: 4294967296,alloc_from_last:false
2013-05-10 12:21:13,862 DEBUG [agent.transport.Request] (Job-Executor-71:job-110) Seq 1-1874334912: Sending { Cmd , MgmtId: 165160840324569, via: 1, Ver: v1, Flags: 100111, [{"MigrateCommand":{"vmName":"i-2-7-VM","destIp":"10.1.111.151","hostGuid":"b8da45b7-63d4-34ad-83fe-4868eef53e7c-LibvirtComputingResource","isWindows":false,"wait":0}}] }
2013-05-10 12:21:13,917 DEBUG [agent.transport.Request] (AgentManager-Handler-1:null) Seq 1-1874334912: Processing: { Ans: , MgmtId: 165160840324569, via: 1, Ver: v1, Flags: 110, [{"MigrateAnswer":{"result":false,"details":"internal error Attempt to migrate guest to the same host 00020003-0004-0005-0006-000700080009","wait":0}}] }
2013-05-10 12:21:13,917 DEBUG [agent.manager.AgentAttache] (AgentManager-Handler-1:null) Seq 1-1874334912: No more commands found
2013-05-10 12:21:13,917 DEBUG [agent.transport.Request] (Job-Executor-71:job-110) Seq 1-1874334912: Received: { Ans: , MgmtId: 165160840324569, via: 1, Ver: v1, Flags: 110, { MigrateAnswer } }
2013-05-10 12:21:13,917 ERROR [cloud.vm.VirtualMachineManagerImpl] (Job-Executor-71:job-110) Unable to migrate due to internal error Attempt to migrate guest to the same host 00020003-0004-0005-0006-000700080009
2013-05-10 12:21:13,917 INFO [cloud.vm.VirtualMachineManagerImpl] (Job-Executor-71:job-110) Migration was unsuccessful. Cleaning up: VM[User|kvmtest1]
2013-05-10 12:21:13,919 DEBUG [cloud.alert.AlertManagerImpl] (Job-Executor-71:job-110) Have already sent: 1 emails for alert type '16' -- skipping send email
2013-05-10 12:21:13,921 DEBUG [agent.manager.AgentAttache] (Job-Executor-71:job-110) Seq 12-1822163044: Routed from 165160840324569
2013-05-10 12:21:13,921 DEBUG [agent.transport.Request] (Job-Executor-71:job-110) Seq 12-1822163044: Sending { Cmd , MgmtId: 165160840324569, via: 12, Ver: v1, Flags: 100111, [{"StopCommand":{"isProxy":false,"vmName":"i-2-7-VM","wait":0}}] }
2013-05-10 12:21:13,925 DEBUG [cloud.capacity.CapacityManagerImpl] (Job-Executor-71:job-110) VM state transitted from :Migrating to Running with event: OperationFailedvm's original host id: 1 new host id: 1 host id before state transition: 12
2013-05-10 12:21:13,929 DEBUG [cloud.capacity.CapacityManagerImpl] (Job-Executor-71:job-110) Hosts's actual total CPU: 45624 and CPU after applying overprovisioning: 45624
2013-05-10 12:21:13,930 DEBUG [cloud.capacity.CapacityManagerImpl] (Job-Executor-71:job-110) release cpu from host: 12, old used: 4,reserved: 0, actual total: 45624, total with overprovisioning: 45624; new used: 0,reserved:0; movedfromreserved: false,moveToReserveredfalse
2013-05-10 12:21:13,930 DEBUG [cloud.capacity.CapacityManagerImpl] (Job-Executor-71:job-110) release mem from host: 12, old used: 4294967296,reserved: 0, total: 33609699328; new used: 0,reserved:0; movedfromreserved: false,moveToReserveredfalse
2013-05-10 12:21:13,939 WARN [cloud.api.ApiDispatcher] (Job-Executor-71:job-110) class com.cloud.api.ServerApiException : Failed to migrate vm
DEBUG [cloud.async.AsyncJobManagerImpl] (catalina-exec-23:null) submit async job-110, details: AsyncJobVO {id:110, userId: 2, accountId: 2, sessionKey: null, instanceType: None, instanceId: null, cmd: com.cloud.api.commands.MigrateVMCmd, cmdOriginator: null, cmdInfo: {"response":"json","sessionkey":"+UUFHn2vEgL8D23672YRc8DKh6s\u003d","virtualmachineid":"577fecb0-5e1a-4d8e-a986-e9b5ff482a41","hostid":"837fc7af-4c52-4945-a85a-a1e581241eeb","ctxUserId":"2","_":"1368159672367","ctxAccountId":"2","ctxStartEventId":"370"}, cmdVersion: 0, callbackType: 0, callbackAddress: null, status: 0, processStatus: 0, resultCode: 0, result: null, initMsid: 165160840324569, completeMsid: null, lastUpdated: null, lastPolled: null, created: null}
2013-05-10 12:21:13,531 DEBUG [cloud.async.AsyncJobManagerImpl] (Job-Executor-71:job-110) Executing com.cloud.api.commands.MigrateVMCmd for job-110
2013-05-10 12:21:13,556 INFO [cloud.vm.VirtualMachineManagerImpl] (Job-Executor-71:job-110) Migrating VM[User|kvmtest1] to Dest[Zone(Id)-Pod(Id)-Cluster(Id)-Host(Id)-Storage(Volume(Id|Type-->Pool(Id))] : Dest[Zone(1)-Pod(1)-Cluster(1)-Host(12)-Storage()]
2013-05-10 12:21:13,576 DEBUG [cloud.storage.StorageManagerImpl] (Job-Executor-71:job-110) Preparing 1 volumes for VM[User|kvmtest1]
2013-05-10 12:21:13,594 DEBUG [agent.transport.Request] (Job-Executor-71:job-110) Seq 12-1822163043: Sending { Cmd , MgmtId: 165160840324569, via: 12, Ver: v1, Flags: 100111, [{"PrepareForMigrationCommand":{"vm":{"id":7,"name":"i-2-7-VM","type":"User","cpus":2,"speed":2,"minRam":4294967296,"maxRam":4294967296,"arch":"x86_64","os":"CentOS 6.0 (64-bit)","bootArgs":"","rebootOnCrash":false,"enableHA":true,"limitCpuUse":false,"vncPassword":"45f1e9bf5d1cdaa8","params":{},"uuid":"577fecb0-5e1a-4d8e-a986-e9b5ff482a41","disks":[{"id":6,"name":"ROOT-7","mountPoint":"/primary","path":"173f67f8-45ad-4af7-899f-0d8a8597b73c","size":5368709120,"type":"ROOT","storagePoolType":"NetworkFilesystem","storagePoolUuid":"df6510f2-e971-3713-8fdd-aa6c5fe8d72c","deviceId":0},{"id":7,"path":"nfs://10.1.111.150condary/template/tmpl/2/203//203-2-6cee0418-f55e-37cc-88ba-aae74dd8b3f5.iso","size":0,"type":"ISO","storagePoolType":"ISO","deviceId":0}],"nics":[{"deviceId":0,"networkRateMbps":200,"defaultNic":true,"uuid":"976fab39-6b0e-44e9-868d-8b495a33b68b","ip":"10.1.111.185","netmask":"255.255.255.0","gateway":"10.1.111.254","mac":"06:1a:5a:00:00:19","dns1":"8.8.8.8","dns2":"8.8.4.4","broadcastType":"Vlan","type":"Guest","broadcastUri":"vlan://untagged","isolationUri":"ec2://untagged","isSecurityGroupEnabled":false}]},"wait":0}}] }
2013-05-10 12:21:13,843 DEBUG [agent.transport.Request] (AgentManager-Handler-7:null) Seq 12-1822163043: Processing: { Ans: , MgmtId: 165160840324569, via: 12, Ver: v1, Flags: 110, [{"PrepareForMigrationAnswer":{"result":true,"wait":0}}] }
2013-05-10 12:21:13,843 DEBUG [agent.manager.AgentAttache] (AgentManager-Handler-7:null) Seq 12-1822163043: No more commands found
2013-05-10 12:21:13,844 DEBUG [agent.transport.Request] (Job-Executor-71:job-110) Seq 12-1822163043: Received: { Ans: , MgmtId: 165160840324569, via: 12, Ver: v1, Flags: 110, { PrepareForMigrationAnswer } }
2013-05-10 12:21:13,850 DEBUG [cloud.capacity.CapacityManagerImpl] (Job-Executor-71:job-110) VM state transitted from :Running to Migrating with event: MigrationRequestedvm's original host id: 1 new host id: 12 host id before state transition: 1
DEBUG [cloud.capacity.CapacityManagerImpl] (Job-Executor-71:job-110) Hosts's actual total CPU: 45624 and CPU after applying overprovisioning: 45624
2013-05-10 12:21:13,856 DEBUG [cloud.capacity.CapacityManagerImpl] (Job-Executor-71:job-110) We are allocating VM, increasing the used capacity of this host:12
2013-05-10 12:21:13,856 DEBUG [cloud.capacity.CapacityManagerImpl] (Job-Executor-71:job-110) Current Used CPU: 0 , Free CPU:45624 ,Requested CPU: 4
2013-05-10 12:21:13,856 DEBUG [cloud.capacity.CapacityManagerImpl] (Job-Executor-71:job-110) Current Used RAM: 0 , Free RAM:33609699328 ,Requested RAM: 4294967296
2013-05-10 12:21:13,856 DEBUG [cloud.capacity.CapacityManagerImpl] (Job-Executor-71:job-110) CPU STATS after allocation: for host: 12, old used: 0, old reserved: 0, actual total: 45624, total with overprovisioning: 45624; new used:4, reserved:0; requested cpu:4,alloc_from_last:false
2013-05-10 12:21:13,856 DEBUG [cloud.capacity.CapacityManagerImpl] (Job-Executor-71:job-110) RAM STATS after allocation: for host: 12, old used: 0, old reserved: 0, total: 33609699328; new used: 4294967296, reserved: 0; requested mem: 4294967296,alloc_from_last:false
2013-05-10 12:21:13,862 DEBUG [agent.transport.Request] (Job-Executor-71:job-110) Seq 1-1874334912: Sending { Cmd , MgmtId: 165160840324569, via: 1, Ver: v1, Flags: 100111, [{"MigrateCommand":{"vmName":"i-2-7-VM","destIp":"10.1.111.151","hostGuid":"b8da45b7-63d4-34ad-83fe-4868eef53e7c-LibvirtComputingResource","isWindows":false,"wait":0}}] }
2013-05-10 12:21:13,917 DEBUG [agent.transport.Request] (AgentManager-Handler-1:null) Seq 1-1874334912: Processing: { Ans: , MgmtId: 165160840324569, via: 1, Ver: v1, Flags: 110, [{"MigrateAnswer":{"result":false,"details":"internal error Attempt to migrate guest to the same host 00020003-0004-0005-0006-000700080009","wait":0}}] }
2013-05-10 12:21:13,917 DEBUG [agent.manager.AgentAttache] (AgentManager-Handler-1:null) Seq 1-1874334912: No more commands found
2013-05-10 12:21:13,917 DEBUG [agent.transport.Request] (Job-Executor-71:job-110) Seq 1-1874334912: Received: { Ans: , MgmtId: 165160840324569, via: 1, Ver: v1, Flags: 110, { MigrateAnswer } }
2013-05-10 12:21:13,917 ERROR [cloud.vm.VirtualMachineManagerImpl] (Job-Executor-71:job-110) Unable to migrate due to internal error Attempt to migrate guest to the same host 00020003-0004-0005-0006-000700080009
2013-05-10 12:21:13,917 INFO [cloud.vm.VirtualMachineManagerImpl] (Job-Executor-71:job-110) Migration was unsuccessful. Cleaning up: VM[User|kvmtest1]
2013-05-10 12:21:13,919 DEBUG [cloud.alert.AlertManagerImpl] (Job-Executor-71:job-110) Have already sent: 1 emails for alert type '16' -- skipping send email
2013-05-10 12:21:13,921 DEBUG [agent.manager.AgentAttache] (Job-Executor-71:job-110) Seq 12-1822163044: Routed from 165160840324569
2013-05-10 12:21:13,921 DEBUG [agent.transport.Request] (Job-Executor-71:job-110) Seq 12-1822163044: Sending { Cmd , MgmtId: 165160840324569, via: 12, Ver: v1, Flags: 100111, [{"StopCommand":{"isProxy":false,"vmName":"i-2-7-VM","wait":0}}] }
2013-05-10 12:21:13,925 DEBUG [cloud.capacity.CapacityManagerImpl] (Job-Executor-71:job-110) VM state transitted from :Migrating to Running with event: OperationFailedvm's original host id: 1 new host id: 1 host id before state transition: 12
2013-05-10 12:21:13,929 DEBUG [cloud.capacity.CapacityManagerImpl] (Job-Executor-71:job-110) Hosts's actual total CPU: 45624 and CPU after applying overprovisioning: 45624
2013-05-10 12:21:13,930 DEBUG [cloud.capacity.CapacityManagerImpl] (Job-Executor-71:job-110) release cpu from host: 12, old used: 4,reserved: 0, actual total: 45624, total with overprovisioning: 45624; new used: 0,reserved:0; movedfromreserved: false,moveToReserveredfalse
2013-05-10 12:21:13,930 DEBUG [cloud.capacity.CapacityManagerImpl] (Job-Executor-71:job-110) release mem from host: 12, old used: 4294967296,reserved: 0, total: 33609699328; new used: 0,reserved:0; movedfromreserved: false,moveToReserveredfalse
2013-05-10 12:21:13,939 WARN [cloud.api.ApiDispatcher] (Job-Executor-71:job-110) class com.cloud.api.ServerApiException : Failed to migrate vm
上边加粗的地方就是失败的原因。是KVM中libvirt的uuid出的问题。 解决方法如下:
#uuidgen //获取一个uuid #vi /etc/libvirt/libvirtd.conf //编辑配置文件 host_uuid = “00000000-0000-0000-0000-000000000000″ //将之前获取的uuid填在这里。 #service libvirtd restart //重启服务 应该就可以在线迁移了。
如果还有问题,可以尝试重启CloudStack的 KVM agent,或KVM所在的主机。
参考文档:
http://vaunaspada.babel.it/blog/?p=613
http://bbs.linuxtone.org/thread-22673-1-1.html
相关推荐
在本篇《CentOS6.5_CloudStack_KVM安装手册》中,我们将详细探讨如何在CentOS 6.5操作系统上使用CloudStack管理和部署基于KVM的虚拟化环境。CloudStack是一个开源的云基础设施管理平台,而KVM(Kernel-based Virtual...
在实验室环境中,可以使用CentOS 7虚拟机作为载体,构建基于CloudStack和KVM的云计算IaaS平台。这样的私有云通过虚拟化计算、存储和网络资源,可以有效地提高企业数据中心资源的利用率。 在构建云计算IaaS平台时,...
Apache CloudStack 4.0 + KVM 安装手册 Apache CloudStack 4.0 + KVM 安装手册 Apache CloudStack 4.0 + KVM 安装手册
KVM虚拟机迁移是指将正在运行或已暂停的虚拟机从一台物理主机移动到另一台物理主机上运行的过程。这一过程可以在不同的应用环境下实现,例如从一台运行着SUSE Linux Enterprise Edition 11 SP1的物理主机迁移到另一...
CloudStack4.10的系统VM文件,如果需要让CloudStack支持kvm虚拟机,需要将该 文件导入到系统中,以支持kvm的系统VM。 1 上传系统vm文件到/data/secondary目录 2 解压缩系统vm文件 bunzip2 systemvm64template-4.10-...
摘 要:在CloudStack平台与OpenStack平台共存的环境中,为了使CloudStack平台中已创建的KVM虚拟机在迁移到OpenStack平台后可以被OpenStack平台的控制节点正确识别并接管,提出了一种将CloudStack平台中已经存在的...
cloudstack 4.3版本中文手册,国内中文资料缺乏的情况下能有个很好的补充。
由于最近工程需要用到这个东西,于是乎,在网上找了些资料解决了CloudStack创建主存储失败(SR已经被使用),删除SR后成功,的问题,这里就记录下: 创建主存储时,可能会发生创建存储pool失败(SR已经被使用,重...
CloudStack是一个开源的云计算平台,具有高可用性和扩展性,支持管理多种主流的hypervisors,如KVM、XenServer、VMware、OracleVM、Xen等。作为一个IaaS层统一管理监控平台,CloudStack提供了对大量主机和存储的...
CloudStack网络架构深入浅出
文档的故障整理章节提到了在实际部署过程中可能遇到的多个问题及其解决方法,例如无法添加ESXi主机、主存储添加失败、系统VM启动问题等。这些问题的描述和解决策略对减少部署和运维过程中的故障停机时间具有重要意义...
sdn网络在cloudstack中的应用,pdf,内容详细,非常实用。
CloudStack + XenServer 部署方案是一种常见的云计算基础设施搭建方法,主要应用于大规模虚拟化环境。CloudStack 是一款开源的云基础设施服务平台,它允许管理员轻松地构建、管理和提供计算、网络和存储服务。...
CloudStack 提供了一个简单易用的 Web 控制台来管理计算资源,并且支持多种虚拟化技术,包括 XenServer、KVM 和 VMware 等。 在部署 CloudStack 4.2 的过程中,主要涉及以下几个组件: 1. **NFS 服务**:为 ...
Apache CloudStack是一款开源的云管理平台,旨在提供一个安全、多租户的云计算编排解决方案。它支持多种虚拟化技术,如KVM、XenServer等,并且具备高度可扩展性和安全性。CloudStack不仅能够帮助用户构建私有云环境...