欧卡2中文社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

需要三步,才能开始

只需两步,慢速开始

玩欧卡就用莱仕达V10方向盘欧卡2入门方向盘选莱仕达V9莱仕达折叠便携游戏方向盘支架欢迎地图Mod入驻
查看: 14773|回复: 4
收起左侧

cloudstack qcow2转vmdk

[复制链接]
oppo 发表于 2015-4-3 17:44 | 显示全部楼层 |阅读模式
[root@manage primary]# qemu-img info 09ecf7a5-71f1-45be-8bc3-f0af92f3a193.qcow2 
image: 09ecf7a5-71f1-45be-8bc3-f0af92f3a193.qcow2
file format: qcow2
virtual size: 20G (21474836480 bytes)
disk size: 7.5G
cluster_size: 65536
backing file: /mnt/5a22d431-3afa-3e44-b224-a17ebd40ef87/e6589794-7870-4661-8083-8a13dda869fc
[root@manage primary]# ls /mnt/
03670ba8-2436-322f-a299-57c2523960c3/ 4172fed3-fa1e-38e7-b125-5e2adce6bf9b/ 94cbef73-7385-3a63-a2c8-d560df60358b/
17a4cd56-8b65-3f01-8ae5-c7e787e43305/ 5a22d431-3afa-3e44-b224-a17ebd40ef87/ e7a6599c-dda3-3caf-a373-c926d0925854/
23870940-3c91-34a6-928b-bb93fbb9a8e4/ 71883eb6-2d49-362b-9f59-72c401b564af/ secondary/
[root@manage primary]# du -sh /mnt/*
4.0K /mnt/03670ba8-2436-322f-a299-57c2523960c3
4.0K /mnt/17a4cd56-8b65-3f01-8ae5-c7e787e43305
4.0K /mnt/23870940-3c91-34a6-928b-bb93fbb9a8e4
4.0K /mnt/4172fed3-fa1e-38e7-b125-5e2adce6bf9b
20G /mnt/5a22d431-3afa-3e44-b224-a17ebd40ef87
4.0K /mnt/71883eb6-2d49-362b-9f59-72c401b564af
4.0K /mnt/94cbef73-7385-3a63-a2c8-d560df60358b
4.0K /mnt/e7a6599c-dda3-3caf-a373-c926d0925854
286M /mnt/secondary
[root@manage primary]# ls /mnt/5a22d431-3afa-3e44-b224-a17ebd40ef87/|grep e6589794
[root@manage primary]# mv tmpok/e6589794-7870-4661-8083-8a13dda869fc.qcow2 /mnt/5a22d431-3afa-3e44-b224-a17ebd40ef87/
[root@manage primary]# mv /mnt/5a22d431-3afa-3e44-b224-a17ebd40ef87/e6589794-7870-4661-8083-8a13dda869fc.qcow2 /mnt/5a22d431-3afa-3e44-b224-a17ebd40ef87/e6589794-7870-4661-8083-8a13dda869fc
[root@manage primary]# ls
09ecf7a5-71f1-45be-8bc3-f0af92f3a193.qcow2  8484ea0b-4d55-4a13-a345-ef39bc3bc18b.qcow2  diskok       tmpok
218baff4-7f45-4964-aaa4-16190f36535a.qcow2  8f48a129-8c16-4395-ab47-025f46fc9a62.qcow2  failed
408fa3e7-48d7-4e7e-8d79-f502cbb62222.qcow2  92a933e2-f457-4649-aaf0-6d1b6ae912b9.qcow2  KVMHA.qcow2
71950d98-554b-4c68-95e5-d48c139c6c61.qcow2  95bdede1-4676-4c6f-a080-7fb887404853.qcow2  small
[root@manage primary]# du -sh 09ecf7a5-71f1-45be-8bc3-f0af92f3a193.qcow2 
7.5G 09ecf7a5-71f1-45be-8bc3-f0af92f3a193.qcow2
[root@manage primary]# qemu-img convert -O vmdk 09ecf7a5-71f1-45be-8bc3-f0af92f3a193.qcow2 09ecf7a5.vmdk
[root@manage primary]# ls
09ecf7a5-71f1-45be-8bc3-f0af92f3a193.qcow2  8484ea0b-4d55-4a13-a345-ef39bc3bc18b.qcow2  failed
09ecf7a5.vmdk                               8f48a129-8c16-4395-ab47-025f46fc9a62.qcow2  KVMHA.qcow2
218baff4-7f45-4964-aaa4-16190f36535a.qcow2  92a933e2-f457-4649-aaf0-6d1b6ae912b9.qcow2  small
408fa3e7-48d7-4e7e-8d79-f502cbb62222.qcow2  95bdede1-4676-4c6f-a080-7fb887404853.qcow2  tmpok
71950d98-554b-4c68-95e5-d48c139c6c61.qcow2  diskok
[root@manage primary]# du -sh 09ecf7a5
du: 无法访问"09ecf7a5": 没有那个文件或目录
[root@manage primary]# du -sh 09ecf7a5.vmdk 
8.2G 09ecf7a5.vmdk
[root@manage primary]#
 楼主| oppo 发表于 2015-4-3 18:02 | 显示全部楼层
