use of org.ovirt.engine.core.vdsbroker.builder.vminfo.LibvirtVmXmlBuilder in project ovirt-engine by oVirt.
the class HotPlugOrUnplugNicVDSCommand method generateDomainXml.
private String generateDomainXml() {
VmNic nic = getParameters().getNic();
VmDevice vmDevice = getParameters().getVmDevice();
LibvirtVmXmlBuilder builder = new LibvirtVmXmlBuilder(getParameters().getVm(), getVds().getId(), nic, vmDevice, vmInfoBuildUtils, nic.isPassthrough() ? Collections.singletonMap(nic.getId(), vmDevice.getHostDevice()) : Collections.emptyMap());
String libvirtXml = builder.buildHotplugNic();
String prettyLibvirtXml = XmlUtils.prettify(libvirtXml);
if (prettyLibvirtXml != null) {
log.info("NIC hot-set: {}", prettyLibvirtXml);
}
return libvirtXml;
}
use of org.ovirt.engine.core.vdsbroker.builder.vminfo.LibvirtVmXmlBuilder in project ovirt-engine by oVirt.
the class OvfManager method generateEngineXml.
private String generateEngineXml(VM vm, String cpuId, String emulatedMachine) {
vm.setCpuName(cpuId);
vm.setEmulatedMachine(emulatedMachine);
return new LibvirtVmXmlBuilder(vm, vmInfoBuildUtils).buildCreateVm();
}
use of org.ovirt.engine.core.vdsbroker.builder.vminfo.LibvirtVmXmlBuilder in project ovirt-engine by oVirt.
the class CreateBrokerVDSCommand method generateDomainXml.
private String generateDomainXml() {
LibvirtVmXmlBuilder builder = new LibvirtVmXmlBuilder(vm, getVds().getId(), getPayload(), getVds().getCpuThreads(), getParameters().isVolatileRun(), getParameters().getPassthroughVnicToVfMap(), vmInfoBuildUtils);
String libvirtXml = builder.buildCreateVm();
String prettyLibvirtXml = XmlUtils.prettify(libvirtXml);
if (prettyLibvirtXml != null) {
log.info("VM {}", prettyLibvirtXml);
}
return libvirtXml;
}
Aggregations