1.用dd的方式生成虚拟磁盘
[root@node13 vm]# dd if=/dev/zero of=/home/vm/node53.img bs=1024k count=102400
2.将虚拟磁盘热添加到虚拟机
[root@node13 vm]# virsh attach-disk node53 /home/vm/node53.img vdc --subdriver=raw
Disk attached successfully
3.在虚拟机中查看新添加的磁盘
[root@node53 ~]#fdisk -l
Disk /dev/vda: 10.7GB, 10737418240 bytes
16 heads, 63sectors/track, 20805 cylinders
Units = cylinders of1008 * 512 = 516096 bytes
Sector size(logical/physical): 512 bytes / 512 bytes
I/O size(minimum/optimal): 512 bytes / 512 bytes
Disk identifier:0x0001ce1f
Device Boot Start End Blocks Id System
/dev/vda1 * 3 16256 8192000 83 Linux
Partition 1 does notend on cylinder boundary.
/dev/vda2 16257 20320 2048000 82 Linux swap / Solaris
Partition 2 does notend on cylinder boundary.
Disk /dev/vdb: 26.8GB, 26843545600 bytes
16 heads, 63sectors/track, 52012 cylinders
Units = cylinders of1008 * 512 = 516096 bytes
Sector size(logical/physical): 512 bytes / 512 bytes
I/O size(minimum/optimal): 512 bytes / 512 bytes
Disk identifier:0xf7a9f37a
Device Boot Start End Blocks Id System
/dev/vdb1 1 52012 26214016+ 83 Linux
Disk /dev/vdc: 107.4GB, 107374182400 bytes
16 heads, 63sectors/track, 208050 cylinders
Units = cylinders of1008 * 512 = 516096 bytes
Sector size(logical/physical): 512 bytes / 512 bytes
I/O size(minimum/optimal): 512 bytes / 512 bytes
Disk identifier:0x00000000
Disk /dev/vdcdoesn't contain a valid partition table