Search in sources :

Example 11 with DiskDef

use of com.cloud.hypervisor.kvm.resource.LibvirtVMDef.DiskDef in project cloudstack by apache.

the class LibvirtVMDefTest method testDiskDef.

public void testDiskDef() {
    String filePath = "/var/lib/libvirt/images/disk.qcow2";
    String diskLabel = "vda";
    DiskDef disk = new DiskDef();
    DiskDef.DiskBus bus = DiskDef.DiskBus.VIRTIO;
    DiskDef.DiskFmtType type = DiskDef.DiskFmtType.QCOW2;
    DiskDef.DiskCacheMode cacheMode = DiskDef.DiskCacheMode.WRITEBACK;
    disk.defFileBasedDisk(filePath, diskLabel, bus, type);
    disk.setCacheMode(cacheMode);
    assertEquals(filePath, disk.getDiskPath());
    assertEquals(diskLabel, disk.getDiskLabel());
    assertEquals(bus, disk.getBusType());
    assertEquals(DiskDef.DeviceType.DISK, disk.getDeviceType());
    String xmlDef = disk.toString();
    String expectedXml = "<disk  device='disk' type='file'>\n<driver name='qemu' type='" + type.toString() + "' cache='" + cacheMode.toString() + "' />\n" + "<source file='" + filePath + "'/>\n<target dev='" + diskLabel + "' bus='" + bus.toString() + "'/>\n</disk>\n";
    assertEquals(xmlDef, expectedXml);
}
Also used : DiskDef(com.cloud.hypervisor.kvm.resource.LibvirtVMDef.DiskDef)

Example 12 with DiskDef

use of com.cloud.hypervisor.kvm.resource.LibvirtVMDef.DiskDef in project cloudstack by apache.

the class LibvirtMigrateCommandWrapper method execute.

