VirtualMachine vm = vmProfile.getVirtualMachine();
Long minMemory = (long) (offering.getRamSize() / vmProfile.getMemoryOvercommitRatio());
int minspeed = (int) (offering.getSpeed() / vmProfile.getCpuOvercommitRatio());
int maxspeed = (offering.getSpeed());
VirtualMachineTO to = new VirtualMachineTO(vm.getId(), vm.getInstanceName(), vm.getType(), offering.getCpu(), minspeed, maxspeed,
minMemory * 1024l * 1024l, offering.getRamSize() * 1024l * 1024l, null, null, vm.isHaEnabled(), vm.limitCpuUse(), vm.getVncPassword());
to.setBootArgs(vmProfile.getBootArgs());
List<NicProfile> nicProfiles = vmProfile.getNics();
NicTO[] nics = new NicTO[nicProfiles.size()];
int i = 0;