protected override void Run() { Description = Messages.ACTION_VIF_CREATING; RelatedTask = VIF.async_create(Session, _vifDescriptor); PollToCompletion(); if (VM.power_state == vm_power_state.Running) { string newVifRef = Result; //the result from async_create if (VIF.get_allowed_operations(Session, newVifRef).Contains(vif_operations.plug)) { VIF.plug(Session, newVifRef); // try hot-plugging } else { RebootRequired = true; } } Description = Messages.ACTION_VIF_CREATED; }