@Override
public Answer execute(final MigrateCommand command, final LibvirtComputingResource libvirtComputingResource) {
    final String vmName = command.getVmName();
    String result = null;
    List<InterfaceDef> ifaces = null;
    List<DiskDef> disks = null;
    Domain dm = null;
    Connect dconn = null;
    Domain destDomain = null;
    Connect conn = null;
    String xmlDesc = null;
    List<Ternary<String, Boolean, String>> vmsnapshots = null;
    try {
        final LibvirtUtilitiesHelper libvirtUtilitiesHelper = libvirtComputingResource.getLibvirtUtilitiesHelper();
        conn = libvirtUtilitiesHelper.getConnectionByVmName(vmName);
        ifaces = libvirtComputingResource.getInterfaces(conn, vmName);
        disks = libvirtComputingResource.getDisks(conn, vmName);
        dm = conn.domainLookupByName(vmName);
        /*
                We replace the private IP address with the address of the destination host.
                This is because the VNC listens on the private IP address of the hypervisor,
                but that address is ofcourse different on the target host.

                MigrateCommand.getDestinationIp() returns the private IP address of the target
                hypervisor. So it's safe to use.

                The Domain.migrate method from libvirt supports passing a different XML
                description for the instance to be used on the target host.

                This is supported by libvirt-java from version 0.50.0

                CVE-2015-3252: Get XML with sensitive information suitable for migration by using
                               VIR_DOMAIN_XML_MIGRATABLE flag (value = 8)
                               https://libvirt.org/html/libvirt-libvirt-domain.html#virDomainXMLFlags

                               Use VIR_DOMAIN_XML_SECURE (value = 1) prior to v1.0.0.
             */
        // 1000000 equals v1.0.0
        final int xmlFlag = conn.getLibVirVersion() >= 1000000 ? 8 : 1;
        final String target = command.getDestinationIp();
        xmlDesc = dm.getXMLDesc(xmlFlag);
        xmlDesc = replaceIpForVNCInDescFile(xmlDesc, target);
        // delete the metadata of vm snapshots before migration
        vmsnapshots = libvirtComputingResource.cleanVMSnapshotMetadata(dm);
        dconn = libvirtUtilitiesHelper.retrieveQemuConnection("qemu+tcp://" + command.getDestinationIp() + "/system");
        //run migration in thread so we can monitor it
        s_logger.info("Live migration of instance " + vmName + " initiated");
        final ExecutorService executor = Executors.newFixedThreadPool(1);
        final Callable<Domain> worker = new MigrateKVMAsync(libvirtComputingResource, dm, dconn, xmlDesc, vmName, command.getDestinationIp());
        final Future<Domain> migrateThread = executor.submit(worker);
        executor.shutdown();
        long sleeptime = 0;
        while (!executor.isTerminated()) {
            Thread.sleep(100);
            sleeptime += 100;
            if (sleeptime == 1000) {
                // wait 1s before attempting to set downtime on migration, since I don't know of a VIR_DOMAIN_MIGRATING state
                final int migrateDowntime = libvirtComputingResource.getMigrateDowntime();
                if (migrateDowntime > 0) {
                    try {
                        final int setDowntime = dm.migrateSetMaxDowntime(migrateDowntime);
                        if (setDowntime == 0) {
                            s_logger.debug("Set max downtime for migration of " + vmName + " to " + String.valueOf(migrateDowntime) + "ms");
                        }
                    } catch (final LibvirtException e) {
                        s_logger.debug("Failed to set max downtime for migration, perhaps migration completed? Error: " + e.getMessage());
                    }
                }
            }
            if (sleeptime % 1000 == 0) {
                s_logger.info("Waiting for migration of " + vmName + " to complete, waited " + sleeptime + "ms");
            }
            // pause vm if we meet the vm.migrate.pauseafter threshold and not already paused
            final int migratePauseAfter = libvirtComputingResource.getMigratePauseAfter();
            if (migratePauseAfter > 0 && sleeptime > migratePauseAfter && dm.getInfo().state == DomainState.VIR_DOMAIN_RUNNING) {
                s_logger.info("Pausing VM " + vmName + " due to property vm.migrate.pauseafter setting to " + migratePauseAfter + "ms to complete migration");
                try {
                    dm.suspend();
                } catch (final LibvirtException e) {
                    // pause could be racy if it attempts to pause right when vm is finished, simply warn
                    s_logger.info("Failed to pause vm " + vmName + " : " + e.getMessage());
                }
            }
        }
        s_logger.info("Migration thread for " + vmName + " is done");
        destDomain = migrateThread.get(10, TimeUnit.SECONDS);
        if (destDomain != null) {
            for (final DiskDef disk : disks) {
                libvirtComputingResource.cleanupDisk(disk);
            }
        }
    } catch (final LibvirtException e) {
        s_logger.debug("Can't migrate domain: " + e.getMessage());
        result = e.getMessage();
    } catch (final InterruptedException e) {
        s_logger.debug("Interrupted while migrating domain: " + e.getMessage());
        result = e.getMessage();
    } catch (final ExecutionException e) {
        s_logger.debug("Failed to execute while migrating domain: " + e.getMessage());
        result = e.getMessage();
    } catch (final TimeoutException e) {
        s_logger.debug("Timed out while migrating domain: " + e.getMessage());
        result = e.getMessage();
    } finally {
        try {
            if (dm != null && result != null) {
                // restore vm snapshots in case of failed migration
                if (vmsnapshots != null) {
                    libvirtComputingResource.restoreVMSnapshotMetadata(dm, vmName, vmsnapshots);
                }
            }
            if (dm != null) {
                if (dm.isPersistent() == 1) {
                    dm.undefine();
                }
                dm.free();
            }
            if (dconn != null) {
                dconn.close();
            }
            if (destDomain != null) {
                destDomain.free();
            }
        } catch (final LibvirtException e) {
            s_logger.trace("Ignoring libvirt error.", e);
        }
    }
    if (result != null) {
    } else {
        libvirtComputingResource.destroyNetworkRulesForVM(conn, vmName);
        for (final InterfaceDef iface : ifaces) {
            // We don't know which "traffic type" is associated with
            // each interface at this point, so inform all vif drivers
            final List<VifDriver> allVifDrivers = libvirtComputingResource.getAllVifDrivers();
            for (final VifDriver vifDriver : allVifDrivers) {
                vifDriver.unplug(iface);
            }
        }
    }
    return new MigrateAnswer(command, result == null, result, null);
}
Also used : LibvirtException(org.libvirt.LibvirtException) Ternary(com.cloud.utils.Ternary) Connect(org.libvirt.Connect) VifDriver(com.cloud.hypervisor.kvm.resource.VifDriver) MigrateAnswer(com.cloud.agent.api.MigrateAnswer) InterfaceDef(com.cloud.hypervisor.kvm.resource.LibvirtVMDef.InterfaceDef) DiskDef(com.cloud.hypervisor.kvm.resource.LibvirtVMDef.DiskDef) MigrateKVMAsync(com.cloud.hypervisor.kvm.resource.MigrateKVMAsync) ExecutorService(java.util.concurrent.ExecutorService) Domain(org.libvirt.Domain) ExecutionException(java.util.concurrent.ExecutionException) TimeoutException(java.util.concurrent.TimeoutException)

