code: def _create_vm(self, vm_config):
          
          try:
              vm_setup = self.compute.virtual_machines.create_or_update(
                  self.running_instance_id, self.running_instance_id,
                  vm_config
              )
          except Exception as error:
              raise AzureCloudException(
                  'An exception occurred creating virtual machine: {0}'.format(
                      error
                  )
              )
  
          vm_setup.wait()
docs: Attempt to create or update VM instance based on vm_parameters config.