`
tanthalas
  • 浏览: 19582 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

CloudStack中,KVM上VM迁移失败的解决方法

阅读更多

在群里,有朋友问到,使用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

 

上边加粗的地方就是失败的原因。是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

分享到:
评论

相关推荐

    CloudStack部署运维手册V2.pdf

    - **解决方法**:确保每个CloudStack管理节点只负责管理独立的VCenter环境。 - **【5】 集成XenServer,主存储报错01** - **问题原因**:通常是由于存储连接问题或权限设置不当引起。 - **解决方法**:检查存储...

    CloudStack 与 OpenStack 的比较

    - **CloudStack:** Management Server、Usage Server、Host Agent (仅限KVM/OVM)、System VM、Virtual Router等。 - **OpenStack:** Nova (计算)、Glance (镜像管理)、Keystone (认证服务)、Horizon (仪表板)、...

    开源云计算平台CloudStack架构浅析.docx

    CloudStack支持多种主流的hypervisors,如KVM、XenServer、VMware、OracleVM和Xen等。这一特点使得CloudStack能够在不同环境下运行,满足多样化的需求。 #### 四、CloudStack的核心组件与架构 - **用户层**:用户...

    计算机发展与计算机应用概述.pdf

    计算机发展与计算机应用概述.pdf

    计算机二级公共基础知识全集合.pdf

    计算机二级公共基础知识全集合.pdf

    计算机机试答案.pdf

    计算机机试答案.pdf

    基于STM32F103的750W全桥逆变器并离网设计方案及其实现

    内容概要:本文详细介绍了基于STM32F103RCT6的750W全桥逆变器设计方案,涵盖硬件电路设计、软件编程以及保护机制等方面。硬件部分包括主控芯片的选择、PWM配置、Boost升压电路、PCB布局优化等;软件部分涉及并离网切换的状态机设计、过流保护、风扇控制算法、并机功能实现等。文中还分享了许多实战经验和调试技巧,如死区时间配置、电流采样方法、并网同步算法等。 适合人群:具有一定电子电路和嵌入式开发基础的技术人员,尤其是从事逆变器及相关电力电子产品开发的工程师。 使用场景及目标:适用于希望深入了解逆变器工作原理和技术实现的开发者,特别是那些需要掌握并离网切换、高效电源管理及可靠保护机制的人群。目标是帮助读者构建一个稳定可靠的逆变器系统,能够应对各种复杂的工作环境。 其他说明:本文不仅提供了详细的理论讲解,还有丰富的代码片段和实践经验分享,有助于读者更好地理解和应用相关技术。

    基于Simulink的单相全桥逆变器仿真与优化:MATLAB环境下的详细实现

    内容概要:本文详细介绍了如何利用Simulink在MATLAB环境中搭建单相全桥逆变器的仿真模型。首先,通过构建H桥结构,连接直流电源和RL负载,并引入PWM控制器进行开关管的控制。接着,针对仿真过程中遇到的各种问题,如谐波失真、开关管直通等问题,提出了具体的解决方案,包括加入LC滤波器、设置死区时间和优化PWM参数等。此外,还探讨了通过MATLAB脚本自动化测试不同参数组合的方法,以及如何提高电压利用率和降低谐波失真。最终,通过对仿真结果的分析,验证了所提方法的有效性和优越性。 适合人群:电力电子工程师、科研人员、高校学生等对逆变器仿真感兴趣的群体。 使用场景及目标:适用于研究和开发高效、稳定的逆变器系统,旨在通过仿真手段减少实验成本,优化设计方案,提高系统的性能指标。 其他说明:文中提供了详细的建模步骤和技术细节,帮助读者更好地理解和掌握相关技术和方法。同时,强调了仿真参数的选择和优化对于获得理想仿真结果的重要性。

    计算机红外通信.pdf

    计算机红外通信.pdf

    软考考试学习必备资料.md

    软考考试学习必备资料.md

    基于cornerstonejs开发移动端

    基于cornerstonejs开发移动端

    JavaScript网页设计高级案例:构建交互式图片画廊#JavaScript

    构建交互式图片画廊

    在学习Wpf的过程中,手搓了一个2048

    源码

    Bosch Rexroth IndraWorks Ds IndraWorks Ds 14V16.310.0

    Bosch Rexroth IndraWorks Ds IndraWorks Ds 14V16.310.0

    java面向对象 - 类与对象

    java面向对象 - 类与对象

    电机控制领域无感FOC算法的AT32平台实现及其鲁棒性优化

    内容概要:本文详细介绍了基于AT32平台的无感FOC(Field-Oriented Control)控制算法,特别是针对永磁同步电机(PMSM)和无刷直流电机(BLDC)的位置速度观测器实现。文章首先展示了启动策略的独特之处,即跳过传统前馈强拖阶段,直接利用矢量控制环和观测器协同启动。接着深入探讨了磁链观测器的核心算法,包括磁链积分、反正切求角度以及速度估算部分使用的改良版PLL。此外,文中还提到了容差配置模块,用于提高系统的鲁棒性和稳定性。最后,强调了模块间良好的解耦设计,使得各功能模块拥有明确的输入输出接口,增强了代码的可维护性和移植性。 适合人群:从事电机控制系统开发的技术人员,尤其是对无感FOC算法感兴趣的工程师。 使用场景及目标:适用于需要高精度、快速响应的电机控制系统开发项目,旨在提升系统的鲁棒性和稳定性,特别是在电机参数存在偏差的情况下依然能够保持良好性能。 其他说明:文章不仅提供了详细的代码实现,还分享了许多实用的经验和技术细节,如启动策略、磁链观测器的物理本质、速度估算方法等,有助于读者更好地理解和应用无感FOC算法。

    计算机机房de设置与维护.pdf

    计算机机房de设置与维护.pdf

    《Java 面试进阶指北 》 质量很高,专为面试打造

    《Java 面试进阶指北 》 质量很高,专为面试打造

    外转子开关磁阻电机多目标优化的NSGA-II算法实现与Matlab代码解析

    内容概要:本文详细介绍了外转子开关磁阻电机(ER-SRM)的多目标优化方法,主要采用NSGA-II算法进行优化。文章首先解释了为什么ER-SRM比传统内转子电机更难以优化,接着展示了如何利用NSGA-II算法解决这一难题。文中提供了详细的Matlab代码,包括种群初始化、交叉变异操作、非支配排序以及目标函数的定义。此外,还讨论了优化过程中的一些注意事项,如初始种群多样性的保持、交叉变异参数的选择、目标函数的设计等。最后,通过具体的案例和图表展示了优化结果及其应用价值。 适合人群:从事电机设计与优化的研究人员和技术人员,尤其是对外转子开关磁阻电机感兴趣的读者。 使用场景及目标:适用于需要同时优化电机效率、转矩波动和制造成本等多种目标的情况。通过NSGA-II算法,可以在多个相互冲突的目标间找到最佳平衡点,从而提高电机的整体性能。 其他说明:文章不仅提供了完整的Matlab代码实现,还分享了许多实践经验,如参数设置的经验公式、常见错误及解决方案等。这对于理解和掌握NSGA-II算法的实际应用非常有帮助。

Global site tag (gtag.js) - Google Analytics