Example 13 with DiskDef

use of com.cloud.hypervisor.kvm.resource.LibvirtVMDef.DiskDef in project cloudstack by apache.

the class LibvirtDomainXMLParser method parseDomainXML.

public boolean parseDomainXML(String domXML) {
    DocumentBuilder builder;
    try {
        builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
        InputSource is = new InputSource();
        is.setCharacterStream(new StringReader(domXML));
        Document doc = builder.parse(is);
        Element rootElement = doc.getDocumentElement();
        desc = getTagValue("description", rootElement);
        Element devices = (Element) rootElement.getElementsByTagName("devices").item(0);
        NodeList disks = devices.getElementsByTagName("disk");
        for (int i = 0; i < disks.getLength(); i++) {
            Element disk = (Element) disks.item(i);
            String type = disk.getAttribute("type");
            DiskDef def = new DiskDef();
            if (type.equalsIgnoreCase("network")) {
                String diskFmtType = getAttrValue("driver", "type", disk);
                String diskCacheMode = getAttrValue("driver", "cache", disk);
                String diskPath = getAttrValue("source", "name", disk);
                String protocol = getAttrValue("source", "protocol", disk);
                String authUserName = getAttrValue("auth", "username", disk);
                String poolUuid = getAttrValue("secret", "uuid", disk);
                String host = getAttrValue("host", "name", disk);
                int port = Integer.parseInt(getAttrValue("host", "port", disk));
                String diskLabel = getAttrValue("target", "dev", disk);
                String bus = getAttrValue("target", "bus", disk);
                DiskDef.DiskFmtType fmt = null;
                if (diskFmtType != null) {
                    fmt = DiskDef.DiskFmtType.valueOf(diskFmtType.toUpperCase());
                }
                def.defNetworkBasedDisk(diskPath, host, port, authUserName, poolUuid, diskLabel, DiskDef.DiskBus.valueOf(bus.toUpperCase()), DiskDef.DiskProtocol.valueOf(protocol.toUpperCase()), fmt);
                def.setCacheMode(DiskDef.DiskCacheMode.valueOf(diskCacheMode.toUpperCase()));
            } else {
                String diskFmtType = getAttrValue("driver", "type", disk);
                String diskCacheMode = getAttrValue("driver", "cache", disk);
                String diskFile = getAttrValue("source", "file", disk);
                String diskDev = getAttrValue("source", "dev", disk);
                String diskLabel = getAttrValue("target", "dev", disk);
                String bus = getAttrValue("target", "bus", disk);
                String device = disk.getAttribute("device");
                if (type.equalsIgnoreCase("file")) {
                    if (device.equalsIgnoreCase("disk")) {
                        DiskDef.DiskFmtType fmt = null;
                        if (diskFmtType != null) {
                            fmt = DiskDef.DiskFmtType.valueOf(diskFmtType.toUpperCase());
                        }
                        def.defFileBasedDisk(diskFile, diskLabel, DiskDef.DiskBus.valueOf(bus.toUpperCase()), fmt);
                    } else if (device.equalsIgnoreCase("cdrom")) {
                        def.defISODisk(diskFile);
                    }
                } else if (type.equalsIgnoreCase("block")) {
                    def.defBlockBasedDisk(diskDev, diskLabel, DiskDef.DiskBus.valueOf(bus.toUpperCase()));
                }
                if (diskCacheMode != null) {
                    def.setCacheMode(DiskDef.DiskCacheMode.valueOf(diskCacheMode.toUpperCase()));
                }
            }
            NodeList iotune = disk.getElementsByTagName("iotune");
            if ((iotune != null) && (iotune.getLength() != 0)) {
                String bytesReadRateStr = getTagValue("read_bytes_sec", (Element) iotune.item(0));
                if (bytesReadRateStr != null) {
                    Long bytesReadRate = Long.parseLong(bytesReadRateStr);
                    def.setBytesReadRate(bytesReadRate);
                }
                String bytesWriteRateStr = getTagValue("write_bytes_sec", (Element) iotune.item(0));
                if (bytesWriteRateStr != null) {
                    Long bytesWriteRate = Long.parseLong(bytesWriteRateStr);
                    def.setBytesWriteRate(bytesWriteRate);
                }
                String iopsReadRateStr = getTagValue("read_iops_sec", (Element) iotune.item(0));
                if (iopsReadRateStr != null) {
                    Long iopsReadRate = Long.parseLong(iopsReadRateStr);
                    def.setIopsReadRate(iopsReadRate);
                }
                String iopsWriteRateStr = getTagValue("write_iops_sec", (Element) iotune.item(0));
                if (iopsWriteRateStr != null) {
                    Long iopsWriteRate = Long.parseLong(iopsWriteRateStr);
                    def.setIopsWriteRate(iopsWriteRate);
                }
            }
            diskDefs.add(def);
        }
        NodeList nics = devices.getElementsByTagName("interface");
        for (int i = 0; i < nics.getLength(); i++) {
            Element nic = (Element) nics.item(i);
            String type = nic.getAttribute("type");
            String mac = getAttrValue("mac", "address", nic);
            String dev = getAttrValue("target", "dev", nic);
            String model = getAttrValue("model", "type", nic);
            InterfaceDef def = new InterfaceDef();
            NodeList bandwidth = nic.getElementsByTagName("bandwidth");
            Integer networkRateKBps = 0;
            if ((bandwidth != null) && (bandwidth.getLength() != 0)) {
                Integer inbound = Integer.valueOf(getAttrValue("inbound", "average", (Element) bandwidth.item(0)));
                Integer outbound = Integer.valueOf(getAttrValue("outbound", "average", (Element) bandwidth.item(0)));
                if (inbound.equals(outbound)) {
                    networkRateKBps = inbound;
                }
            }
            if (type.equalsIgnoreCase("network")) {
                String network = getAttrValue("source", "network", nic);
                def.defPrivateNet(network, dev, mac, NicModel.valueOf(model.toUpperCase()), networkRateKBps);
            } else if (type.equalsIgnoreCase("bridge")) {
                String bridge = getAttrValue("source", "bridge", nic);
                def.defBridgeNet(bridge, dev, mac, NicModel.valueOf(model.toUpperCase()), networkRateKBps);
            } else if (type.equalsIgnoreCase("ethernet")) {
                String scriptPath = getAttrValue("script", "path", nic);
                def.defEthernet(dev, mac, NicModel.valueOf(model.toUpperCase()), scriptPath, networkRateKBps);
            }
            interfaces.add(def);
        }
        NodeList ports = devices.getElementsByTagName("channel");
        for (int i = 0; i < ports.getLength(); i++) {
            Element channel = (Element) ports.item(i);
            String type = channel.getAttribute("type");
            String path = getAttrValue("source", "path", channel);
            String name = getAttrValue("target", "name", channel);
            String state = getAttrValue("target", "state", channel);
            ChannelDef def = null;
            if (!StringUtils.isNotBlank(state)) {
                def = new ChannelDef(name, ChannelDef.ChannelType.valueOf(type.toUpperCase()), new File(path));
            } else {
                def = new ChannelDef(name, ChannelDef.ChannelType.valueOf(type.toUpperCase()), ChannelDef.ChannelState.valueOf(state.toUpperCase()), new File(path));
            }
            channels.add(def);
        }
        Element graphic = (Element) devices.getElementsByTagName("graphics").item(0);
        if (graphic != null) {
            String port = graphic.getAttribute("port");
            if (port != null) {
                try {
                    vncPort = Integer.parseInt(port);
                    if (vncPort != -1) {
                        vncPort = vncPort - 5900;
                    } else {
                        vncPort = null;
                    }
                } catch (NumberFormatException nfe) {
                    vncPort = null;
                }
            }
        }
        NodeList rngs = devices.getElementsByTagName("rng");
        for (int i = 0; i < rngs.getLength(); i++) {
            RngDef def = null;
            Element rng = (Element) rngs.item(i);
            String backendModel = getAttrValue("backend", "model", rng);
            String path = getTagValue("backend", rng);
            String bytes = getAttrValue("rate", "bytes", rng);
            String period = getAttrValue("rate", "period", rng);
            if (Strings.isNullOrEmpty(backendModel)) {
                def = new RngDef(path, Integer.parseInt(bytes), Integer.parseInt(period));
            } else {
                def = new RngDef(path, RngBackendModel.valueOf(backendModel.toUpperCase()), Integer.parseInt(bytes), Integer.parseInt(period));
            }
            rngDefs.add(def);
        }
        return true;
    } catch (ParserConfigurationException e) {
        s_logger.debug(e.toString());
    } catch (SAXException e) {
        s_logger.debug(e.toString());
    } catch (IOException e) {
        s_logger.debug(e.toString());
    }
    return false;
}
Also used : InputSource(org.xml.sax.InputSource) Element(org.w3c.dom.Element) NodeList(org.w3c.dom.NodeList) IOException(java.io.IOException) Document(org.w3c.dom.Document) SAXException(org.xml.sax.SAXException) InterfaceDef(com.cloud.hypervisor.kvm.resource.LibvirtVMDef.InterfaceDef) RngDef(com.cloud.hypervisor.kvm.resource.LibvirtVMDef.RngDef) DiskDef(com.cloud.hypervisor.kvm.resource.LibvirtVMDef.DiskDef) DocumentBuilder(javax.xml.parsers.DocumentBuilder) StringReader(java.io.StringReader) ChannelDef(com.cloud.hypervisor.kvm.resource.LibvirtVMDef.ChannelDef) ParserConfigurationException(javax.xml.parsers.ParserConfigurationException) File(java.io.File)

