Documentation ¶
Index ¶
- Variables
- func InitQemuDeployManager(cpuArch, qemuVersion string, enableRemoteExecutor, hugepage bool, ...) error
- type IQemuArchDriver
- type LocalDiskDriver
- func (d *LocalDiskDriver) Connect(desc *apis.GuestDesc) error
- func (d *LocalDiskDriver) DeployGuestfs(req *apis.DeployParams) (res *apis.DeployGuestFsResponse, err error)
- func (d *LocalDiskDriver) DetectIsUEFISupport(rootfs fsdriver.IRootFsDriver) bool
- func (d *LocalDiskDriver) Disconnect() error
- func (d *LocalDiskDriver) FormatFs(req *apis.FormatFsParams) (*apis.Empty, error)
- func (d *LocalDiskDriver) FormatPartition(fs, uuid string, features *apis.FsFeatures) error
- func (d *LocalDiskDriver) GetPartitions() []fsdriver.IDiskPartition
- func (d *LocalDiskDriver) IsLVMPartition() bool
- func (d *LocalDiskDriver) MakePartition(fs string) error
- func (d *LocalDiskDriver) MountRootfs(readonly bool) (fsdriver.IRootFsDriver, error)
- func (d *LocalDiskDriver) ProbeImageInfo(req *apis.ProbeImageInfoPramas) (*apis.ImageInfo, error)
- func (d *LocalDiskDriver) ResizeFs() (*apis.Empty, error)
- func (d *LocalDiskDriver) ResizePartition() error
- func (d *LocalDiskDriver) SaveToGlance(req *apis.SaveToGlanceParams) (*apis.SaveToGlanceResponse, error)
- func (d *LocalDiskDriver) UmountRootfs(fd fsdriver.IRootFsDriver) error
- func (d *LocalDiskDriver) Zerofree()
- type LvNames
- type LvProps
- type QemuARMDriver
- type QemuBaseDriver
- type QemuDeployManager
- func (m *QemuDeployManager) Acquire()
- func (m *QemuDeployManager) GetARMInitrdPath() string
- func (m *QemuDeployManager) GetARMKernelPath() string
- func (m *QemuDeployManager) GetFreePortByBase(basePort int) int
- func (m *QemuDeployManager) GetSshFreePort() int
- func (m *QemuDeployManager) GetX86InitrdPath() string
- func (m *QemuDeployManager) GetX86KernelPath() string
- func (m *QemuDeployManager) Release()
- type QemuKvmDriver
- func (d *QemuKvmDriver) Connect(guestDesc *apis.GuestDesc) error
- func (d *QemuKvmDriver) DeployGuestfs(req *apis.DeployParams) (*apis.DeployGuestFsResponse, error)
- func (d *QemuKvmDriver) DetectIsUEFISupport(rootfs fsdriver.IRootFsDriver) bool
- func (d *QemuKvmDriver) Disconnect() error
- func (d *QemuKvmDriver) FormatFs(req *apis.FormatFsParams) (*apis.Empty, error)
- func (d *QemuKvmDriver) FormatPartition(fs, uuid string, features *apis.FsFeatures) error
- func (d *QemuKvmDriver) GetPartitions() []fsdriver.IDiskPartition
- func (d *QemuKvmDriver) IsLVMPartition() bool
- func (d *QemuKvmDriver) MakePartition(fs string) error
- func (d *QemuKvmDriver) MountRootfs(readonly bool) (fsdriver.IRootFsDriver, error)
- func (d *QemuKvmDriver) ProbeImageInfo(req *apis.ProbeImageInfoPramas) (*apis.ImageInfo, error)
- func (d *QemuKvmDriver) ResizeFs() (*apis.Empty, error)
- func (d *QemuKvmDriver) ResizePartition() error
- func (d *QemuKvmDriver) SaveToGlance(req *apis.SaveToGlanceParams) (*apis.SaveToGlanceResponse, error)
- func (d *QemuKvmDriver) UmountRootfs(fd fsdriver.IRootFsDriver) error
- func (d *QemuKvmDriver) Zerofree()
- type QemuX86Driver
- type VgProps
- type VgReports
Constants ¶
This section is empty.
Variables ¶
View Source
var ( QEMU_KVM_PATH = "/usr/libexec/qemu-kvm" OS_ARCH_AARCH64 = "aarch64" ARM_INITRD_PATH = "/yunionos/aarch64/initramfs" ARM_KERNEL_PATH = "/yunionos/aarch64/kernel" X86_INITRD_PATH = "/yunionos/x86_64/initramfs" X86_KERNEL_PATH = "/yunionos/x86_64/kernel" RUN_ON_HOST_ROOT_PATH = "/opt/cloud/host-deployer" DEPLOY_ISO = "/opt/cloud/host-deployer/host_deployer_v1.iso" // DEPLOYER_BIN = "/opt/yunion/bin/host-deployer --common-config-file /opt/yunion/common.conf --config /opt/yunion/host.conf" DEPLOYER_BIN = "/opt/yunion/bin/host-deployer --config /opt/yunion/host.conf" DEPLOY_PARAMS_FILE = "/deploy_params" YUNIONOS_PASSWD = "mosbaremetal" )
View Source
var BASE_SSH_PORT = 28000
Functions ¶
Types ¶
type IQemuArchDriver ¶
type IQemuArchDriver interface { StartGuest(sshPort, ncpu, memSizeMB int, hugePage bool, pageSizeKB int, imageInfo qemuimg.SImageInfo, disksPath []string) error CleanGuest() }
func NewCpuArchDriver ¶
func NewCpuArchDriver(cpuArch string) IQemuArchDriver
type LocalDiskDriver ¶
type LocalDiskDriver struct {
// contains filtered or unexported fields
}
func NewLocalDiskDriver ¶
func NewLocalDiskDriver() *LocalDiskDriver
func (*LocalDiskDriver) DeployGuestfs ¶
func (d *LocalDiskDriver) DeployGuestfs(req *apis.DeployParams) (res *apis.DeployGuestFsResponse, err error)
func (*LocalDiskDriver) DetectIsUEFISupport ¶
func (d *LocalDiskDriver) DetectIsUEFISupport(rootfs fsdriver.IRootFsDriver) bool
func (*LocalDiskDriver) Disconnect ¶
func (d *LocalDiskDriver) Disconnect() error
func (*LocalDiskDriver) FormatFs ¶
func (d *LocalDiskDriver) FormatFs(req *apis.FormatFsParams) (*apis.Empty, error)
func (*LocalDiskDriver) FormatPartition ¶
func (d *LocalDiskDriver) FormatPartition(fs, uuid string, features *apis.FsFeatures) error
func (*LocalDiskDriver) GetPartitions ¶
func (d *LocalDiskDriver) GetPartitions() []fsdriver.IDiskPartition
func (*LocalDiskDriver) IsLVMPartition ¶
func (d *LocalDiskDriver) IsLVMPartition() bool
func (*LocalDiskDriver) MakePartition ¶
func (d *LocalDiskDriver) MakePartition(fs string) error
func (*LocalDiskDriver) MountRootfs ¶
func (d *LocalDiskDriver) MountRootfs(readonly bool) (fsdriver.IRootFsDriver, error)
func (*LocalDiskDriver) ProbeImageInfo ¶
func (d *LocalDiskDriver) ProbeImageInfo(req *apis.ProbeImageInfoPramas) (*apis.ImageInfo, error)
func (*LocalDiskDriver) ResizePartition ¶
func (d *LocalDiskDriver) ResizePartition() error
func (*LocalDiskDriver) SaveToGlance ¶
func (d *LocalDiskDriver) SaveToGlance(req *apis.SaveToGlanceParams) (*apis.SaveToGlanceResponse, error)
func (*LocalDiskDriver) UmountRootfs ¶
func (d *LocalDiskDriver) UmountRootfs(fd fsdriver.IRootFsDriver) error
func (*LocalDiskDriver) Zerofree ¶
func (d *LocalDiskDriver) Zerofree()
type QemuARMDriver ¶
type QemuARMDriver struct {
QemuBaseDriver
}
func (*QemuARMDriver) StartGuest ¶
func (d *QemuARMDriver) StartGuest(sshPort, ncpu, memSizeMB int, hugePage bool, pageSizeKB int, imageInfo qemuimg.SImageInfo, disksPath []string) error
type QemuBaseDriver ¶
type QemuBaseDriver struct {
// contains filtered or unexported fields
}
func (*QemuBaseDriver) CleanGuest ¶
func (d *QemuBaseDriver) CleanGuest()
type QemuDeployManager ¶
type QemuDeployManager struct {
// contains filtered or unexported fields
}
func (*QemuDeployManager) Acquire ¶
func (m *QemuDeployManager) Acquire()
func (*QemuDeployManager) GetARMInitrdPath ¶
func (m *QemuDeployManager) GetARMInitrdPath() string
func (*QemuDeployManager) GetARMKernelPath ¶
func (m *QemuDeployManager) GetARMKernelPath() string
func (*QemuDeployManager) GetFreePortByBase ¶
func (m *QemuDeployManager) GetFreePortByBase(basePort int) int
func (*QemuDeployManager) GetSshFreePort ¶
func (m *QemuDeployManager) GetSshFreePort() int
func (*QemuDeployManager) GetX86InitrdPath ¶
func (m *QemuDeployManager) GetX86InitrdPath() string
func (*QemuDeployManager) GetX86KernelPath ¶
func (m *QemuDeployManager) GetX86KernelPath() string
func (*QemuDeployManager) Release ¶
func (m *QemuDeployManager) Release()
type QemuKvmDriver ¶
type QemuKvmDriver struct {
// contains filtered or unexported fields
}
func NewQemuKvmDriver ¶
func NewQemuKvmDriver(imageInfo qemuimg.SImageInfo) *QemuKvmDriver
func (*QemuKvmDriver) DeployGuestfs ¶
func (d *QemuKvmDriver) DeployGuestfs(req *apis.DeployParams) (*apis.DeployGuestFsResponse, error)
func (*QemuKvmDriver) DetectIsUEFISupport ¶
func (d *QemuKvmDriver) DetectIsUEFISupport(rootfs fsdriver.IRootFsDriver) bool
func (*QemuKvmDriver) Disconnect ¶
func (d *QemuKvmDriver) Disconnect() error
func (*QemuKvmDriver) FormatFs ¶
func (d *QemuKvmDriver) FormatFs(req *apis.FormatFsParams) (*apis.Empty, error)
func (*QemuKvmDriver) FormatPartition ¶
func (d *QemuKvmDriver) FormatPartition(fs, uuid string, features *apis.FsFeatures) error
func (*QemuKvmDriver) GetPartitions ¶
func (d *QemuKvmDriver) GetPartitions() []fsdriver.IDiskPartition
func (*QemuKvmDriver) IsLVMPartition ¶
func (d *QemuKvmDriver) IsLVMPartition() bool
func (*QemuKvmDriver) MakePartition ¶
func (d *QemuKvmDriver) MakePartition(fs string) error
func (*QemuKvmDriver) MountRootfs ¶
func (d *QemuKvmDriver) MountRootfs(readonly bool) (fsdriver.IRootFsDriver, error)
func (*QemuKvmDriver) ProbeImageInfo ¶
func (d *QemuKvmDriver) ProbeImageInfo(req *apis.ProbeImageInfoPramas) (*apis.ImageInfo, error)
func (*QemuKvmDriver) ResizePartition ¶
func (d *QemuKvmDriver) ResizePartition() error
func (*QemuKvmDriver) SaveToGlance ¶
func (d *QemuKvmDriver) SaveToGlance(req *apis.SaveToGlanceParams) (*apis.SaveToGlanceResponse, error)
func (*QemuKvmDriver) UmountRootfs ¶
func (d *QemuKvmDriver) UmountRootfs(fd fsdriver.IRootFsDriver) error
func (*QemuKvmDriver) Zerofree ¶
func (d *QemuKvmDriver) Zerofree()
type QemuX86Driver ¶
type QemuX86Driver struct {
QemuBaseDriver
}
func (*QemuX86Driver) StartGuest ¶
func (d *QemuX86Driver) StartGuest(sshPort, ncpu, memSizeMB int, hugePage bool, pageSizeKB int, imageInfo qemuimg.SImageInfo, disksPath []string) error
Click to show internal directories.
Click to hide internal directories.