Extensions of local vector fields to whole manifold Let $M$ be a smooth manifold (with boundary). Suppose I have a smooth vector field $T$ defined on the complement of a compact subset $K$ of $M$ and I wish to extend $T$ to the whole of $M$. What are the obstructions to doing so? Does $M$ need to be compact? Does $K$ need to be a submanifold?
I have a feeling that an argument involving a partition of unity of $K$ would suffice for extending $T$ into $K$, but have not been able to find a decent reference.
 A: Take the sphere minus one point and a unit vector field on the complement of this point. You may not extend this to the sphere. An obstruction is here topological but in general you need to put the question more precisely simply to avoid non-continuity of an extension.
A: The sheaf of smooth functions on a manifold is fine and hence soft, so we can extend sections on closed subsets to global sections. However, it is not generally flabby (flasque): local sections on open subsets do not in general extend to global sections. Note that only discrete manifolds can have a flabby sheaf of smooth functions, which is the case because every subset is open and hence closed.
Modules over the sheaf of smooth functions are also soft, but not in general flabby (except for the zero module, for trivial reasons). Since the sheaf of vector fields is such a module, we wouldn't usually expect vector fields on open subsets to extend to global sections.
For example, if you have any sort of open (proper) subset which is diffeomorphic to an open ball, just take a smooth function that blows up as you go to the boundary of the ball. Then you can rescale any vector field that does not decay to zero at the boundary to a vector field which fails to globalize.
H. H. Rugh's example in his answer is also very good because it shows that even without blow ups, a smooth vector field on an open set (which in his case is diffeomorphic to an open disk) can fail to extend globally due to the topology of the sphere.
As mentioned by Ben McKay in the comments, you can have a look at Charles Fefferman's paper proving a sharp version of the Whitney extension theorem. It's available here.
