KVM test: Repair bug of creating kvm guest machine
Signed-off-by: Jiri Zupka <jzupka@redhat.com>
git-svn-id: http://test.kernel.org/svn/autotest/trunk@5342 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/client/virt/kvm_vm.py b/client/virt/kvm_vm.py
index 5df8719..619a5f9 100644
--- a/client/virt/kvm_vm.py
+++ b/client/virt/kvm_vm.py
@@ -405,6 +405,7 @@
device_id = vm.device_id[vlan]
except IndexError:
netdev_id = None
+ device_id = None
# Handle the '-net nic' part
try:
mac = vm.get_mac_address(vlan)