mirror of
https://github.com/GNS3/gns3-server
synced 2024-12-11 01:28:09 +00:00
Use hex encoding on VirtualBox pipe names
This allows arbitrary characters in VirtualBox VM names, while also ensuring all different weird names can coexist. Example of two VMs that previously couldn't both have a serial console - "VM 1" and "VM_1", because the former's pipe name is converted to the latter, while the latter would remain unchanged.
This commit is contained in:
parent
eac751948e
commit
60219d9a45
@ -583,8 +583,7 @@ class VirtualBoxVM(BaseVM):
|
||||
:returns: pipe path (string)
|
||||
"""
|
||||
|
||||
p = re.compile('\s+', re.UNICODE)
|
||||
pipe_name = p.sub("_", self._vmname)
|
||||
pipe_name = self._vmname.encode("hex", "strict")
|
||||
if sys.platform.startswith("win"):
|
||||
pipe_name = r"\\.\pipe\VBOX\{}".format(pipe_name)
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user