mac系统做openstack qcow2/raw镜像
(1)vmware安装出来虚拟机(操作系统不拆分)(2)zhangjinyudeMacBook-Pro:Asianux.vmwarevm zhangjinyu$ ls -lhtotal 2820216-rw------- 1 zhangjinyu staff8.5K 4 9 22:00 Asianux.nvram-rw-r--r-- 1 zhangjinyu sta...
(1)vmware安装出来虚拟机(操作系统不拆分)
(2)
zhangjinyudeMacBook-Pro:Asianux.vmwarevm zhangjinyu$ ls -lh
total 2820216
-rw------- 1 zhangjinyu staff 8.5K 4 9 22:00 Asianux.nvram
-rw-r--r-- 1 zhangjinyu staff 674B 4 9 21:59 Asianux.plist
-rw-r--r-- 1 zhangjinyu staff 0B 4 9 21:53 Asianux.vmsd
-rwxr-xr-x 1 zhangjinyu staff 2.7K 4 9 22:00 Asianux.vmx
-rw-r--r-- 1 zhangjinyu staff 262B 4 9 21:59 Asianux.vmxf
-rw-r--r-- 1 zhangjinyu staff 0B 4 9 22:00 quicklook-cache.png
-rw-r--r-- 1 zhangjinyu staff 418K 4 9 22:00 vmware.log
-rw-r--r-- 1 zhangjinyu staff 1.3G 4 9 22:00 虚拟磁盘.vmdk
zhangjinyudeMacBook-Pro:Asianux.vmwarevm zhangjinyu$
(3)拷贝虚拟磁盘.vmdk 到Centos安装出的虚拟机
(4)安装qemu-img 工具 yum install qemu-img -y
(5)[root@master ~]# qemu-img info 虚拟磁盘.vmdk
image: 虚拟磁盘.vmdk
file format: vmdk
virtual size: 30G (32212254720 bytes)
disk size: 1.3G
cluster_size: 65536
Format specific information:
cid: 23579234
parent cid: 4294967295
create type: monolithicSparse
extents:
[0]:
virtual size: 32212254720
filename: 虚拟磁盘.vmdk
cluster size: 65536
format:
[root@master ~]# qemu-img convert -f vmdk -O qcow2 虚拟磁盘.vmdk asianux.qcow2
[root@master ~]# qemu-img convert -f qcow2 -O raw asianux.qcow2 asianux.raw
[root@master ~]# ls -lh asianux.*
-rw-r--r-- 1 root root 1.4G 4月 9 07:07 asianux.qcow2
-rw-r--r-- 1 root root 30G 4月 9 07:09 asianux.raw (qcow2转换为raw后,系统镜像为30G)
[root@master ~]#
更多推荐
所有评论(0)