Record 31-time Copa del Rey winners Barcelona were drawn at home against Real Betis in the last 16 on Wednesday.
Holders Athletic Bilbao welcome Osasuna while Spanish champions Real Madrid host Celta Vigo.
Diego Simeone's Atletico Madrid visit second-division Elche, while fourth-tier Pontevedra, the lowest-ranked side left in the competition, host LaLiga team Getafe.
The matches will take place between January 14th to 16th.
Full draw:
Pontevedra vs Getafe, Ourense vs Valencia, Almeria vs Leganes, Elche vs Atletico Madrid, Real Madrid vs Celta Vigo, Barcelona vs Real Betis, Real Sociedad vs Rayo Vallecano, Athletic Bilbao vs Osasuna.