If you use GDS on the KVM guest, pay attention to the following points when you add a virtual disk to the KVM guest:
For a disk to be added to a guest, specify with the by-id name.
Add the disk as a virtual disk without dividing it. If a partition or a file is added as the virtual disk, GDS cannot manage the virtual disk.
For the device attribute of a disk to be registered with a class on a guest, set the following value:
libvirt package of the host OS | device attribute |
---|---|
libvirt-0.9.4-23.el6_2.3 or earlier | disk |
libvirt-0.9.4-23.el6_2.4 or later | lun |
Information
You can check the version of the libvirt package with the rpm(8) command.
# rpm -qi libvirt |
When you add a virtual disk to a guest by using the Virtual Machine Manager (virt-manager), the value of the device attribute will be set to "disk."
For virtio-SCSI device, set "lun" to the value of the device attribute.
Note
In the following cases, you need to change the value of the device attribute from disk to lun.
When you add a virtual disk by using the Virtual Machine Manager (virt-manager) in the environments where libvirt-0.9.4-23.el6_2.4 or later is applied.
When you upgrade the libvirt package to libvirt-0.9.4-23.el6_2.4 or later.
Set the device attribute in the guest configuration file (/etc/libvirt/qemu/guest_name.xml) on a host OS. When you change the device attribute, stop a guest OS beforehand. For the method of changing the device attribute is as follows:
# virsh edit guest_name |
Example before change
:
<disk type='block' device='disk'>
<driver name='qemu' type='raw'/>
<source dev='/dev/disk/by-id/scsi-1FUJITSU_30000085002B'/>
<target dev='vdb' bus='virtio'/>
<shareable/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
</disk>
: |
Example after change
:
<disk type='block' device='lun'>
<driver name='qemu' type='raw'/>
<source dev='/dev/disk/by-id/scsi-1FUJITSU_30000085002B'/>
<target dev='vdb' bus='virtio'/>
<shareable/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
</disk>
: |