Revision 56fee73b lib/hypervisor/hv_kvm.py

b/lib/hypervisor/hv_kvm.py
54 54
    constants.HV_ROOT_PATH,
55 55
    constants.HV_ACPI,
56 56
    constants.HV_SERIAL_CONSOLE,
57
    constants.HV_VNC_BIND_ADDRESS,
57 58
    ]
58 59

  
59 60
  _MIGRATION_STATUS_RE = re.compile('Migration\s+status:\s+(\w+)',
......
649 650
        raise errors.HypervisorError("The initrd path must an absolute path"
650 651
                                     ", if defined")
651 652

  
653
    vnc_bind_address = hvparams[constants.HV_VNC_BIND_ADDRESS]
654
    if vnc_bind_address:
655
      if not utils.IsValidIP(vnc_bind_address):
656
        raise errors.OpPrereqError("given VNC bind address '%s' doesn't look"
657
                                   " like a valid IP address" %
658
                                   vnc_bind_address)
659

  
652 660
  def ValidateParameters(self, hvparams):
653 661
    """Check the given parameters for validity.
654 662

  

Also available in: Unified diff