标签:create 块设备 ubuntu rtu centos source tac data class
[root@ubuntu ~]# qemu-img create -f raw /data/raw/disk02.raw 5G
Formatting '/data/raw/disk02.raw', fmt=raw size=5368709120
[root@ubuntu ~]# qemu-img info /data/raw/disk02.raw
image: /data/raw/disk02.raw
file format: raw
virtual size: 5.0G (5368709120 bytes)
disk size: 0
[root@ubuntu ~]# virsh attach-disk centosv6.5.23_01 [--source] /data/raw/disk02.raw sdb --subdriver=raw --live --config
Disk attached successfully
[root@ubuntu ~]# virsh domblklist centosv6.5.23_01
Target Source
------------------------------------------------
hda /data/raw/disk01.raw
hdc -
sdb /data/raw/disk02.raw
[root@ubuntu ~]# virsh detach-disk centosv6.5.23_01 [--target] sdc --live --config
标签:create 块设备 ubuntu rtu centos source tac data class
原文地址:https://www.cnblogs.com/wshenjin/p/11063867.html