Example 14 with DiskDef

use of com.cloud.hypervisor.kvm.resource.LibvirtVMDef.DiskDef in project cloudstack by apache.

the class LibvirtComputingResource method getDisks.

public List<DiskDef> getDisks(final Connect conn, final String vmName) {
    final LibvirtDomainXMLParser parser = new LibvirtDomainXMLParser();
    Domain dm = null;
    try {
        dm = conn.domainLookupByName(vmName);
        parser.parseDomainXML(dm.getXMLDesc(0));
        return parser.getDisks();
    } catch (final LibvirtException e) {
        s_logger.debug("Failed to get dom xml: " + e.toString());
        return new ArrayList<DiskDef>();
    } finally {
        try {
            if (dm != null) {
                dm.free();
            }
        } catch (final LibvirtException e) {
            s_logger.trace("Ignoring libvirt error.", e);
        }
    }
}
Also used : DiskDef(com.cloud.hypervisor.kvm.resource.LibvirtVMDef.DiskDef) LibvirtException(org.libvirt.LibvirtException) Domain(org.libvirt.Domain)

Example 15 with DiskDef

use of com.cloud.hypervisor.kvm.resource.LibvirtVMDef.DiskDef in project cloudstack by apache.

the class LibvirtComputingResource method getVmStat.

