If the cookie sent to VMware by _handle_vmotion_begin contains an IAC (0xff) character then it will violate the telnet protocol.
Observed behavior is that VMware considered the secret sent with VMOTION_GOAHEAD to end at the IAC. It returns the truncated SEQUENCE+SECRET (cookie) in VMOTION_PEER, which vSPC.py rejects as not mapping to a known vMotion.
Minimal fix is to AND the cookie with something other than 0xFFFFFFFF so it can't contain an IAC. A better fix is probably to modify _send_vmware to escape IACs:
def _send_vmware(self, s):
s = s.replace(IAC, IAC+IAC)
self.sock.sendall(IAC + SB + VMWARE_EXT + s + IAC + SE)
but I haven't tested if that (a) causes any other problems or (b) even makes it through correctly.
In any case hash(self) is a terrible way to make a random secret.
If the cookie sent to VMware by _handle_vmotion_begin contains an IAC (0xff) character then it will violate the telnet protocol.
Observed behavior is that VMware considered the secret sent with VMOTION_GOAHEAD to end at the IAC. It returns the truncated SEQUENCE+SECRET (cookie) in VMOTION_PEER, which vSPC.py rejects as not mapping to a known vMotion.
Minimal fix is to AND the cookie with something other than 0xFFFFFFFF so it can't contain an IAC. A better fix is probably to modify _send_vmware to escape IACs:
but I haven't tested if that (a) causes any other problems or (b) even makes it through correctly.
In any case
hash(self)
is a terrible way to make a random secret.