@@ -914,7 +914,7 @@ def format_storage(self, device, options):
914914
915915 def check_netcat (self , port ):
916916 pid = self .run (
917- 'pgrep -f "^/bin/nc.openbsd -l -p {}"'
917+ 'pgrep -f "^/bin/nc.openbsd -6 - l -p {}"'
918918 .format (port ),
919919 warn_only = True ,
920920 silent = True
@@ -927,7 +927,7 @@ def check_netcat(self, port):
927927
928928 def kill_netcat (self , port ):
929929 self .run (
930- 'pkill -f "^/bin/nc.openbsd -l -p {}"' .format (port ),
930+ 'pkill -f "^/bin/nc.openbsd -6 - l -p {}"' .format (port ),
931931 warn_only = True , # It's fine if the process already dead
932932 )
933933
@@ -956,7 +956,7 @@ def netcat_to_device(self, vol: virStorageVol) -> Iterator[Tuple[str, int]]:
956956
957957 # Using DD lowers load on device with big enough Block Size
958958 self .run (
959- 'nohup /bin/nc.openbsd -l -p {port} 2>>{log_file} '
959+ 'nohup /bin/nc.openbsd -6 - l -p {port} 2>>{log_file} '
960960 '| dd of={vol_path} obs=1048576 2>>{log_file} &' .format (
961961 port = port ,
962962 log_file = self ._log_filename ('netcat' , vol .name ()),
@@ -983,7 +983,7 @@ def device_to_netcat(
983983 # Using DD lowers load on device with big enough Block Size
984984 self .run (
985985 'dd if={vol_path} ibs=1048576 | pv -f -s {size} '
986- '| /bin/nc.openbsd -q 1 {target_host} {target_port}' .format (
986+ '| /bin/nc.openbsd -6 - q 1 {target_host} {target_port}' .format (
987987 vol_path = vol .path (),
988988 size = size ,
989989 target_host = listener [0 ],
@@ -1038,7 +1038,7 @@ def xfsrestore(
10381038 # -J: inhibits inventory update
10391039 # xfsrestore needs to output its logs, otherwise it fails
10401040 self .run (
1041- 'nohup /bin/nc.openbsd -l -p {port} 2>>{log_file} '
1041+ 'nohup /bin/nc.openbsd -6 - l -p {port} 2>>{log_file} '
10421042 '| ionice -c3 xfsrestore -F -J - {mount_dir} 2>>{log_file} 1>&2 &'
10431043 .format (
10441044 port = port ,
@@ -1080,7 +1080,7 @@ def xfsdump(self, vm: VM, listener, transaction: Transaction = None):
10801080 # -p: progress update interval
10811081 self .run (
10821082 'ionice -c3 xfsdump -o -l 0 -F -J -p 1 - {mount_dir} '
1083- '| /bin/nc.openbsd -q 1 {target_host} {target_port}'
1083+ '| /bin/nc.openbsd -6 - q 1 {target_host} {target_port}'
10841084 .format (
10851085 mount_dir = mount_dir ,
10861086 target_host = listener [0 ],
0 commit comments