public VmStatsEntry getVmStat(final Connect conn, final String vmName) throws LibvirtException {
    Domain dm = null;
    try {
        dm = getDomain(conn, vmName);
        if (dm == null) {
            return null;
        }
        DomainInfo info = dm.getInfo();
        final VmStatsEntry stats = new VmStatsEntry();
        stats.setNumCPUs(info.nrVirtCpu);
        stats.setEntityType("vm");
        stats.setMemoryKBs(info.maxMem);
        stats.setTargetMemoryKBs(info.memory);
        stats.setIntFreeMemoryKBs(getMemoryFreeInKBs(dm));
        /* get cpu utilization */
        VmStats oldStats = null;
        final Calendar now = Calendar.getInstance();
        oldStats = _vmStats.get(vmName);
        long elapsedTime = 0;
        if (oldStats != null) {
            elapsedTime = now.getTimeInMillis() - oldStats._timestamp.getTimeInMillis();
            double utilization = (info.cpuTime - oldStats._usedTime) / ((double) elapsedTime * 1000000);
            final NodeInfo node = conn.nodeInfo();
            utilization = utilization / node.cpus;
            if (utilization > 0) {
                stats.setCPUUtilization(utilization * 100);
            }
        }
        /* get network stats */
        final List<InterfaceDef> vifs = getInterfaces(conn, vmName);
        long rx = 0;
        long tx = 0;
        for (final InterfaceDef vif : vifs) {
            final DomainInterfaceStats ifStats = dm.interfaceStats(vif.getDevName());
            rx += ifStats.rx_bytes;
            tx += ifStats.tx_bytes;
        }
        if (oldStats != null) {
            final double deltarx = rx - oldStats._rx;
            if (deltarx > 0) {
                stats.setNetworkReadKBs(deltarx / 1024);
            }
            final double deltatx = tx - oldStats._tx;
            if (deltatx > 0) {
                stats.setNetworkWriteKBs(deltatx / 1024);
            }
        }
        /* get disk stats */
        final List<DiskDef> disks = getDisks(conn, vmName);
        long io_rd = 0;
        long io_wr = 0;
        long bytes_rd = 0;
        long bytes_wr = 0;
        for (final DiskDef disk : disks) {
            final DomainBlockStats blockStats = dm.blockStats(disk.getDiskLabel());
            io_rd += blockStats.rd_req;
            io_wr += blockStats.wr_req;
            bytes_rd += blockStats.rd_bytes;
            bytes_wr += blockStats.wr_bytes;
        }
        if (oldStats != null) {
            final long deltaiord = io_rd - oldStats._ioRead;
            if (deltaiord > 0) {
                stats.setDiskReadIOs(deltaiord);
            }
            final long deltaiowr = io_wr - oldStats._ioWrote;
            if (deltaiowr > 0) {
                stats.setDiskWriteIOs(deltaiowr);
            }
            final double deltabytesrd = bytes_rd - oldStats._bytesRead;
            if (deltabytesrd > 0) {
                stats.setDiskReadKBs(deltabytesrd / 1024);
            }
            final double deltabyteswr = bytes_wr - oldStats._bytesWrote;
            if (deltabyteswr > 0) {
                stats.setDiskWriteKBs(deltabyteswr / 1024);
            }
        }
        /* save to Hashmap */
        final VmStats newStat = new VmStats();
        newStat._usedTime = info.cpuTime;
        newStat._rx = rx;
        newStat._tx = tx;
        newStat._ioRead = io_rd;
        newStat._ioWrote = io_wr;
        newStat._bytesRead = bytes_rd;
        newStat._bytesWrote = bytes_wr;
        newStat._timestamp = now;
        _vmStats.put(vmName, newStat);
        return stats;
    } finally {
        if (dm != null) {
            dm.free();
        }
    }
}
Also used : DomainInterfaceStats(org.libvirt.DomainInterfaceStats) Calendar(java.util.Calendar) VmStatsEntry(com.cloud.agent.api.VmStatsEntry) InterfaceDef(com.cloud.hypervisor.kvm.resource.LibvirtVMDef.InterfaceDef) DiskDef(com.cloud.hypervisor.kvm.resource.LibvirtVMDef.DiskDef) NodeInfo(org.libvirt.NodeInfo) DomainBlockStats(org.libvirt.DomainBlockStats) DomainInfo(org.libvirt.DomainInfo) Domain(org.libvirt.Domain)

