When using the generated SDK to update an existing Virtual Machine (doing a virtual_machine_operations.get(), modifying the returned object, and then calling virtual_machine_operations.create_or_update(), the server will fail with a 400 response:
ERROR: The request content was invalid and could not be deserialized: 'Could not find member 'resources' on object of type 'ResourceDefinition'. Path 'resources', line 1, position 58.'.
If I look at the swagger specification, the resources property of a VirtualMachine is marked as readOnly, but according to a quick network trace, it is still included in the request.
Explicitly setting the request attribute on the returned virtual machine object to None before calling create_or_update makes the request succeed.