Skip to content
This repository was archived by the owner on Jan 22, 2026. It is now read-only.

Commit c29adac

Browse files
committed
virt-install: Fix setting default host for --serial tcp,host=:PORT
1 parent 090517f commit c29adac

3 files changed

Lines changed: 11 additions & 4 deletions

File tree

tests/cli-test-xml/compare/many-devices.xml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,10 @@
3333
<mac address='00:11:22:33:44:55'/>
3434
</interface>
3535
<input type='mouse' bus='ps2'/>
36-
<console type='pty'/>
36+
<serial type='tcp'>
37+
<source mode='bind' host='127.0.0.1' service='2222'/>
38+
<protocol type='telnet'/>
39+
</serial>
3740
</devices>
3841
</domain>
3942
<domain type='test'>
@@ -70,6 +73,9 @@
7073
<mac address='00:11:22:33:44:55'/>
7174
</interface>
7275
<input type='mouse' bus='ps2'/>
73-
<console type='pty'/>
76+
<serial type='tcp'>
77+
<source mode='bind' host='127.0.0.1' service='2222'/>
78+
<protocol type='telnet'/>
79+
</serial>
7480
</devices>
7581
</domain>

tests/clitest.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,8 @@
505505
# Lot's of devices
506506
("--hvm --pxe "
507507
"--disk %(EXISTIMG1)s,cache=writeback,io=threads,perms=sh "
508-
"--disk %(NEWIMG1)s,sparse=false,size=.001,perms=ro",
508+
"--disk %(NEWIMG1)s,sparse=false,size=.001,perms=ro "
509+
"--serial tcp,host=:2222,mode=bind,protocol=telnet ",
509510
"many-devices"),
510511
],
511512

virt-install

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ def parse_char_option(guest, dev_type, optstring):
198198
if key in opts:
199199
del(opts[key])
200200

201-
return host, port
201+
return host or None, port or None
202202

203203
host, port = parse_host("host")
204204
bind_host, bind_port = parse_host("bind_host")

0 commit comments

Comments
 (0)