]> xenbits.xensource.com Git - libvirt.git/commit
virsh: domain: Fix the change-media command
authorPeter Krempa <pkrempa@redhat.com>
Thu, 12 Mar 2015 15:41:21 +0000 (16:41 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 17 Mar 2015 16:11:37 +0000 (17:11 +0100)
commitf4b5f53027da4fed2250628e11bac40191803a15
treec4999f6372f7e10764b9d92a643ce53c406b8cae
parent4cbcaffb74c1f59734eb7379cd8165922345ec13
virsh: domain: Fix the change-media command

The command did not modify the disk type and thus didn't allow to change
media from a file image to a block backed image or vice versa. In
addition when operating on a network backed removable devices the
command would replace the while <source> subelement with an invalid one.

This patch adds the --block option that allows to specify that the new
image is block backed and assumes that without that option all images
are file backed. Since network backends were always mangled it should
not cause problems.
tools/virsh-domain.c
tools/virsh.pod