return this;
}
public VirtualMachineDefinition build()
{
final VirtualMachineDefinition virtualMachine = new VirtualMachineDefinition();
// TODO check not null
virtualMachine.setName(name);
virtualMachine.setUuid(uuid);
virtualMachine.setFriendlyName(friendlyName);
virtualMachine.setLayer(layer);
virtualMachine.setHardwareConfiguration(hardConf);
virtualMachine.setNetworkConfiguration(netConf);
virtualMachine.setOperatingSystem(operatingSystem);
virtualMachine.setBootstrap(bootstrapConf);
virtualMachine.setAntiaffinityRule(antiaffinityRule);
virtualMachine.setOwner(owner);
virtualMachine.setLoginUser(loginUser);
virtualMachine.setLoginPassword(loginPassword);
virtualMachine.setFirewallPolicies(firewallPolicies);
virtualMachine.setDiskController(diskController);
virtualMachine.setPrimaryDisk(primaryDisk);
virtualMachine.setSecondaryDisks(secondaryDisks);
virtualMachine.setHA(isHA);
virtualMachine.setImported(isImported);
if (hasDvd)
{
virtualMachine.setCdrom(new Cdrom());
}
if (primaryDisk == null)
{
throw new BuilderException(VirtualMachineDescriptionBuilderError.NO_PRIMARY_DISK);