As long as they do not care that they could be "shut off", I see nothing wrong with it. If they dislike that notion (like real humans do), then the possibility of shutdown would cause suffering and would be immoral/unethical to allow.
You're assuming that the machines will care about being shut off - we would probably design them so that they don't care about this, because this makes them easier to work with. And then it's no longer unethical.
You're assuming that the machines will care about being shut off - we would probably design them so that they don't care about this, because this makes them easier to work with. And then it's no longer unethical.