xapi-project/xen-api — pull request #2068 by chengsun (2014-12-29 17:16:20+00:00)
Title: [RFC]: Add a 'floppy' VBD type (take #2)

Original pull request: https://github.com/xapi-project/xen-api/pull/2057

This fixes two bugs. Floppy VBDs can now be successfully attached and used in HVM guests.

The first commit 6c391c5a7c10611f85b316e9470132463712bea4 fixes userdevice assignment issues, so that floppies are properly assigned an "fd?" rather than "xvd?". qemu *requires* this, in addition to the drive being on the "floppy" bus.

Despite `Device_number.to_disk_number` not being unique (see https://github.com/xapi-project/xcp-idl/pull/47), it is still used in several places around the code. We need to check these/make sure they don't interfere with floppy support. The second commit bde0bb68623322272ab8d68e8597160894fa2cb3 is an example of fixing this, where xen-api would previously get confused between "fda" and "xvda" on reboot of a guest, and subsequently overwrite the "xvda" VBD metadata with the "fda".

Requires:
- https://github.com/xapi-project/xcp-idl/pull/47
- https://github.com/xapi-project/xenopsd/pull/160