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

Commit bf9a72e

Browse files
committed
clone: Drop net <target> for new guest
Since a hardcoded net target can prevent 2 guests from starting simultaneously, seems like the type of thing to drop.
1 parent 8a8ea12 commit bf9a72e

5 files changed

Lines changed: 8 additions & 7 deletions

File tree

tests/cli-test-xml/compare/clone-auto1.xml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,10 @@
4848
<interface type="network">
4949
<mac address="00:11:22:33:44:55"/>
5050
<source network="default"/>
51-
<target dev="testnet0"/>
5251
<model type="e1000"/>
5352
</interface>
5453
<interface type="user">
5554
<mac address="00:11:22:33:44:55"/>
56-
<target dev="testnet1"/>
5755
</interface>
5856
<parallel type="file">
5957
<source path="/tmp/foo.log"/>

tests/cli-test-xml/compare/clone-auto2.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
<controller type="ide" index="0"/>
2828
<interface type="user">
2929
<mac address="00:11:22:33:44:55"/>
30-
<target dev="testnet0"/>
3130
</interface>
3231
<parallel type="file">
3332
<source path="/tmp/foo.log"/>

tests/clone-xml/general-cfg-in.xml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,12 @@
2828
<interface type='network'>
2929
<mac address='52:54:00:6c:a0:cb'/>
3030
<source network='test1'/>
31+
<target dev='vnet0'/>
3132
</interface>
32-
<interface type='network'>
33+
<interface type='bridge'>
3334
<mac address='52:54:00:6c:bb:ca'/>
34-
<source network='test2'/>
35+
<source bridge='br0'/>
36+
<target dev='my_manual_dev'/>
3537
</interface>
3638
<input type='mouse' bus='ps2'/>
3739
<graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1'/>

tests/clone-xml/general-cfg-out.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@
2929
<mac address="01:23:45:67:89:00"/>
3030
<source network="test1"/>
3131
</interface>
32-
<interface type="network">
32+
<interface type="bridge">
3333
<mac address="01:23:45:67:89:01"/>
34-
<source network="test2"/>
34+
<source bridge="br0"/>
3535
</interface>
3636
<input type="mouse" bus="ps2"/>
3737
<graphics type="vnc" port="-1" autoport="yes" listen="127.0.0.1"/>

virtinst/CloneManager.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,8 @@ def setup_clone(self):
447447
self._guest.uuid = self._clone_uuid
448448
self._clone_mac.reverse()
449449
for iface in self._guest.get_devices("interface"):
450+
iface.target_dev = None
451+
450452
if self._clone_mac:
451453
mac = self._clone_mac.pop()
452454
else:

0 commit comments

Comments
 (0)