xenapi: always reset JeOS's network

If the JeOS template contained an exotic network configuration, the VM
prep step might fail. This patch resets the networking of the VM before
starting it.

Fixes bug 1245607

Change-Id: I921f1fdd0709d7a7760c4bb165e32f3898098bff
This commit is contained in:
Mate Lakat 2013-10-28 18:15:57 +00:00
parent f7cfa0c6e7
commit 8787e0fd0c

View File

@ -271,6 +271,12 @@ set_vm_memory "$GUEST_NAME" "$OSDOMU_MEM_MB"
# Max out VCPU count for better performance
max_vcpus "$GUEST_NAME"
# Wipe out all network cards
destroy_all_vifs_of "$GUEST_NAME"
# Add only one interface to prepare the guest template
add_interface "$GUEST_NAME" "$MGT_BRIDGE_OR_NET_NAME" "0"
# start the VM to run the prepare steps
xe vm-start vm="$GUEST_NAME"