KVM+ceph-RBD 快照创建问题
环境描述
ceph集群,Luminous 12.2.5版本;
执行操作
1.划分存储池cloud,指定存储池rbd模式,创建映像bak-image;
2.KVM宿主机,创建虚拟机centos7,修改配置文件通过ceph官网文档介绍libvirt访问ceph-RBD;
操作参考:
http://docs.ceph.com/docs/master/rbd/libvirt/
KVM虚拟机可以直接访问到ceph-rbd存储块,从虚拟机本地对块存储读写正常。
错误描述
对虚拟机创建快照发生故障报错,报错信息如下:
报错1:
virsh # snapshot-create-as centos7-bakdata centos7-bakdata_20180524
error: unsupported configuration: internal snapshot for disk vdb unsupported for storage type raw
关闭虚拟机,制作快照,仍然报错;
报错2:
virsh # snapshot-create-as centos7-bakdata centos7-bakdata_20180524
error: internal error: internal inactive snapshots are not supported on 'network' disks using 'rbd' protocol
解决思路
针对报错1,查询之后解决思路如下:
1.在ceph集群上创建qcow2格式映像;
- 关闭KVM虚拟机后创建快照;
方法一,参考官网qemu-img命令在ceph集群上创建qcow2格式镜像,最终KVM识别出来仍是RAW格式,无效;
方法二,关闭KVM虚拟机创建快照,产生报错2;
提示不支持网络盘使用rbd协议;
遗留问题
如何使KVM虚拟机访问ceph-RBD支持快照创建?