I realize this question is pretty old, but I'll add my thoughts. The weak form, or variational form, of a PDE is obtained by multiplying the original PDE (or system of PDE's) with a test function(s) and integrating by parts. It turns out for mechanics problems, the principle of virtual work is another name for a particular weak form that is developed with a symmetric functional setting. What do I mean by this? Let us consider the simplest second order equation, say on the interval $(0,1)$:
$$u'' = f$$
accompanied with the boundary conditions $u(0) = u(1) = 0$. Multiplying by a test function $v$ and integrating, we arrive at the first weak form of this equation:
$$ \int_0^1 u'' v = \int_0^1 fv.$$
Now, we haven't done much to the original PDE, and the energy spaces for $u$ and $v$ are $H^2(0,1)$ and $L^2(0,1)$ respectively. (It is sometimes called the trivial formulation for exactly this reason.) Nevertheless, this is a weak form of the original PDE.
But, we can also integrate by parts. Doing so once gives us another weak form:
$$-\int_0^1 u'v' + (u'v)|_0^1 = \int_0^1 fv. $$
Now, the energy setting is $u,v \in H^1(0,1)$. This specific variational formulation is known as the principle of virtual work. Notice that the energy spaces for trial and test functions are the same.
But, we can integrate by parts still! Doing so gives us yet another weak form:
$$ \int_0^1 uv'' - (uv')|_0^1+(u'v)|_0^1 = \int_0^1 fv .$$
The energy setting is now $u \in L^2(0,1)$ and $v\in H^2(0,1)$. This formulation, where solution variables are in the most relaxed space, is sometimes known as the ultraweak variational formulation, since it puts all the regularity on the test functions.
The take home message is this: for a given PDE, we may be able to develop several weak (or variational) formulations that result in different functional settings. One particular formulation, the one in which the functional setting is symmetric, is commonly referred to as the principle of virtual work, which, unfortunately, is the only one commonly taught to engineers.