The reason you are having trouble getting LilyPond to display the notation in the image, is that it isn't following the normal convention for writing tremolos.
A single tremolo figure is represented by two notes of the same value, and that value is the total value the figure takes. The number of extra beams determines the value of each component note.
To fill the bar correctly, the topmost beam (that connects the note stems) in the original image shouldn't be there.
As is, LilyPond (correctly) interprets your bar as only ¾ full (9/8 of 12/8). This is why you're not getting the automatic barline at the end.
There are two interpretations of the tremolo figure that would make sense, theses will both look the same as each other (and be without a connected topmost beam):
As 4 sets of pairs of dotted 32nd notes:
\relative c' {
\time 12/8
\repeat tremolo 4 { b32. d } r4.
\repeat tremolo 4 { f32. g } r4. |
}
or
As 6 sets of pairs of (un-dotted) 32nd notes:
\relative c' {
\time 12/8
\repeat tremolo 6 { b32 d } r4.
\repeat tremolo 6 { f32 g } r4. |
}
(this probably makes the most sense)
But typically, when multiple tremolo beams are used they will be performed as unmeasured tremolos (as quick as possible), so it doesn't really matter which of theses ways you choose to code it.

However, if you really do want to replicate the original image you can use some invisible spacer rests (i.e. s
); something like the following. But this is a bit of a hack, and you should be aware that this is not the normal/correct music notation for tremolos:
\relative c' {
\time 12/8
\repeat tremolo 2 { b32. s d s } r4.
\repeat tremolo 2 { f32. s g s } r4. |
}