一、依赖于lvm创建
1
|
lvcreate -L 1.6T -n kvmdata
/dev/VolGroup00
|
二、修改domain xml
1
2
3
4
5
6
7
8
|
virsh edit domainname
<disk
type
=
'block'
device=
'disk'
>
<driver name=
'qemu'
type
=
'raw'
cache=
'none'
/>
<
source
dev=
'/dev/VolGroup00/kvmdata'
/>
<target dev=
'vdb'
bus=
'virtio'
/>
<
/disk
>
|
哦了,重启domain name就可以了
三、 live add disk, 在线添加,重启失效
1
|
virsh attach-disk DomainName
/dev/sr0
vdc --config --
type
cdrom --mode
readonly
|
官方文档
https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Virtualization_Administration_Guide/sect-Virtualization-Adding_storage_devices_to_guests-Adding_hard_drives_and_other_block_devices_to_a_guest.html
本文转自银狐博客51CTO博客,原文链接http://blog.51cto.com/foxhound/1841207如需转载请自行联系原作者
战狐