Bug 638071

Summary: can't successfully start guest with a hot-plugging disk after stopping
Product: Red Hat Enterprise Linux 5 Reporter: Min Zhan <mzhan>
Component: libvirtAssignee: Daniel Veillard <veillard>
Status: CLOSED DUPLICATE QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: low    
Version: 5.6CC: ajia, dyuan, eblake, jdenemar, llim, mzhan, tyan, virt-maint, weizhan, xen-maint
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 627143 Environment:
Last Closed: 2010-09-29 14:00:15 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 627143, 1000432    
Bug Blocks:    

Comment 1 Jiri Denemark 2010-09-29 14:00:15 UTC
This automagical guessing of disk type, driver name, and other stuff is not easily changeable since users may rely on that. Thus you need to explicitly override these fields, e.g. you would do

virsh attach-disk console /var/lib/libvirt/images/foo.qcow2 vdb --sourcetype file --driver qemu --subdriver qcow2

This has been fixed as bug 609422 so I'm closing this one as a dup of it.

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

Comment 2 Min Zhan 2010-10-08 06:24:47 UTC
(In reply to comment #1)
yes, i have added the parameters for attach-disk like you wrote above. and the guest can be start successfully.

Comment 3 Min Zhan 2010-10-08 06:48:15 UTC
but i also check attach-disk command.
# virsh help attach-disk
  NAME
    attach-disk - attach disk device

  SYNOPSIS
    attach-disk <domain> <source> <target> [--driver <string>] [--subdriver <string>] [--type <string>] [--mode <string>] [--persistent] [--sourcetype <string>]


Please have a look. these parameters like --driver are optional, if we use the method above to fix this bug, should this parameters are mandatory? or need we submit a new bug for attach-disk mandatory parameters check?

Comment 4 Jiri Denemark 2010-10-08 07:52:26 UTC
Yes, they are optional because you don't need to specify them in all cases. For example, you can successfully attach a disk into a Xen guest without these optional arguments. For compatibility reasons we can't change the automagic behavior of attach-disk commands used without these optional parameters and make them mandatory.