热门标签 | HotTags
当前位置:  开发笔记 > 前端 > 正文

CloudStack平台中KVM虚拟机迁移失败的解决方法

在群里,有朋友问到,使用kvm的主机,迁移VM失败。在迁移的时候UI上选择迁移主机的时候提示(notsuitable),迁移操作后的报错log如下:log写道2013-05-1012:21:12,906DEBUG[agent.transport.Request](StatsCollector-1:null)Seq12-

在群里,有朋友问到,使用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所在的主机。


推荐阅读
  • YOLOv7基于自己的数据集从零构建模型完整训练、推理计算超详细教程
    本文介绍了关于人工智能、神经网络和深度学习的知识点,并提供了YOLOv7基于自己的数据集从零构建模型完整训练、推理计算的详细教程。文章还提到了郑州最低生活保障的话题。对于从事目标检测任务的人来说,YOLO是一个熟悉的模型。文章还提到了yolov4和yolov6的相关内容,以及选择模型的优化思路。 ... [详细]
  • 如何在服务器主机上实现文件共享的方法和工具
    本文介绍了在服务器主机上实现文件共享的方法和工具,包括Linux主机和Windows主机的文件传输方式,Web运维和FTP/SFTP客户端运维两种方式,以及使用WinSCP工具将文件上传至Linux云服务器的操作方法。此外,还介绍了在迁移过程中需要安装迁移Agent并输入目的端服务器所在华为云的AK/SK,以及主机迁移服务会收集的源端服务器信息。 ... [详细]
  • CentOS 7部署KVM虚拟化环境之一架构介绍
    本文介绍了CentOS 7部署KVM虚拟化环境的架构,详细解释了虚拟化技术的概念和原理,包括全虚拟化和半虚拟化。同时介绍了虚拟机的概念和虚拟化软件的作用。 ... [详细]
  • CentOS 6.5安装VMware Tools及共享文件夹显示问题解决方法
    本文介绍了在CentOS 6.5上安装VMware Tools及解决共享文件夹显示问题的方法。包括清空CD/DVD使用的ISO镜像文件、创建挂载目录、改变光驱设备的读写权限等步骤。最后给出了拷贝解压VMware Tools的操作。 ... [详细]
  • 在Android中解析Gson解析json数据是很方便快捷的,可以直接将json数据解析成java对象或者集合。使用Gson解析json成对象时,默认将json里对应字段的值解析到java对象里对应字段的属性里面。然而,当我们自己定义的java对象里的属性名与json里的字段名不一样时,我们可以使用@SerializedName注解来将对象里的属性跟json里字段对应值匹配起来。本文介绍了使用@SerializedName注解解析json数据的方法,并给出了具体的使用示例。 ... [详细]
  • Centos下安装memcached+memcached教程
    本文介绍了在Centos下安装memcached和使用memcached的教程,详细解释了memcached的工作原理,包括缓存数据和对象、减少数据库读取次数、提高网站速度等。同时,还对memcached的快速和高效率进行了解释,与传统的文件型数据库相比,memcached作为一个内存型数据库,具有更高的读取速度。 ... [详细]
  • express工程中的json调用方法
    本文介绍了在express工程中如何调用json数据,包括建立app.js文件、创建数据接口以及获取全部数据和typeid为1的数据的方法。 ... [详细]
  • python3 nmap函数简介及使用方法
    本文介绍了python3 nmap函数的简介及使用方法,python-nmap是一个使用nmap进行端口扫描的python库,它可以生成nmap扫描报告,并帮助系统管理员进行自动化扫描任务和生成报告。同时,它也支持nmap脚本输出。文章详细介绍了python-nmap的几个py文件的功能和用途,包括__init__.py、nmap.py和test.py。__init__.py主要导入基本信息,nmap.py用于调用nmap的功能进行扫描,test.py用于测试是否可以利用nmap的扫描功能。 ... [详细]
  • 本文详细介绍了在Centos7上部署安装zabbix5.0的步骤和注意事项,包括准备工作、获取所需的yum源、关闭防火墙和SELINUX等。提供了一步一步的操作指南,帮助读者顺利完成安装过程。 ... [详细]
  • Skywalking系列博客1安装单机版 Skywalking的快速安装方法
    本文介绍了如何快速安装单机版的Skywalking,包括下载、环境需求和端口检查等步骤。同时提供了百度盘下载地址和查询端口是否被占用的命令。 ... [详细]
  • 本文介绍了lua语言中闭包的特性及其在模式匹配、日期处理、编译和模块化等方面的应用。lua中的闭包是严格遵循词法定界的第一类值,函数可以作为变量自由传递,也可以作为参数传递给其他函数。这些特性使得lua语言具有极大的灵活性,为程序开发带来了便利。 ... [详细]
  • GetWindowLong函数
    今天在看一个代码里头写了GetWindowLong(hwnd,0),我当时就有点费解,靠,上网搜索函数原型说明,死活找不到第 ... [详细]
  • 基于layUI的图片上传前预览功能的2种实现方式
    本文介绍了基于layUI的图片上传前预览功能的两种实现方式:一种是使用blob+FileReader,另一种是使用layUI自带的参数。通过选择文件后点击文件名,在页面中间弹窗内预览图片。其中,layUI自带的参数实现了图片预览功能。该功能依赖于layUI的上传模块,并使用了blob和FileReader来读取本地文件并获取图像的base64编码。点击文件名时会执行See()函数。摘要长度为169字。 ... [详细]
  • 如何去除Win7快捷方式的箭头
    本文介绍了如何去除Win7快捷方式的箭头的方法,通过生成一个透明的ico图标并将其命名为Empty.ico,将图标复制到windows目录下,并导入注册表,即可去除箭头。这样做可以改善默认快捷方式的外观,提升桌面整洁度。 ... [详细]
  • 本文介绍了Java工具类库Hutool,该工具包封装了对文件、流、加密解密、转码、正则、线程、XML等JDK方法的封装,并提供了各种Util工具类。同时,还介绍了Hutool的组件,包括动态代理、布隆过滤、缓存、定时任务等功能。该工具包可以简化Java代码,提高开发效率。 ... [详细]
author-avatar
搞笑宠物图片
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有