1、扩容前只有一块/dev/hda盘

2、创建一块20G大小的硬盘
qemu-img create -f qcow2 ubuntu-server.qcow2 20G

3、找到要扩容的机器

4、编辑配置
virsh edit centos582

5、添加如下内容
<disk type='file' device='disk'>
<driver name='qemu' type='qcow2' cache='none'/>
<source file='/home/images/ubuntu-server.qcow2'/>
<target dev='hdc' bus='virtio'/>
</disk>
address 可以省略,系统会自动补充

6、virsh destroy centos582

7、启动虚拟机
virsh start centos582

8、进行系统
20G大小的磁盘出现了
