From ad7da49e74f56354393501e79503bd7e7dbf2661 Mon Sep 17 00:00:00 2001 From: Marek Marczykowski Date: Sun, 22 Jul 2012 01:33:08 +0200 Subject: [PATCH] dom0/core: remove ugly hack in network-reconnect code (#637) --- dom0/qvm-core/qubes.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dom0/qvm-core/qubes.py b/dom0/qvm-core/qubes.py index 09b35d54..fbf878ac 100755 --- a/dom0/qvm-core/qubes.py +++ b/dom0/qvm-core/qubes.py @@ -1851,8 +1851,9 @@ class QubesNetVm(QubesVm): # Cleanup stale VIFs vm.cleanup_vifs() - # wait for frontend to forget about this device (UGLY HACK) - time.sleep(0.2) + # force frontend to forget about this device + # module actually will be loaded back by udev, as soon as network is attached + vm.run("root:modprobe -r xen-netfront xennet") try: vm.attach_network(wait=False)