From 12a41822e14b558f7ffb4812978b957f3d228f23 Mon Sep 17 00:00:00 2001 From: Ryan Harper Date: Tue, 24 Aug 2010 11:09:00 -0500 Subject: [PATCH] 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:
Signed-off-by: Ryan Harper --- tools/virsh.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/tools/virsh.c b/tools/virsh.c index c0ee3ee59e..7bc33d878b 100644 --- a/tools/virsh.c +++ b/tools/virsh.c @@ -8146,13 +8146,8 @@ cmdAttachDisk(vshControl *ctl, const vshCmd *cmd) mode = vshCommandOptString(cmd, "mode", NULL); if (driver) { - if (STREQ(driver, "file") || STREQ(driver, "tap")) { + if (STREQ(driver, "file") || STREQ(driver, "tap")) isFile = 1; - } else if (STRNEQ(driver, "phy")) { - vshError(ctl, _("No support for %s in command 'attach-disk'"), - driver); - goto cleanup; - } } if (mode) {