Floris Bos <b...@je-eigen-domein.nl> writes: > Some Linux distributions use the > /dev/disk/by-id/scsi-SATA_name-of-disk-model_serial addressing scheme > when refering to partitions in /etc/fstab and elsewhere. > This causes problems when starting a disk image taken from an existing > physical server under qemu, > because when running under qemu name-of-disk-model is always "QEMU HARDDISK" > This patch introduces a model=s option which in combination with the existing > serial=s option can be used to > fake the disk the operating system was previously on, allowing the OS to boot > properly. > > Cc: kw...@redhat.com > Signed-off-by: Floris Bos <d...@noc-ps.com>
At first glance: 1. IDE only, scsi-disk is missing. 2. "model" needs to be a device property, just like "serial". 3. I'd rather not add "model" to -drive. This should simplify your patch quite a bit. -drive mixes up frontend (a.k.a. device model) and backend configuration. It provides only common device model configuration knobs. For full device model control, use -device. "model" isn't common. It applies only to some device models, and is silently ignored for all others. "serial" is in -drive only for backward compatibility. Should you insist on adding "model" to -drive, too, please split the patch: first part adds the property, second part adds the -drive parameter.