博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
qcow2 转 lv (kvm)
阅读量:6912 次
发布时间:2019-06-27

本文共 802 字,大约阅读时间需要 2 分钟。

hot3.png

一、查看qcow2真实大小

     首先检查qcow2文件原始大小为多少  

 #qemu-img info centos6.6.qcow2 image: centos6.6.qcow2file format: qcow2virtual size: 44G (47603253248 bytes)disk size: 1.9Gcluster_size: 65536Format specific information:    compat: 0.10

   从上看出磁盘真实大小为47603253248 bytes

二、创建lv

   本文环境中sda6大小为100G

   分别创建pv vg lv

   注意: lv的大小为上文qcow2镜像的真实大小 单位为b

# pvcreate /dev/sda6  Physical volume "/dev/sda6" successfully created# vgcreate lvm_pool /dev/sda6  Volume group "lvm_pool" successfully created# lvcreate -L 47603253248b -n centos6.6 lvm_pool  Rounding up size to full physical extent 44.34 GiB  Logical volume "centos6.6" created.

  本文创建的lv 为  /dev/lvm_pool/centos6.6

三、将qcow2数据同步至lv

# qemu-img convert -p -O raw centos6.6.qcow2 /dev/lvm_pool/centos6.6

   等待完成后即可进入下一步

四、使用创建好的lv创建虚拟机

步骤如图所示:

164534_jnpX_1436224.png

164534_nHxt_1436224.png

164535_TMJe_1436224.png

164535_2UNw_1436224.png

164535_2CYx_1436224.png

转载于:https://my.oschina.net/firxiao/blog/467390

你可能感兴趣的文章
Android开发基础知识
查看>>
Ubuntu的快捷键
查看>>
视频压缩编码问答--转载
查看>>
android ListView中使用notifyDataSetChanged()不刷新
查看>>
Sandcastle入门:创建C#帮助文档
查看>>
[bzoj 4036][HAOI2015]按位或
查看>>
Django的ModelForm
查看>>
C++对象指针—指向对象成员的指针
查看>>
supermap使用小结
查看>>
FocusBI:地产分析&雪花模型
查看>>
ZOJ 3870 Team Formation 位运算 位异或用与运算做的
查看>>
UITabBar背景替换
查看>>
SharePoint2013 App 开发中 自定义网站栏,内容类型,列表。
查看>>
Fitnesse - Slim Tables
查看>>
华硕笔记本无法U盘启动,快捷键识别不了
查看>>
JS移动客户端--触屏滑动事件
查看>>
PyCharm 怎么查看 Python 的变量类型和变量内容
查看>>
贪心,布置作业
查看>>
LA 3415 保守的老师
查看>>
不使用中间变量交换两数
查看>>