<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><pre style="margin: 0em;">I am trying to detach an ISO from a KVM machine and I've tried both attach-disk using " " in the file path as well as the update-device option but am getting this error</pre><pre style="margin: 0em;"><br></pre><pre style="margin: 0em;">error: Failed to update device from /var/run/libvirt/qemu/kvmtest1.xml</pre><pre style="margin: 0em;">error: XML description for unknown device type is not well formed or invalid.</pre><pre style="margin: 0em;"><br></pre><pre style="margin: 0em;">I tried doing a virsh edit on the xml file to remove the source file path to the ISO, as I assume is the correct method, and then running the virsh update-device but it's not working. </pre><pre style="margin: 0em;"><br></pre><pre style="margin: 0em;">Can anyone advise the correct steps to detach a device from a running and/or offline domain?</pre><pre style="margin: 0em;"><br></pre><pre style="margin: 0em;">Additionally - anyone have any guidance on how to attach a CD device to a domain that is currently shutdown, for example, if I wanted to boot the domain to a rescue CD image?</pre><pre style="margin: 0em;"><br></pre><pre style="margin: 0em;">Thanks</pre><pre style="margin: 0em;"><br></pre><pre style="margin: 0em;">Jeff</pre><pre style="margin: 0em;"><br></pre><pre style="margin: 0em;"><br></pre><pre style="margin: 0em;">于 2011年03月31日 15:17, Masanari Iida 写道:
</pre><blockquote style="border-left: 0.2em solid rgb(85, 85, 238); margin: 0em; padding-left: 0.85em;"><pre style="margin: 0em;">Somebody sent me a tips.
Following command do what I wanted to do.
Thanks.

attach-disk guest01 " " hdc --driver file --type cdrom
--mode readonly
</pre></blockquote><pre style="margin: 0em;">Also using "update-device" with an xml which doesn't specify
the source file path will work.

</pre><blockquote style="border-left: 0.2em solid rgb(85, 85, 238); margin: 0em; padding-left: 0.85em;"><pre style="margin: 0em;">On Thu, Mar 31, 2011 at 3:29 PM, Masanari Iida<standby24x7 gmail com>  wrote:
</pre><blockquote style="border-left: 0.2em solid rgb(85, 85, 238); margin: 0em; padding-left: 0.85em;"><pre style="margin: 0em;">Hello,

I can attach disc ISO image to cd-rom from virsh.
And I can replace the ISO image from disc1 to disc2 using the 2nd example.

(example)
attach-disk guest01 /root/disc1.iso hdc --driver file --type cdrom
--mode readonly
attach-disk guest01 /root/disc2.iso hdc --driver file --type cdrom
--mode readonly

My question is, how can I disconnect the image from the cdrom drive using virsh.
Because, if I try to detach-disk hdc, I got following errors.

virsh # detach-disk guest01 hdc
error: Failed to detach disk
error: this function is not supported by the connection driver:
This type of device cannot be hot unplugged

What I can do is possible from virt-manager's "Disconnect" button,
(next to source path: line)  from Hardware's TAB, Disk hdc screen.
I want to do this from virsh.

OS: RHEL5.6
libvirt-0.8.2-15.el5_6.1 is used.

Regards,
Masanari Iida

</pre></blockquote><pre style="margin: 0em;">_______________________________________________
libvirt-users mailing list
libvirt-users redhat com
<a rel="nofollow" href="https://www.redhat.com/mailman/listinfo/libvirt-users">https://www.redhat.com/mailman/listinfo/libvirt-users</a>
</pre></blockquote><pre style="margin: 0em;"></pre><div><br></div></body></html>