RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 632580 - VM can't be started after being attached disk with virsh
Summary: VM can't be started after being attached disk with virsh
Keywords:
Status: CLOSED DUPLICATE of bug 627143
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.0
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Jiri Denemark
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On: 609422
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-09-10 13:48 UTC by Jiri Denemark
Modified: 2011-04-20 08:14 UTC (History)
12 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 609422
Environment:
Last Closed: 2011-01-14 12:55:15 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Jiri Denemark 2010-09-10 13:48:33 UTC
+++ This bug was initially created as a clone of Bug #609422 +++

Description of problem:
If you use the virtual machine manager GUI to add a disk to a VM, it works fine. If you do it via cli, it adds an extra line that causes the VM not to boot.
Version-Release number of selected component (if applicable):
RHEL 5.5
libvirt-0.6.3-33.el5

How reproducible:
100%

Steps to Reproduce:
1. start a VM ('test')
2. add a disk using vish like this: 
   virsh attach-disk test /dev/VolGroup00/lv-test vda
3. stop the VM and start it again.
  
Actual results:
Error starting domain: internal error unsupported driver name 'phy' for disk '/dev/VolGroup00/lv-test'

Expected results:
The VM can be started normally after attaching disk with cli.

Additional info:
It works fine to add disk with virt-manager

--- Additional comment from dwu on 2010-06-30 05:29:02 EDT ---

The xml sections for the new attached disk with CLI and GUI are different.
Generated by GUI
<disk type="block" device="disk">
  <source dev="/dev/disk1/Disk1"/>
  <target dev="vda" bus="virtio"/>
</disk>

Generated by CLI
<disk type="block" device="disk">
  <driver name="phy"/>
  <source dev="/dev/disk1/Disk1"/>
  <target dev="vda" bus="virtio"/>
</disk>

Virsh use phy as the default driver name if no driver specified in command line.
<snip>
    if (driver) {
        tmp = vshRealloc(ctl, tmp, strlen(driver) + 22);
        if (!tmp) goto cleanup;
        sprintf(tmp, "      <driver name='%s'", driver);
    } else {
        tmp = vshRealloc(ctl, tmp, 25);
        if (!tmp) goto cleanup;
        sprintf(tmp, "      <driver name='phy'");
    }
</snip>

But when the function qemudBuildCommandLine in qemu_conf.c try to parse the config and build a command line for qemu, it only can recognize "qemu" as a driver name.
<snip>
    if (disk->driverName != NULL &&
            !STREQ(disk->driverName, "qemu")) {
            qemudReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR,
                             _("unsupported driver name '%s' for disk '%s'"),
                             disk->driverName, disk->src);
            goto error;
        }
</snip>

And for virsh, only file,tap and phy are valid, we can't specify "qemu" as a driver name in the command line.  The upstream code also has this problem.


This is fixed upstream by 12a41822e14b558f7ffb4812978b957f3d228f23 and dfec22cc6035a95ff1c7609ea060029cb99182cc

Comment 5 Jiri Denemark 2011-01-14 12:55:15 UTC
This was fixed by the rebase and since there already is another bug tracking this issue, I'm closing this as a dup of it.

*** This bug has been marked as a duplicate of bug 627143 ***


Note You need to log in before you can comment on or make changes to this bug.