Revision d0c11cf7
b/lib/cmdlib.py | ||
---|---|---|
4164 | 4164 |
idict["hvm_disk_type"] = instance.hvm_disk_type |
4165 | 4165 |
|
4166 | 4166 |
if htkind in constants.HTS_REQ_PORT: |
4167 |
if instance.vnc_bind_address is None: |
|
4168 |
vnc_bind_address = constants.VNC_DEFAULT_BIND_ADDRESS |
|
4169 |
else: |
|
4170 |
vnc_bind_address = instance.vnc_bind_address |
|
4167 | 4171 |
if instance.network_port is None: |
4168 | 4172 |
vnc_console_port = None |
4169 |
elif instance.vnc_bind_address == constants.BIND_ADDRESS_GLOBAL:
|
|
4173 |
elif vnc_bind_address == constants.BIND_ADDRESS_GLOBAL: |
|
4170 | 4174 |
vnc_console_port = "%s:%s" % (instance.primary_node, |
4171 | 4175 |
instance.network_port) |
4172 |
elif instance.vnc_bind_address == constants.LOCALHOST_IP_ADDRESS:
|
|
4173 |
vnc_console_port = "%s:%s on node %s" % (instance.vnc_bind_address,
|
|
4176 |
elif vnc_bind_address == constants.LOCALHOST_IP_ADDRESS: |
|
4177 |
vnc_console_port = "%s:%s on node %s" % (vnc_bind_address, |
|
4174 | 4178 |
instance.network_port, |
4175 | 4179 |
instance.primary_node) |
4176 | 4180 |
else: |
4177 | 4181 |
vnc_console_port = "%s:%s" % (instance.vnc_bind_address, |
4178 | 4182 |
instance.network_port) |
4179 | 4183 |
idict["vnc_console_port"] = vnc_console_port |
4180 |
idict["vnc_bind_address"] = instance.vnc_bind_address
|
|
4184 |
idict["vnc_bind_address"] = vnc_bind_address |
|
4181 | 4185 |
idict["network_port"] = instance.network_port |
4182 | 4186 |
|
4183 | 4187 |
result[instance.name] = idict |
b/lib/hypervisor/hv_xen.py | ||
---|---|---|
398 | 398 |
config.write("usb = 1\n") |
399 | 399 |
config.write("usbdevice = 'tablet'\n") |
400 | 400 |
config.write("vnc = 1\n") |
401 |
config.write("vnclisten = '%s'\n" % instance.vnc_bind_address) |
|
401 |
if instance.vnc_bind_address is None: |
|
402 |
config.write("vnclisten = '%s'\n" % constants.VNC_DEFAULT_BIND_ADDRESS) |
|
403 |
else: |
|
404 |
config.write("vnclisten = '%s'\n" % instance.vnc_bind_address) |
|
402 | 405 |
|
403 | 406 |
if instance.network_port > constants.HT_HVM_VNC_BASE_PORT: |
404 | 407 |
display = instance.network_port - constants.HT_HVM_VNC_BASE_PORT |
Also available in: Unified diff