Examples of defNetworkBasedDisk()


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

                            pool.getUuid(), devId, diskBusType, diskProtocol.RBD, DiskDef.diskFmtType.RAW);
                } else if (pool.getType() == StoragePoolType.Gluster) {
                    String mountpoint = pool.getLocalPath();
                    String path = physicalDisk.getPath();
                    String glusterVolume = pool.getSourceDir().replace("/", "");
                    disk.defNetworkBasedDisk(glusterVolume + path.replace(mountpoint, ""), pool.getSourceHost(), pool.getSourcePort(), null,
                            null, devId, diskBusType, diskProtocol.GLUSTER, DiskDef.diskFmtType.QCOW2);
                } else if (pool.getType() == StoragePoolType.CLVM || physicalDisk.getFormat() == PhysicalDiskFormat.RAW) {
                    disk.defBlockBasedDisk(physicalDisk.getPath(), devId, diskBusType);
                } else {
                    if (volume.getType() == Volume.Type.DATADISK) {
View Full Code Here

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

                    throw new InternalErrorException("disk: " + attachingDisk.getPath() + " is not attached before");
                }
            } else {
                diskdef = new DiskDef();
                if (attachingPool.getType() == StoragePoolType.RBD) {
                    diskdef.defNetworkBasedDisk(attachingDisk.getPath(), attachingPool.getSourceHost(), attachingPool.getSourcePort(), attachingPool.getAuthUserName(),
                            attachingPool.getUuid(), devId, DiskDef.diskBus.VIRTIO, diskProtocol.RBD, DiskDef.diskFmtType.RAW);
                } else if (attachingPool.getType() == StoragePoolType.Gluster) {
                    diskdef.defNetworkBasedDisk(attachingDisk.getPath(), attachingPool.getSourceHost(), attachingPool.getSourcePort(), null,
                            null, devId, DiskDef.diskBus.VIRTIO, diskProtocol.GLUSTER, DiskDef.diskFmtType.QCOW2);
                } else if (attachingDisk.getFormat() == PhysicalDiskFormat.QCOW2) {
View Full Code Here

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

                diskdef = new DiskDef();
                if (attachingPool.getType() == StoragePoolType.RBD) {
                    diskdef.defNetworkBasedDisk(attachingDisk.getPath(), attachingPool.getSourceHost(), attachingPool.getSourcePort(), attachingPool.getAuthUserName(),
                            attachingPool.getUuid(), devId, DiskDef.diskBus.VIRTIO, diskProtocol.RBD, DiskDef.diskFmtType.RAW);
                } else if (attachingPool.getType() == StoragePoolType.Gluster) {
                    diskdef.defNetworkBasedDisk(attachingDisk.getPath(), attachingPool.getSourceHost(), attachingPool.getSourcePort(), null,
                            null, devId, DiskDef.diskBus.VIRTIO, diskProtocol.GLUSTER, DiskDef.diskFmtType.QCOW2);
                } 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);
View Full Code Here

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

                            diskdef.defBlockBasedDisk(device, devId, DiskDef.diskBus.VIRTIO);
                        } else {
                            throw new InternalErrorException("Error while mapping disk "+attachingDisk.getPath()+" on host");
                        }
                    } else {
                        diskdef.defNetworkBasedDisk(attachingDisk.getPath(), attachingPool.getSourceHost(), attachingPool.getSourcePort(), attachingPool.getAuthUserName(),
                                attachingPool.getUuid(), devId, DiskDef.diskBus.VIRTIO, diskProtocol.RBD, DiskDef.diskFmtType.RAW);
                    }
                } else if (attachingPool.getType() == StoragePoolType.Gluster) {
                    String mountpoint = attachingPool.getLocalPath();
                    String path = attachingDisk.getPath();
View Full Code Here

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

                    }
                } else if (attachingPool.getType() == StoragePoolType.Gluster) {
                    String mountpoint = attachingPool.getLocalPath();
                    String path = attachingDisk.getPath();
                    String glusterVolume = attachingPool.getSourceDir().replace("/", "");
                    diskdef.defNetworkBasedDisk(glusterVolume + path.replace(mountpoint, ""), attachingPool.getSourceHost(), attachingPool.getSourcePort(), null,
                        null, devId, DiskDef.diskBus.VIRTIO, diskProtocol.GLUSTER, DiskDef.diskFmtType.QCOW2);
                } 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);
View Full Code Here

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

                    throw new InternalErrorException("disk: " + attachingDisk.getPath() + " is not attached before");
                }
            } else {
                diskdef = new DiskDef();
                if (attachingPool.getType() == StoragePoolType.RBD) {
                    diskdef.defNetworkBasedDisk(attachingDisk.getPath(),
                            attachingPool.getSourceHost(), attachingPool.getSourcePort(),
                            attachingPool.getAuthUserName(), attachingPool.getUuid(), devId,
                            DiskDef.diskBus.VIRTIO, diskProtocol.RBD);
                } else if (attachingDisk.getFormat() == PhysicalDiskFormat.QCOW2) {
                    diskdef.defFileBasedDisk(attachingDisk.getPath(), devId,
View Full Code Here

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

                    /*
                            For RBD pools we use the secret mechanism in libvirt.
                            We store the secret under the UUID of the pool, that's why
                            we pass the pool's UUID as the authSecret
                     */
                    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);
View Full Code Here

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

                            + " is not attached before");
                }
            } else {
                diskdef = new DiskDef();
                if (attachingPool.getType() == StoragePoolType.RBD) {
                    diskdef.defNetworkBasedDisk(attachingDisk.getPath(),
                            attachingPool.getSourceHost(), attachingPool.getSourcePort(),
                            attachingPool.getAuthUserName(), attachingPool.getUuid(), devId,
                            DiskDef.diskBus.VIRTIO, diskProtocol.RBD);
                } else if (attachingDisk.getFormat() == PhysicalDiskFormat.QCOW2) {
                    diskdef.defFileBasedDisk(attachingDisk.getPath(), devId,
View Full Code Here

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

                    /*
                            For RBD pools we use the secret mechanism in libvirt.
                            We store the secret under the UUID of the pool, that's why
                            we pass the pool's UUID as the authSecret
                    */
                    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);
View Full Code Here

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

                    /*
                            For RBD pools we use the secret mechanism in libvirt.
                            We store the secret under the UUID of the pool, that's why
                            we pass the pool's UUID as the authSecret
                     */
                    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);
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.