Aggregations

DiskDef (com.cloud.hypervisor.kvm.resource.LibvirtVMDef.DiskDef)15 Domain (org.libvirt.Domain)9 InterfaceDef (com.cloud.hypervisor.kvm.resource.LibvirtVMDef.InterfaceDef)7 InternalErrorException (com.cloud.exception.InternalErrorException)4 Connect (org.libvirt.Connect)4 LibvirtException (org.libvirt.LibvirtException)4 KVMStoragePool (com.cloud.hypervisor.kvm.storage.KVMStoragePool)3 File (java.io.File)3 IOException (java.io.IOException)3 DomainBlockStats (org.libvirt.DomainBlockStats)3 VmStatsEntry (com.cloud.agent.api.VmStatsEntry)2 ChannelDef (com.cloud.hypervisor.kvm.resource.LibvirtVMDef.ChannelDef)2 RngDef (com.cloud.hypervisor.kvm.resource.LibvirtVMDef.RngDef)2 VifDriver (com.cloud.hypervisor.kvm.resource.VifDriver)2 KVMPhysicalDisk (com.cloud.hypervisor.kvm.storage.KVMPhysicalDisk)2 CloudRuntimeException (com.cloud.utils.exception.CloudRuntimeException)2 ArrayList (java.util.ArrayList)2 ParserConfigurationException (javax.xml.parsers.ParserConfigurationException)2 Test (org.junit.Test)2 DomainInfo (org.libvirt.DomainInfo)2