Bug 510425

Summary: Attach device from xml file failed on KVM
Product: Red Hat Enterprise Linux 5 Reporter: xingzhao <czhao>
Component: libvirtAssignee: Daniel Veillard <veillard>
Status: CLOSED NOTABUG QA Contact: Virtualization Bugs <virt-bugs>
Severity: low Docs Contact:
Priority: low    
Version: 5.4CC: berrange, clalance, virt-maint, xen-maint
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-07-10 07:30:41 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:

Description xingzhao 2009-07-09 08:18:24 UTC
Description of problem:
Attach device from xml file failed on  KVM

Version-Release number of selected component (if applicable):
libvirt-0.6.3-14.el5
kvm-83-84.el5
rhel5.4: 2.6.18-155.el5xen

How reproducible:
100%

Steps to Reproduce:
Add this 2 steps
1. # virsh define rhel5u4.xml
2. # virsh start rhel5u4
3. # virsh attach-device test disk1.xml
disk1.xml info:
  <disk type='file' device='disk'>
     <source file='/var/lib/libvirt/images/RHEL-Server-5.4-64-2.qcow2'/>
     <target dev='hdb' />
   </disk> 

Actual results:
error:Failed to attach device from disk1.xml
error:this function is not supported by the hypervisor:disk bus 'ide'
cannot be hotplgged.

Expected results:
Device attached successfully

Comment 1 xingzhao 2009-07-09 08:29:05 UTC
Steps to Reproduce:
1. # virsh define rhel5u4.xml
2. # virsh start rhel5u4
3. # virsh attach-device rhel5u4 interface.xml
interface.xml info:
<interface type='network'>
 <mac address='54:52:00:2b:d2:64'/>
 <source network='default'/>
</interface> 

Actual results:
error:Failed to attach device from interface.xml
error:this function is not supported by the hypervisor:device type 'interface' cannot be attached.

Expected results:
Device attached successfully

Comment 2 Chris Lalancette 2009-07-09 08:52:03 UTC
Wait, which is it?  In the first comment, you mention this XML:

  <disk type='file' device='disk'>
     <source file='/var/lib/libvirt/images/RHEL-Server-5.4-64-2.qcow2'/>
     <target dev='hdb' />
   </disk> 

Which, indeed, cannot be hotplugged, so there is no bug there.  But then in comment #1, you talk about network attaching.  Which is it?  The first case is not a bug, and I'm not sure about the second case, but they need to be separated since they are two different things.

Chris Lalancette

Comment 3 Daniel Berrangé 2009-07-09 09:54:26 UTC
Neither IDE disks, nor network interfaces can be hotplugged.  Only virtio or scsi disks. That said I have a strong feeling virtio / scsi hotplug will be broken anyway:


http://www.redhat.com/archives/libvir-list/2009-July/msg00115.html

Comment 4 xingzhao 2009-07-10 01:54:48 UTC
The following lines is the disk1.xml which I edited.
   <disk type='file' device='disk'>
      <source file='/var/lib/libvirt/images/RHEL-Server-5.4-64-2.qcow2'/>
      <target dev='hdb' />
    </disk>

Comment 5 Chris Lalancette 2009-07-10 07:30:41 UTC
OK.  As both Dan and I point out, that can't work, so this is NOTABUG.  If there is another bug you run across (like the mailing list pointer above), please open that as a separate bug.  And one issue per bug, please.

Chris Lalancette