Search in sources :

Example 1 with LibvirtVmXmlBuilder

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;
}
Also used : VmDevice(org.ovirt.engine.core.common.businessentities.VmDevice) VmNic(org.ovirt.engine.core.common.businessentities.network.VmNic) LibvirtVmXmlBuilder(org.ovirt.engine.core.vdsbroker.builder.vminfo.LibvirtVmXmlBuilder)

Example 2 with LibvirtVmXmlBuilder

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();
}
Also used : LibvirtVmXmlBuilder(org.ovirt.engine.core.vdsbroker.builder.vminfo.LibvirtVmXmlBuilder)

Example 3 with LibvirtVmXmlBuilder

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;
}
Also used : LibvirtVmXmlBuilder(org.ovirt.engine.core.vdsbroker.builder.vminfo.LibvirtVmXmlBuilder)

Aggregations

LibvirtVmXmlBuilder (org.ovirt.engine.core.vdsbroker.builder.vminfo.LibvirtVmXmlBuilder)3 VmDevice (org.ovirt.engine.core.common.businessentities.VmDevice)1 VmNic (org.ovirt.engine.core.common.businessentities.network.VmNic)1