We report results of molecular dynamics simulations of amorphous ice for pressures up to 22.5 kbar. The high-density amorphous ice (HDA) as prepared by pressure-induced amorphization of Ih ice at T=80 K is annealed to T=170 K at various pressures to allow for relaxation. Upon increase of pressure, relaxed amorphous ice undergoes a pronounced change of structure, ranging from the low-density amorphous ice (LDA) at p=0, through a continuum of HDA states to the limiting very high-density amorphous ice (VHDA) regime above 10 kbar. The main part of the overall structural change takes place within the HDA megabasin, which includes a variety of structures with quite different local and medium-range order as well as network topology and spans a broad range of densities. The VHDA represents the limit to densification by adapting the hydrogen-bonded network topology, without creating interpenetrating networks. The connection between structure and metastability of various forms upon decompression and heating is studied and discussed. We also discuss the analogy with amorphous and crystalline silica. Finally, some conclusions concerning the relation between amorphous ice and supercooled water are drawn.