Interesting way to think about that, never gave it a thought really.
First, I don't think CRUSH rules can be based on where the volumes of the VMs are located. The lowest you can go is OSD level, the daemon that directly manages the physical storage device. I am not aware of any features where you can manually determine which data goes on which PG. Especially because Ceph always rebalances data and it won't stay static.
I think you can fetch which volumes are associated to which PG / primary OSDs though.
Let's say we still do it...
Honestly I don't think this would even be suitable for any cluster setup. Especially in case of VM migrations it could lead to heavy additional traffic, be it for data migration of Ceph (in case of modifying the placement of the PGs) or live migrations of the VMs (in case we move the VMs to the majority of OSD primaries for the associated volumes). This additional traffic would compete with normal Ceph replication and rebalancing traffic. So you basically should just scale your network big enough.
With a replication factor of 3, each PG has one primary OSD (which serves all I/O) and two replica OSDs. In a 3-node cluster you're likely to have the primary OSD local to the VM's host yes, but in larger clusters that's not guaranteed. And even if it were, Ceph's continuous rebalancing means it won't stay that way. The primary can shift between OSDs as the cluster rebalances, so any locality you had disappears without warning. You'd need to constantly re-pin PG primaries as VMs migrate, which Ceph doesn't natively support at that granularity, as far as I know. In a larger cluster there's also an upside to this. A volume's data may be spread across many OSDs on many nodes simultaneously, meaning multiple nodes contribute to serving it, potentially delivering more aggregate throughput than any single "local" PG ever could. Either way, the real answer is the same:
Scale your storage network appropriately for your workload, and let Ceph do its job.
That's just my opinion, but I'm open to discussion, and I'd be happy to be proven wrong ^^