mysql> use cloud;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> select * from volumes where name="fa508179";
+----+------------+-----------+---------+--------------+-------------+-----------+----------+--------------------------------------+-------------+--------+------+--------+----------------+------------+---------+-------------+-----------+------------------+-------------+----------------------------+-------------+---------------------+----------+---------------------+---------+---------+------------+--------------+-----------+------------------------+--------+----------------+--------+----------+----------+---------------+
| id | account_id | domain_id | pool_id | last_pool_id | instance_id | device_id | name     | uuid                                 | size        | folder | path | pod_id | data_center_id | iscsi_name | host_ip | volume_type | pool_type | disk_offering_id | template_id | first_snapshot_backup_uuid | recreatable | created             | attached | updated             | removed | state   | chain_info | update_count | disk_type | vm_snapshot_chain_size | iso_id | display_volume | format | min_iops | max_iops | hv_ss_reserve |
+----+------------+-----------+---------+--------------+-------------+-----------+----------+--------------------------------------+-------------+--------+------+--------+----------------+------------+---------+-------------+-----------+------------------+-------------+----------------------------+-------------+---------------------+----------+---------------------+---------+---------+------------+--------------+-----------+------------------------+--------+----------------+--------+----------+----------+---------------+
| 80 |          2 |         1 |       1 |         NULL |        NULL |      NULL | fa508179 | 5041bb22-5d49-4412-9bf0-894936d01fc5 | 21474836480 | NULL   | NULL |   NULL |              1 | NULL       | NULL    | DATADISK    | NULL      |                6 |        NULL | NULL                       |           0 | 2015-04-03 09:03:55 | NULL     | 2015-04-03 09:05:48 | NULL    | Copying | NULL       |            3 | NULL      |                   NULL |   NULL |              1 | QCOW2  |     NULL |     NULL |          NULL |
+----+------------+-----------+---------+--------------+-------------+-----------+----------+--------------------------------------+-------------+--------+------+--------+----------------+------------+---------+-------------+-----------+------------------+-------------+----------------------------+-------------+---------------------+----------+---------------------+---------+---------+------------+--------------+-----------+------------------------+--------+----------------+--------+----------+----------+---------------+
1 row in set (0.00 sec)

mysql> update volumes set state="Ready" where name="fa508179";
Query OK, 1 row affected (0.02 sec)
Rows matched: 1  Changed: 1  Warnings: 0

mysql> update volumes set state="Ready" where name="71950d98";
Query OK, 1 row affected (0.02 sec)
Rows matched: 1  Changed: 1  Warnings: 0

 楼主| oppo 发表于 2015-4-3 18:03 | 显示全部楼层
 楼主| oppo 发表于 2015-4-25 18:49 | 显示全部楼层
 楼主| oppo 发表于 2015-4-25 19:09 | 显示全部楼层

联系我们|手机版|欧卡2中国 ( 湘ICP备11020288号-1 )

GMT+8, 2024-3-29 19:47 , Processed in 0.035413 second(s), 7 queries , Redis On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表