This paper reports on the results of detailed X-ray diffraction studies of ZnTe and ZnMgTe nanowires grown by molecular beam epitaxy. As the aim of proper interpretation of the X-ray measurements of samples consisting of large number of nanowires we defined a virtual unit cell as an averaged one from all really existing cells in the large number of nanowires. The studies revealed that average structure of nanowires is characterized by a minor rhombohedral distortion. The occurrence of this distortion is attributed to the specific defect structure in the majority of nanowires.