[libvirt] Ejecting ISO from cdrom

Hello, how can I remove ISO image from cdrom in running domain, please? I tried procedure which is described on your wiki ( http://wiki.libvirt.org/page/QEMUSwitchToLibvirt#eject_DEV) but it doesn't work for me: divinus:/kvm/iso # virsh attach-disk --type cdrom --mode readonly leon.i-tux.cz "" hdc error: command 'attach-disk' requires <target> option divinus:/kvm/iso # virsh attach-disk --type cdrom --mode readonly leon.i-tux.cz "" --target hdc error: command 'attach-disk' requires <source> option divinus:/kvm/iso # virsh attach-disk --type cdrom --mode readonly leon.i-tux.cz --source "" --target hdc error: expected syntax: --source <string> Thank you, Jaromír Červenka

On 10/01/2010 09:17 AM, Jaromír Červenka wrote:
Hello,
how can I remove ISO image from cdrom in running domain, please? I tried procedure which is described on your wiki ( http://wiki.libvirt.org/page/QEMUSwitchToLibvirt#eject_DEV) but it doesn't work for me:
divinus:/kvm/iso # virsh attach-disk --type cdrom --mode readonly leon.i-tux.cz "" hdc error: command 'attach-disk' requires <target> option
divinus:/kvm/iso # virsh attach-disk --type cdrom --mode readonly leon.i-tux.cz "" --target hdc error: command 'attach-disk' requires <source> option
divinus:/kvm/iso # virsh attach-disk --type cdrom --mode readonly leon.i-tux.cz --source "" --target hdc error: expected syntax: --source <string>
Thank you, Jaromír Červenka
-- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Jaromir, virsh # attach-disk --type cdrom --source /home/ftp/linux/slackware64-13.1/slackware64-13.1-install-dvd.iso --mode readonly nagios --target hdc Disk attached successfully Please note, that you've provided three (3) commands and each is missing something; each of them is missing this and that (or I got it wrong and you were trying it). Please, re-check commands you've posted. I also think source can't be empty; at least it makes no sense to me. :) I haven't even checked what I'm typing; just copied what you've posted, yet committed full command to virsh, not parts. I hope it helps, Zdenek -- Zdenek Styblik Net/Linux admin OS TurnovFree.net email: stybla@turnovfree.net jabber: stybla@jabber.turnovfree.net

On 10/01/2010 09:37 AM, Zdenek Styblik wrote:
On 10/01/2010 09:17 AM, Jaromír Červenka wrote:
Hello,
how can I remove ISO image from cdrom in running domain, please? I tried procedure which is described on your wiki ( http://wiki.libvirt.org/page/QEMUSwitchToLibvirt#eject_DEV) but it doesn't work for me:
divinus:/kvm/iso # virsh attach-disk --type cdrom --mode readonly leon.i-tux.cz "" hdc error: command 'attach-disk' requires <target> option
divinus:/kvm/iso # virsh attach-disk --type cdrom --mode readonly leon.i-tux.cz "" --target hdc error: command 'attach-disk' requires <source> option
divinus:/kvm/iso # virsh attach-disk --type cdrom --mode readonly leon.i-tux.cz --source "" --target hdc error: expected syntax: --source <string>
Thank you, Jaromír Červenka
-- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Jaromir,
virsh # attach-disk --type cdrom --source /home/ftp/linux/slackware64-13.1/slackware64-13.1-install-dvd.iso --mode readonly nagios --target hdc Disk attached successfully
Please note, that you've provided three (3) commands and each is missing something; each of them is missing this and that (or I got it wrong and you were trying it). Please, re-check commands you've posted. I also think source can't be empty; at least it makes no sense to me. :)
I haven't even checked what I'm typing; just copied what you've posted, yet committed full command to virsh, not parts.
I hope it helps, Zdenek
Ok, my bad. I should read more carefully and so on. I confirm this looks like a bug. I too couldn't figure out how to detach disk resp. unmount ISO (with or without wiki help). I've tried to get more info out of virt-manager, however I've given up after moment, because it seems they're shifting XML rather than using visrh commands. Have a nice day, Zdenek -- Zdenek Styblik Net/Linux admin OS TurnovFree.net email: stybla@turnovfree.net jabber: stybla@jabber.turnovfree.net
participants (2)
-
Jaromír Červenka
-
Zdenek Styblik