OH radicals may play an important role in reactions that take place on interstellar icy grain surfaces, due to their high reactivity. Unfortunately, laboratory experiments aiming at simulating such reactions are hindered by the high reactivity of these species. Indeed, a method to isolate and further study the reactivity of OH radicals is still missing. This paper presents a study we carried out to determine the best conditions to isolate OH radicals in water ice. OH radicals were produced using a microwave discharge from either pure gaseous water or a gaseous mixture containing diluted water. Species thus formed were further condensed on a cold mirror at temperatures ranging from 3.5 to 30 K. The samples were then probed with a Fourier transform infrared spectrometer. The dilution of water into a rare gas (He, Ne) was found to be the best way to form an ice containing a high proportion of OH radicals, especially at low temperatures. These conditions, namely low temperatures and low concentrations, allow for the cooling of species formed during the discharge and prevent radical recombination.