This trial is conducted in Europe and the United States of America (USA). The aim of this trial is to compare NN1250 (insulin degludec (IDeg)) with insulin glargine (IGlar) in subjects with type 2 diabetes never treated with insulin followed by the extension trial investigating the long-term safety and tolerability in terms of comparing NN1250 with insulin glargine in subjects with type 2 diabetes.