Fix local variable 'root_uuid' ref before assign

Fixes an issue where the root_uuid variable gets used
before it is assigned.

This moves the switch_pxe_config function so that it only gets
called if root_uuid is assigned.

Fixes LP Bug #1190269.

Change-Id: I1abaf391f3a80dcacc815d2e38c6da9ad1b099ff
Merge "Fix local variable 'root_uuid' ref before assign"
Merge remote-tracking branch 'm_src_repo/citrix-fixes' into build-temp