SerialDef serial = new SerialDef("pty", null, (short) 0);
devices.addDevice(serial);
if (vmTO.getType() != VirtualMachine.Type.User) {
VirtioSerialDef vserial = new VirtioSerialDef(vmTO.getName(), null);
devices.addDevice(vserial);
}
ConsoleDef console = new ConsoleDef("pty", null, null, (short) 0);
devices.addDevice(console);