  We give a construction of "integral local Shimura varieties" which are formal
schemes that generalize the well-known integral models of the Drinfeld $p$-adic
upper half spaces. The construction applies to all classical groups, at least
for odd $p$. These formal schemes also generalize the formal schemes defined by
Rapoport-Zink via moduli of $p$-divisible groups, and are characterized purely
in group-theoretic terms. More precisely, for a local $p$-adic Shimura datum
$(G, b, \mu)$ and a quasi-parahoric group scheme $\mathcal G$ for $G$, Scholze
has defined a functor on perfectoid spaces which parametrizes $p$-adic shtukas.
He conjectured that this functor is representable by a normal formal scheme
which is locally formally of finite type and flat over $O_{\breve E}$.
Scholze-Weinstein proved this conjecture when $(G, b, \mu)$ is of (P)EL type by
using Rapoport-Zink formal schemes. We prove this conjecture for any $(G, \mu)$
of abelian type when $p\neq 2$, and when $p=2$ and $G$ is of type $A$ or $C$.
We also relate the generic fiber of this formal scheme to the local Shimura
variety, a rigid-analytic space attached by Scholze to $(G, b, \mu, {\mathcal
G})$.
