]> git.ipfire.org Git - thirdparty/libvirt.git/commit
virsh: remove driver check from attach-disk command
authorRyan Harper <ryanh@us.ibm.com>
Tue, 24 Aug 2010 16:09:00 +0000 (11:09 -0500)
committerEric Blake <eblake@redhat.com>
Tue, 31 Aug 2010 22:06:16 +0000 (16:06 -0600)
commit12a41822e14b558f7ffb4812978b957f3d228f23
tree36dcc69c9c4f1b207e55a76e6613c783cef600c2
parent9c4f62ae612f31c92b0c7650b073e80d9ae0f960
virsh: remove driver check from attach-disk command

Virsh shouldn't check for driver support but rather let the backend handled this.
After removing the check, I can successfully attach file-based images to a qemu
VM with attach-disk.

% virsh attach-disk vm2 /images/test02.img vdc --driver qemu --type disk --subdriver raw
Disk attached successfully

This command generates the following XML:

<disk type='block' device='disk'>
      <driver name='qemu' type='raw'/>
      <source dev='/images/test02.img'/>
      <target dev='vdc' bus='virtio'/>
      <alias name='virtio-disk2'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x0'/>
</disk>

Signed-off-by: Ryan Harper <ryanh@us.ibm.com>
tools/virsh.c