# Fault - VmHostAffinityRuleViolation(vim.fault.VmHostAffinityRuleViolation)

Extends
  VmConfigFault
Since
  vSphere API 4.1

## Fault Description

The virtual machine if powered on or VMotioned, would violate a VM-Host affinity rule.

Properties

Name | Type | Description
--- | --- | ---
hostName | xsd:string | The host that the virtual machine can not be powered on without violating a rule.
vmName | xsd:string | The vm that can not be powered on or VMotioned without violating a rule.
Properties inherited from VmConfigFault
None
Properties inherited from VimFault
None
Properties inherited from MethodFault
faultCause, faultMessage

Show WSDL type definition
<complexType xmlns="http://www.w3.org/2001/XMLSchema" xmlns:pbm="urn:pbm" name="VmHostAffinityRuleViolation"> <complexContent> <extension base="pbm:VmConfigFault"> <sequence> <element name="vmName" type="xsd:string"/> <element name="hostName" type="xsd:string"/> </sequence> </extension> </complexContent> </complexType>