[GH-ISSUE #216] cannot disconnect media from VM #166

Closed
opened 2026-02-27 16:38:14 +03:00 by kerem · 3 comments
Owner

Originally created by @bsavelev on GitHub (Jan 30, 2014).
Original GitHub issue: https://github.com/retspen/webvirtmgr/issues/216

When I try disconnect media (cdrom from ISO) from VM
Then I get error "internal error No device with bus 'ide' and target 'hda'"

  <devices>
    <emulator>/usr/bin/kvm</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw'/>
      <source file='/var/lib/libvirt/images/windows2008-ocean.img'/>
      <target dev='vda' bus='virtio'/>
      <alias name='virtio-disk0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/var/lib/libvirt/images/ru_windows_server_2008_r2_standard_enterprise_datacenter_and_web_with_sp1_x64_dvd_617389.iso'/>
      <target dev='hdc' bus='ide'/>
      <readonly/>
      <alias name='ide0-1-0'/>
      <address type='drive' controller='0' bus='1' target='0' unit='0'/>
    </disk>
    <controller type='usb' index='0'>
      <alias name='usb0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
    </controller>
    <controller type='ide' index='0'>
      <alias name='ide0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
    </controller>
    <interface type='bridge'>
      <mac address='52:54:00:af:89:3b'/>
      <source bridge='vbr0'/>
      <target dev='vnet1'/>
      <model type='virtio'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
    </interface>
    <serial type='pty'>
      <source path='/dev/pts/1'/>
      <target port='0'/>
      <alias name='serial0'/>
    </serial>
    <console type='pty' tty='/dev/pts/1'>
      <source path='/dev/pts/1'/>
      <target type='serial' port='0'/>
      <alias name='serial0'/>
    </console>
    <input type='tablet' bus='usb'>
      <alias name='input0'/>
    </input>
    <input type='mouse' bus='ps2'/>
    <graphics type='vnc' port='5901' autoport='yes'/>
    <video>
      <model type='vga' vram='9216' heads='1'/>
      <alias name='video0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>
    <memballoon model='virtio'>
      <alias name='balloon0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </memballoon>
  </devices>
Originally created by @bsavelev on GitHub (Jan 30, 2014). Original GitHub issue: https://github.com/retspen/webvirtmgr/issues/216 When I try disconnect media (cdrom from ISO) from VM Then I get error "internal error No device with bus 'ide' and target 'hda'" ``` <devices> <emulator>/usr/bin/kvm</emulator> <disk type='file' device='disk'> <driver name='qemu' type='raw'/> <source file='/var/lib/libvirt/images/windows2008-ocean.img'/> <target dev='vda' bus='virtio'/> <alias name='virtio-disk0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/> </disk> <disk type='file' device='cdrom'> <driver name='qemu' type='raw'/> <source file='/var/lib/libvirt/images/ru_windows_server_2008_r2_standard_enterprise_datacenter_and_web_with_sp1_x64_dvd_617389.iso'/> <target dev='hdc' bus='ide'/> <readonly/> <alias name='ide0-1-0'/> <address type='drive' controller='0' bus='1' target='0' unit='0'/> </disk> <controller type='usb' index='0'> <alias name='usb0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> </controller> <controller type='ide' index='0'> <alias name='ide0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/> </controller> <interface type='bridge'> <mac address='52:54:00:af:89:3b'/> <source bridge='vbr0'/> <target dev='vnet1'/> <model type='virtio'/> <alias name='net0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/> </interface> <serial type='pty'> <source path='/dev/pts/1'/> <target port='0'/> <alias name='serial0'/> </serial> <console type='pty' tty='/dev/pts/1'> <source path='/dev/pts/1'/> <target type='serial' port='0'/> <alias name='serial0'/> </console> <input type='tablet' bus='usb'> <alias name='input0'/> </input> <input type='mouse' bus='ps2'/> <graphics type='vnc' port='5901' autoport='yes'/> <video> <model type='vga' vram='9216' heads='1'/> <alias name='video0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> </video> <memballoon model='virtio'> <alias name='balloon0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> </memballoon> </devices> ```
kerem closed this issue 2026-02-27 16:38:14 +03:00
Author
Owner

@retspen commented on GitHub (Jan 30, 2014):

You can change hdc to hda in xml.

<!-- gh-comment-id:33713338 --> @retspen commented on GitHub (Jan 30, 2014): You can change hdc to hda in xml.
Author
Owner

@retspen commented on GitHub (Jan 30, 2014):

Universal parser for all xml this is very hard work. If you have already created VM, you can destroy them without removing hdd images and create custom.

<!-- gh-comment-id:33714926 --> @retspen commented on GitHub (Jan 30, 2014): Universal parser for all xml this is very hard work. If you have already created VM, you can destroy them without removing hdd images and create custom.
Author
Owner

@bsavelev commented on GitHub (Jan 30, 2014):

Of course this is not critical feature or bug (as you wish) and I understand that parse whole xml is pretty hard.

PS:
maybe parser from virt-manager helps? It is in python too-)
(https://git.fedorahosted.org/cgit/virt-manager.git/tree/)

<!-- gh-comment-id:33718348 --> @bsavelev commented on GitHub (Jan 30, 2014): Of course this is not critical feature or bug (as you wish) and I understand that parse whole xml is pretty hard. PS: maybe parser from virt-manager helps? It is in python too-) (https://git.fedorahosted.org/cgit/virt-manager.git/tree/)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/webvirtmgr#166
No description provided.