On Mon, May 28, 2007 at 06:33:13PM +0900, Kazuki Mizushima wrote: > Hi, > > I make a patch fixed the error when a Original guest has devices, > cdrom usb floppy ..., except "disk". > > This patch remains the original devices except "disk". A user can use, > for example, CD-ROM(floppy etc..) devices in the same way as a Original > guest in a Cloning guest. I attach the log how the XML is changed before > and after. I came across this problem the other day too - I think we should approach it in a slightly different way though. Basically a disk can be given to the guest in 3 modes - read-only - exclusive read-write - shared read-write In the 2nd case, we definitely need to clone the disk. In the 3rd case we have no need to clone, since if a disk is marked as shared we should assume the user is doing some kinda of clustering setup. In the 1st case of read only we also don't neeed to copy the. It may occasionally be useful to copy shared or read only disks though, so we should have an option to override it default behaviour. eg, if 'hdc' is a readonly cdrom device, then we could have --force-copy=hdc to request that it be copied, even though it is read only. So I think we should deal with it thus: - If device is read-write => copy disk - If device is listed with a --force-copy flag => copy disk - If device is read-only => don't copy disk - If device is shared => don't copy disk Regards, Dan. -- |=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=| |=- Perl modules: http://search.cpan.org/~danberr/ -=| |=- Projects: http://freshmeat.net/~danielpb/ -=| |=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=|