Examples of defBlockBasedDisk()


Examples of com.cloud.hypervisor.kvm.resource.LibvirtVMDef.DiskDef.defBlockBasedDisk()

                    */
                    disk.defNetworkBasedDisk(physicalDisk.getPath().replace("rbd:", ""), pool.getSourceHost(), pool.getSourcePort(),
                                             pool.getAuthUserName(), pool.getUuid(),
                                             devId, diskBusType, diskProtocol.RBD);
                } else if (pool.getType() == StoragePoolType.CLVM) {
                    disk.defBlockBasedDisk(physicalDisk.getPath(), devId,
                    diskBusType);
                } else {
                    if (volume.getType() == Volume.Type.DATADISK) {
                         disk.defFileBasedDisk(physicalDisk.getPath(), devId,
                         DiskDef.diskBus.VIRTIO,
View Full Code Here

Examples of com.cloud.hypervisor.kvm.resource.LibvirtVMDef.DiskDef.defBlockBasedDisk()

        /* add patch disk */
        DiskDef patchDisk = new DiskDef();

        if (pool.getType() == StoragePoolType.CLVM) {
            patchDisk.defBlockBasedDisk(patchDiskPath, 1, rootDisk.getBusType());
        } else {
            patchDisk.defFileBasedDisk(patchDiskPath, 1, rootDisk.getBusType(),
            DiskDef.diskFmtType.RAW);
        }
View Full Code Here

Examples of com.cloud.hypervisor.kvm.resource.LibvirtVMDef.DiskDef.defBlockBasedDisk()

                diskdef = new DiskDef();
                if (attachingDisk.getFormat() == PhysicalDiskFormat.QCOW2) {
                    diskdef.defFileBasedDisk(attachingDisk.getPath(), devId,
                            DiskDef.diskBus.VIRTIO, DiskDef.diskFmtType.QCOW2);
                } else if (attachingDisk.getFormat() == PhysicalDiskFormat.RAW) {
                    diskdef.defBlockBasedDisk(attachingDisk.getPath(), devId,
                            DiskDef.diskBus.VIRTIO);
                }
            }

            String xml = diskdef.toString();
View Full Code Here

Examples of com.cloud.hypervisor.kvm.resource.LibvirtVMDef.DiskDef.defBlockBasedDisk()

                            DiskDef.diskBus.VIRTIO, diskProtocol.RBD);
                } else if (attachingDisk.getFormat() == PhysicalDiskFormat.QCOW2) {
                    diskdef.defFileBasedDisk(attachingDisk.getPath(), devId,
                            DiskDef.diskBus.VIRTIO, DiskDef.diskFmtType.QCOW2);
                } else if (attachingDisk.getFormat() == PhysicalDiskFormat.RAW) {
                    diskdef.defBlockBasedDisk(attachingDisk.getPath(), devId,
                            DiskDef.diskBus.VIRTIO);
                }
                if ((bytesReadRate != null) && (bytesReadRate > 0))
                    diskdef.setBytesReadRate(bytesReadRate);
                if ((bytesWriteRate != null) && (bytesWriteRate > 0))
View Full Code Here

Examples of com.cloud.hypervisor.kvm.resource.LibvirtVMDef.DiskDef.defBlockBasedDisk()

                     */
                    disk.defNetworkBasedDisk(physicalDisk.getPath().replace("rbd:", ""), pool.getSourceHost(), pool.getSourcePort(),
                            pool.getAuthUserName(), pool.getUuid(),
                            devId, diskBusType, diskProtocol.RBD);
                } else if (pool.getType() == StoragePoolType.CLVM) {
                    disk.defBlockBasedDisk(physicalDisk.getPath(), devId,
                            diskBusType);
                } else {
                    if (volume.getType() == Volume.Type.DATADISK) {
                        disk.defFileBasedDisk(physicalDisk.getPath(), devId,
                                DiskDef.diskBus.VIRTIO,
View Full Code Here

Examples of com.cloud.hypervisor.kvm.resource.LibvirtVMDef.DiskDef.defBlockBasedDisk()

                                    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()));
                    }
                }

                NodeList iotune = disk.getElementsByTagName("iotune");
View Full Code Here

Examples of com.cloud.hypervisor.kvm.resource.LibvirtVMDef.DiskDef.defBlockBasedDisk()

                            DiskDef.diskBus.VIRTIO, diskProtocol.RBD);
                } else if (attachingDisk.getFormat() == PhysicalDiskFormat.QCOW2) {
                    diskdef.defFileBasedDisk(attachingDisk.getPath(), devId,
                            DiskDef.diskBus.VIRTIO, DiskDef.diskFmtType.QCOW2);
                } else if (attachingDisk.getFormat() == PhysicalDiskFormat.RAW) {
                    diskdef.defBlockBasedDisk(attachingDisk.getPath(), devId,
                            DiskDef.diskBus.VIRTIO);
                }
            }

            String xml = diskdef.toString();
View Full Code Here

Examples of com.cloud.hypervisor.kvm.resource.LibvirtVMDef.DiskDef.defBlockBasedDisk()

                     */
                    disk.defNetworkBasedDisk(physicalDisk.getPath().replace("rbd:", ""), pool.getSourceHost(), pool.getSourcePort(),
                            pool.getAuthUserName(), pool.getUuid(),
                            devId, diskBusType, diskProtocol.RBD);
                } else if (pool.getType() == StoragePoolType.CLVM || physicalDisk.getFormat() == PhysicalDiskFormat.RAW) {
                    disk.defBlockBasedDisk(physicalDisk.getPath(), devId,
                            diskBusType);
                } else {
                    if (volume.getType() == Volume.Type.DATADISK) {
                        disk.defFileBasedDisk(physicalDisk.getPath(), devId,
                                DiskDef.diskBus.VIRTIO,
View Full Code Here

Examples of com.cloud.hypervisor.kvm.resource.LibvirtVMDef.DiskDef.defBlockBasedDisk()

                            DiskDef.diskBus.VIRTIO, diskProtocol.RBD);
                } else if (attachingDisk.getFormat() == PhysicalDiskFormat.QCOW2) {
                    diskdef.defFileBasedDisk(attachingDisk.getPath(), devId,
                            DiskDef.diskBus.VIRTIO, DiskDef.diskFmtType.QCOW2);
                } else if (attachingDisk.getFormat() == PhysicalDiskFormat.RAW) {
                    diskdef.defBlockBasedDisk(attachingDisk.getPath(), devId,
                            DiskDef.diskBus.VIRTIO);
                }
                if ((bytesReadRate != null) && (bytesReadRate > 0))
                    diskdef.setBytesReadRate(bytesReadRate);
                if ((bytesWriteRate != null) && (bytesWriteRate > 0))
View Full Code Here

Examples of com.cloud.hypervisor.kvm.resource.LibvirtVMDef.DiskDef.defBlockBasedDisk()

                diskdef = new DiskDef();
                if (attachingDisk.getFormat() == PhysicalDiskFormat.QCOW2) {
                    diskdef.defFileBasedDisk(attachingDisk.getPath(), devId,
                            DiskDef.diskBus.VIRTIO, DiskDef.diskFmtType.QCOW2);
                } else if (attachingDisk.getFormat() == PhysicalDiskFormat.RAW) {
                    diskdef.defBlockBasedDisk(attachingDisk.getPath(), devId,
                            DiskDef.diskBus.VIRTIO);
                }
            }

            String xml = diskdef.toString();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.