def stubout_create_vm(stubs):

    def f(*args):
        raise fake.Failure("Test Exception raised by fake create_vm")
    stubs.Set(vm_utils, 'create_vm', f)
Simulates a failure in create_vm.
dataset/ETHPy150Open BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/tests/unit/virt/xenapi/stubs.py/stubout_create_vm