On 11/09/2011 11:29 AM, Xu He Jie wrote:
于 2011年11月09日 11:05, Osier Yang 写道:
On 11/09/2011 10:34 AM, Xu He Jie wrote:
I understood, thanks.
于 2011年11月09日 07:08, Eric Blake 写道:
On 11/08/2011 12:16 AM, Xu He Jie
Is there any other method of removing media from cdrom? I try
As the description of removing CDROM
virsh attach-disk --type cdrom --mode readonly myguest ""
might look a bit nicer as:
virsh attach-disk --type cdrom --mode readonly myguest
except that we marked --source as a required argument, so we
have to provide something even when there is no real source.
So I agree that we need your patch at a bare minimum to
support this documented command line for adding a cdrom
drive without a disk.
detach-disk myguest hdc
This will detach the CD drive from guest, for just removing the
"update-device $domain xml" with the source path removed in the
We planned to add some new virsh commands such as
"eject-media" before to do the work, as "update-device" is not
visiable, and question like this are frequent in upstream, but
it's not implemented yet.
Yes, the xml as below:
It told me: 'unsupported configuration:
device type 'disk' cannot be detached'
Is this the exact error you saw, it's weried if a device of type
disk can't be
detached. The error expected should be something like:
"unsupported configuration: device type of 'cdrom' cannot be
<disk type='block' device='cdrom'>
<driver name='qemu' type='raw'/>
<target dev='hdc' bus='ide'/>
<address type='drive' controller='0' bus='1' unit='0'/>
the command as below:
virsh # detach-disk ubuntu-test-vm1 hdc
错误： Failed to detach disk
错误： unsupported configuration: device type 'disk' cannot be
I see, there is a bug here. This patch fixed it.