Francesco Romani has posted comments on this change.
Change subject: vm: sync device update during creation of a vm ......................................................................
Patch Set 2:
We have quite some things mixed here.
Most likely (but not 100% sure) this hasn't happened before because the XML marshaller (as Piotr found) used a different approach when iterating on python dictionaries, which kept things (quite) safe. This changed in the 3.5 timeframe due mostly to json-rpc and live-merge. Both of those changes are not to blame, their interaction with the existing codebase however broke up things.
Simply to revert to the old method is feasible as short term solution, not as long term one.
The deeper problem is how badly Vm is intertwined. To fix this will cost time - first approach here: http://gerrit.ovirt.org/#/q/status:open+project:vdsm+branch:master+topic:sta...
As first-aid patch I'll see if it is possible to revert to the old path (items() vs iteritems()), but this solution is not very good either.