A retrial queueing model is considered with Poisson input and an unlimited number of servers. At any epoch only a finite number of the servers are active, the others are called dormant. An active server is always in one of two possible states, idle or busy. When upon arrival of a customer at least one of the active servers is idle, the newly arrived customer goes into service immediately, making the idle server busy. When at an arrival epoch all active servers are busy, the decision must be made to send the newly arrived customer into orbit, or to activate a dormant server for immediate service of the arrived customer. Customers in orbit try to reenter the system after an exponentially distributed retrial time. At service completion epochs the decision must be made to keep the newly become idle server active, or to make this server dormant. The service times of the customers are independent and have a Coxian-2 distribution. Given specific costs for activating servers, keeping servers active and a holding cost for customers staying in orbit, the problem is when to activate and shut down servers in order to minimize the long-run average cost per unit time. Using Markov decision theory an efficient algorithm is discussed for calculating an optimal policy.