Package com.cloud.hypervisor.kvm.resource.LibvirtVMDef

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


                                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()));
                }
                diskDefs.add(def);
            }
View Full Code Here

        /* 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

                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

                     */
                    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

        /* 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

                            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

                                    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()));
                    }
                }
                diskDefs.add(def);
            }
View Full Code Here

                     */
                    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

        /* 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

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.