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.
Showing
想要评论请 注册 或 登录