Documentation ¶
Index ¶
- Constants
- Variables
- func GetMemorySnapshotPath(serverId, instanceSnapshotId string) string
- func Init(host hostutils.IHost, serversPath string)
- func IsMacInGuestConfig(guestConfig *compute.SImportGuestDesc, mac string) bool
- func Stop()
- type CancelBlockReplication
- type IGuestTasks
- type SBaseParms
- type SCancelBlockJobs
- type SDeleteDiskSnapshot
- type SDestPrepareMigrate
- type SDiskBackup
- type SDiskSnapshot
- type SDriveBackupTask
- type SDriveMirrorTask
- type SDriverMirror
- type SEsxiAccessInfo
- type SGuestBlockIoThrottleTask
- type SGuestBlockReplicationTask
- type SGuestCreateFromEsxi
- type SGuestCreateFromLibvirt
- type SGuestDeploy
- type SGuestDiskSnapshotTask
- type SGuestDiskSyncTask
- type SGuestHotplugCpuMem
- type SGuestHotplugCpuMemTask
- type SGuestIoThrottle
- type SGuestIsolatedDeviceSyncTask
- type SGuestLiveChangeDisk
- type SGuestLiveMigrateTask
- type SGuestManager
- func (m *SGuestManager) Bootstrap() chan struct{}
- func (m *SGuestManager) CPUSet(ctx context.Context, sid string, req *compute.ServerCPUSetInput) (*compute.ServerCPUSetResp, error)
- func (m *SGuestManager) CPUSetRemove(ctx context.Context, sid string) error
- func (m *SGuestManager) CanMigrate(sid string) bool
- func (m *SGuestManager) CancelBlockJobs(ctx context.Context, params interface{}) (jsonutils.JSONObject, error)
- func (m *SGuestManager) CancelBlockReplication(ctx context.Context, params interface{}) (jsonutils.JSONObject, error)
- func (m *SGuestManager) CleanServer(sid string)
- func (m *SGuestManager) ClenaupCpuset()
- func (m *SGuestManager) CloseForward(ctx context.Context, sid string, req *hostapi.GuestCloseForwardRequest) (*hostapi.GuestCloseForwardResponse, error)
- func (m *SGuestManager) CpusetBalance(ctx context.Context, params interface{}) (jsonutils.JSONObject, error)
- func (m *SGuestManager) Delete(sid string) (*SKVMGuestInstance, error)
- func (m *SGuestManager) DeleteSnapshot(ctx context.Context, params interface{}) (jsonutils.JSONObject, error)
- func (m *SGuestManager) DestPrepareMigrate(ctx context.Context, params interface{}) (jsonutils.JSONObject, error)
- func (m *SGuestManager) DoDeleteMemorySnapshot(ctx context.Context, params interface{}) (jsonutils.JSONObject, error)
- func (m *SGuestManager) DoMemorySnapshot(ctx context.Context, params interface{}) (jsonutils.JSONObject, error)
- func (m *SGuestManager) DoResetMemorySnapshot(ctx context.Context, params interface{}) (jsonutils.JSONObject, error)
- func (m *SGuestManager) DoSnapshot(ctx context.Context, params interface{}) (jsonutils.JSONObject, error)
- func (m *SGuestManager) ExitGuestCleanup()
- func (m *SGuestManager) GenerateDescFromXml(libvirtConfig *compute.SLibvirtHostConfig) (jsonutils.JSONObject, error)
- func (m *SGuestManager) GetFreePortByBase(basePort int) int
- func (m *SGuestManager) GetFreeVncPort() int
- func (m *SGuestManager) GetGuestNicDesc(mac, ip, port, bridge string, isCandidate bool) (jsonutils.JSONObject, jsonutils.JSONObject)
- func (m *SGuestManager) GetHost() hostutils.IHost
- func (m *SGuestManager) GetLiveMigrateFreePort() int
- func (m *SGuestManager) GetNBDServerFreePort() int
- func (m *SGuestManager) GetServer(sid string) (*SKVMGuestInstance, bool)
- func (m *SGuestManager) GetUnknownServer(sid string) (*SKVMGuestInstance, bool)
- func (m *SGuestManager) GuestCreate(ctx context.Context, params interface{}) (jsonutils.JSONObject, error)
- func (m *SGuestManager) GuestCreateFromEsxi(ctx context.Context, params interface{}) (jsonutils.JSONObject, error)
- func (m *SGuestManager) GuestCreateFromLibvirt(ctx context.Context, params interface{}) (jsonutils.JSONObject, error)
- func (m *SGuestManager) GuestDeploy(ctx context.Context, params interface{}) (jsonutils.JSONObject, error)
- func (m *SGuestManager) GuestIoThrottle(ctx context.Context, params interface{}) (jsonutils.JSONObject, error)
- func (m *SGuestManager) GuestStart(ctx context.Context, userCred mcclient.TokenCredential, sid string, ...) (jsonutils.JSONObject, error)
- func (m *SGuestManager) GuestStop(ctx context.Context, sid string, timeout int64) error
- func (m *SGuestManager) GuestSuspend(ctx context.Context, params interface{}) (jsonutils.JSONObject, error)
- func (m *SGuestManager) GuestSync(ctx context.Context, params interface{}) (jsonutils.JSONObject, error)
- func (m *SGuestManager) HotplugCpuMem(ctx context.Context, params interface{}) (jsonutils.JSONObject, error)
- func (m *SGuestManager) IsGuestDir(f os.FileInfo) bool
- func (m *SGuestManager) IsGuestExist(sid string) bool
- func (m *SGuestManager) LibvirtDomainDiskToDiskConfig(domainDisks []libvirtxml.DomainDisk) ([]compute.SImportDisk, error)
- func (m *SGuestManager) LibvirtDomainInterfaceToNicConfig(domainInterfaces []libvirtxml.DomainInterface) ([]compute.SImportNic, error)
- func (m *SGuestManager) LibvirtDomainToGuestDesc(domain *libvirtxml.Domain) (*compute.SImportGuestDesc, error)
- func (m *SGuestManager) ListForward(ctx context.Context, sid string, req *hostapi.GuestListForwardRequest) (*hostapi.GuestListForwardResponse, error)
- func (m *SGuestManager) LiveChangeDisk(ctx context.Context, params interface{}) (jsonutils.JSONObject, error)
- func (m *SGuestManager) LiveMigrate(ctx context.Context, params interface{}) (jsonutils.JSONObject, error)
- func (m *SGuestManager) LoadExistingGuests()
- func (m *SGuestManager) LoadServer(sid string)
- func (m *SGuestManager) Monitor(sid, cmd string, qmp bool, callback func(string)) error
- func (m *SGuestManager) OnLoadExistingGuestsComplete()
- func (m *SGuestManager) OnVerifyExistingGuestsFail(err error, pendingDelete bool)
- func (m *SGuestManager) OnVerifyExistingGuestsSucc(servers []jsonutils.JSONObject, pendingDelete bool)
- func (m *SGuestManager) OnlineResizeDisk(ctx context.Context, sid string, diskId string, sizeMb int64) (jsonutils.JSONObject, error)
- func (m *SGuestManager) OpenForward(ctx context.Context, sid string, req *hostapi.GuestOpenForwardRequest) (*hostapi.GuestOpenForwardResponse, error)
- func (m *SGuestManager) PrepareCreate(sid string) error
- func (m *SGuestManager) PrepareDeploy(sid string) error
- func (m *SGuestManager) PrepareImportFromLibvirt(ctx context.Context, params interface{}) (jsonutils.JSONObject, error)
- func (m *SGuestManager) QgaCommand(cmd *monitor.Command, sid string) (string, error)
- func (m *SGuestManager) QgaGuestPing(ctx context.Context, params interface{}) (jsonutils.JSONObject, error)
- func (m *SGuestManager) QgaGuestSetPassword(ctx context.Context, params interface{}) (jsonutils.JSONObject, error)
- func (m *SGuestManager) ReloadDiskSnapshot(ctx context.Context, params interface{}) (jsonutils.JSONObject, error)
- func (m *SGuestManager) RemoveCandidateServer(server *SKVMGuestInstance)
- func (m *SGuestManager) RequestVerifyDirtyServer(s *SKVMGuestInstance)
- func (m *SGuestManager) Resume(ctx context.Context, sid string, isLiveMigrate bool, cleanTLS bool) (jsonutils.JSONObject, error)
- func (m *SGuestManager) SaveServer(sid string, s *SKVMGuestInstance)
- func (m *SGuestManager) ShutdownServers()
- func (m *SGuestManager) SrcPrepareMigrate(ctx context.Context, params interface{}) (jsonutils.JSONObject, error)
- func (m *SGuestManager) StartBlockReplication(ctx context.Context, params interface{}) (jsonutils.JSONObject, error)
- func (m *SGuestManager) StartCpusetBalancer()
- func (m *SGuestManager) Status(sid string) string
- func (m *SGuestManager) StatusWithBlockJobsCount(ctx context.Context, params interface{}) (jsonutils.JSONObject, error)
- func (m *SGuestManager) StorageCloneDisk(ctx context.Context, params interface{}) (jsonutils.JSONObject, error)
- func (m *SGuestManager) VerifyExistingGuests(pendingDelete bool)
- type SGuestNetworkSyncTask
- type SGuestOnlineResizeDiskTask
- type SGuestReloadDiskTask
- type SGuestResumeTask
- type SGuestSnapshotDeleteTask
- type SGuestStopTask
- type SGuestStorageCloneDiskTask
- type SGuestStreamDisksTask
- type SGuestSuspendTask
- type SGuestSyncConfigTaskExecutor
- type SKVMGuestInstance
- func (s *SKVMGuestInstance) BlockIoThrottle(ctx context.Context, bps, iops int64) error
- func (s *SKVMGuestInstance) BlockJobsCount() int
- func (s *SKVMGuestInstance) CPUSet(ctx context.Context, input *api.ServerCPUSetInput) (*api.ServerCPUSetResp, error)
- func (s *SKVMGuestInstance) CPUSetRemove(ctx context.Context) error
- func (s *SKVMGuestInstance) CheckBlockOrRunning(jobs int)
- func (s *SKVMGuestInstance) CleanGuest(ctx context.Context, params interface{}) (jsonutils.JSONObject, error)
- func (s *SKVMGuestInstance) CleanImportMetadata() *jsonutils.JSONDict
- func (s *SKVMGuestInstance) CleanStartupTask()
- func (s *SKVMGuestInstance) CleanStatefiles()
- func (s *SKVMGuestInstance) CleanupCpuset()
- func (s *SKVMGuestInstance) CreateFromDesc(desc jsonutils.JSONObject) error
- func (s *SKVMGuestInstance) Delete(ctx context.Context, migrated bool) error
- func (s *SKVMGuestInstance) DeployFs(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (s *SKVMGuestInstance) DirtyServerRequestStart()
- func (s *SKVMGuestInstance) DiskCount() int
- func (s *SKVMGuestInstance) DoResumeTask(ctx context.Context, isTimeout bool)
- func (s *SKVMGuestInstance) ExecDeleteSnapshotTask(ctx context.Context, disk storageman.IDisk, deleteSnapshot string, ...) (jsonutils.JSONObject, error)
- func (s *SKVMGuestInstance) ExecDiskSnapshotTask(ctx context.Context, userCred mcclient.TokenCredential, disk storageman.IDisk, ...) (jsonutils.JSONObject, error)
- func (s *SKVMGuestInstance) ExecMemorySnapshotResetTask(ctx context.Context, input *hostapi.GuestMemorySnapshotResetRequest) (jsonutils.JSONObject, error)
- func (s *SKVMGuestInstance) ExecMemorySnapshotTask(ctx context.Context, input *hostapi.GuestMemorySnapshotRequest) (jsonutils.JSONObject, error)
- func (s *SKVMGuestInstance) ExecReloadDiskTask(ctx context.Context, disk storageman.IDisk) (jsonutils.JSONObject, error)
- func (s *SKVMGuestInstance) ExecStopTask(ctx context.Context, params interface{}) (jsonutils.JSONObject, error)
- func (s *SKVMGuestInstance) ExecSuspendTask(ctx context.Context)
- func (s *SKVMGuestInstance) ExitCleanup(clear bool)
- func (s *SKVMGuestInstance) ForceStop() bool
- func (s *SKVMGuestInstance) GetCgroupName() string
- func (s *SKVMGuestInstance) GetCleanFiles() []string
- func (s *SKVMGuestInstance) GetDescFilePath() string
- func (s *SKVMGuestInstance) GetDiskAddr(idx int) int
- func (s *SKVMGuestInstance) GetFuseTmpPath() string
- func (s *SKVMGuestInstance) GetHmpMonitorPort(vncPort int) int
- func (s *SKVMGuestInstance) GetId() string
- func (s *SKVMGuestInstance) GetMonitorPath() string
- func (s *SKVMGuestInstance) GetName() string
- func (s *SKVMGuestInstance) GetNeedMergeBackingFileDiskIndexs() []int
- func (s *SKVMGuestInstance) GetNicDescMatch(mac, ip, port, bridge string) jsonutils.JSONObject
- func (s *SKVMGuestInstance) GetPciBus() string
- func (s *SKVMGuestInstance) GetPid() int
- func (s *SKVMGuestInstance) GetPidFilePath() string
- func (s *SKVMGuestInstance) GetQemuVersionStr() string
- func (s *SKVMGuestInstance) GetQmpMonitorPort(vncPort int) int
- func (s *SKVMGuestInstance) GetStartScriptPath() string
- func (s *SKVMGuestInstance) GetStateFilePath(version string) string
- func (s *SKVMGuestInstance) GetStopScriptPath() string
- func (s *SKVMGuestInstance) GetVdiProtocol() string
- func (s *SKVMGuestInstance) GetVncFilePath() string
- func (s *SKVMGuestInstance) GetVncPort() int
- func (s *SKVMGuestInstance) GetVpcNIC() jsonutils.JSONObject
- func (s *SKVMGuestInstance) HomeDir() string
- func (s *SKVMGuestInstance) ImportServer(pendingDelete bool)
- func (s *SKVMGuestInstance) InitQga() error
- func (s *SKVMGuestInstance) IsDaemon() bool
- func (s *SKVMGuestInstance) IsDirtyShotdown() bool
- func (s *SKVMGuestInstance) IsKvmSupport() bool
- func (s *SKVMGuestInstance) IsLoaded() bool
- func (s *SKVMGuestInstance) IsMaster() bool
- func (s *SKVMGuestInstance) IsMigratingDestGuest() bool
- func (s *SKVMGuestInstance) IsMonitorAlive() bool
- func (s *SKVMGuestInstance) IsRunning() bool
- func (s *SKVMGuestInstance) IsSharedStorage() bool
- func (s *SKVMGuestInstance) IsSlave() bool
- func (s *SKVMGuestInstance) IsStopped() bool
- func (s *SKVMGuestInstance) IsStopping() bool
- func (s *SKVMGuestInstance) IsSuspend() bool
- func (s *SKVMGuestInstance) IsValid() bool
- func (s *SKVMGuestInstance) IsVdiSpice() bool
- func (s *SKVMGuestInstance) ListStateFilePaths() []string
- func (s *SKVMGuestInstance) LoadDesc() error
- func (s *SKVMGuestInstance) OnResumeSyncMetadataInfo()
- func (s *SKVMGuestInstance) PrepareDir() error
- func (s *SKVMGuestInstance) PrepareDisksMigrate(liveMigrage bool) (*jsonutils.JSONDict, error)
- func (s *SKVMGuestInstance) PrepareMigrateCerts() (map[string]string, error)
- func (s *SKVMGuestInstance) QgaPath() string
- func (s *SKVMGuestInstance) SaveDesc(desc jsonutils.JSONObject) error
- func (s *SKVMGuestInstance) SetCgroup()
- func (s *SKVMGuestInstance) SetVncPassword()
- func (s *SKVMGuestInstance) SlaveDisksBlockStream() error
- func (s *SKVMGuestInstance) StartDelete(ctx context.Context, migrated bool) error
- func (s *SKVMGuestInstance) StartGuest(ctx context.Context, userCred mcclient.TokenCredential, ...) error
- func (s *SKVMGuestInstance) StartMonitor(ctx context.Context, cb func())
- func (s *SKVMGuestInstance) StartMonitorWithImportGuestSocketFile(ctx context.Context, socketFile string, cb func())
- func (s *SKVMGuestInstance) StartPresendArp()
- func (s *SKVMGuestInstance) StaticSaveSnapshot(ctx context.Context, disk storageman.IDisk, snapshotId string, ...) (jsonutils.JSONObject, error)
- func (s *SKVMGuestInstance) Stop() bool
- func (s *SKVMGuestInstance) StreamDisks(ctx context.Context, callback func(), disksIdx []int)
- func (s *SKVMGuestInstance) SyncConfig(ctx context.Context, desc jsonutils.JSONObject, fwOnly bool) (jsonutils.JSONObject, error)
- func (s *SKVMGuestInstance) SyncMetadata(meta *jsonutils.JSONDict) error
- func (s *SKVMGuestInstance) SyncMirrorJobFailed(reason string)
- func (s *SKVMGuestInstance) SyncQemuCmdline(cmdline string)
- func (s *SKVMGuestInstance) SyncStatus(reason string)
- func (s *SKVMGuestInstance) WriteMigrateCerts(certs map[string]string) error
- type SLibvirtDomainImportConfig
- type SLibvirtServer
- type SLiveMigrate
- type SMemorySnapshot
- type SMemorySnapshotDelete
- type SMemorySnapshotReset
- type SQgaGuestSetPassword
- type SReloadDisk
- type SSrcPrepareMigrate
- type SStorageCloneDisk
Constants ¶
View Source
const ( QGA_LOCK_TIMEOUT = time.Second * 5 QGA_EXEC_TIMEOUT = time.Second * 10 )
View Source
const ( VNC_PORT_BASE = 5900 GUEST_RUNNING = compute.VM_RUNNING GUEST_BLOCK_STREAM = compute.VM_BLOCK_STREAM GUEST_BLOCK_STREAM_FAIL = compute.VM_BLOCK_STREAM_FAIL GUEST_SUSPEND = compute.VM_SUSPEND GUSET_STOPPED = "stopped" GUEST_NOT_FOUND = "notfound" )
View Source
const ( STATE_FILE_PREFIX = "STATEFILE" MONITOR_PORT_BASE = 55900 LIVE_MIGRATE_PORT_BASE = 4396 BUILT_IN_NBD_SERVER_PORT_BASE = 7777 MAX_TRY = 3 )
View Source
const ( OS_NAME_LINUX = qemu.OS_NAME_LINUX OS_NAME_WINDOWS = qemu.OS_NAME_WINDOWS OS_NAME_MACOS = qemu.OS_NAME_MACOS OS_NAME_ANDROID = qemu.OS_NAME_ANDROID OS_NAME_VMWARE = qemu.OS_NAME_VMWARE OS_NAME_CIRROS = qemu.OS_NAME_CIRROS OS_NAME_OPENWRT = qemu.OS_NAME_OPENWRT MODE_READLINE = qemu.MODE_READLINE MODE_CONTROL = qemu.MODE_CONTROL DISK_DRIVER_VIRTIO = qemu.DISK_DRIVER_VIRTIO DISK_DRIVER_SCSI = qemu.DISK_DRIVER_SCSI DISK_DRIVER_PVSCSI = qemu.DISK_DRIVER_PVSCSI DISK_DRIVER_IDE = qemu.DISK_DRIVER_IDE DISK_DRIVER_SATA = qemu.DISK_DRIVER_SATA )
Variables ¶
View Source
var ( LAST_USED_PORT = 0 LAST_USED_NBD_SERVER_PORT = 0 LAST_USED_MIGRATE_PORT = 0 NbdWorker = appsrv.NewWorkerManager("nbd_worker", 1, appsrv.DEFAULT_BACKLOG, false) )
Functions ¶
func GetMemorySnapshotPath ¶
func IsMacInGuestConfig ¶
func IsMacInGuestConfig(guestConfig *compute.SImportGuestDesc, mac string) bool
Types ¶
type CancelBlockReplication ¶
type CancelBlockReplication struct {
SCancelBlockJobs
}
func NewCancelBlockReplicationTask ¶
func NewCancelBlockReplicationTask(ctx context.Context, guest *SKVMGuestInstance) *CancelBlockReplication
func (*CancelBlockReplication) Start ¶
func (task *CancelBlockReplication) Start()
type IGuestTasks ¶
type IGuestTasks interface {
Start(func(...error))
}
type SBaseParms ¶
type SBaseParms struct { Sid string Body jsonutils.JSONObject }
type SCancelBlockJobs ¶
type SCancelBlockJobs struct { *SKVMGuestInstance // contains filtered or unexported fields }
func NewCancelBlockJobsTask ¶
func NewCancelBlockJobsTask(ctx context.Context, guest *SKVMGuestInstance) *SCancelBlockJobs
func (*SCancelBlockJobs) Start ¶
func (task *SCancelBlockJobs) Start()
func (*SCancelBlockJobs) StartCancelBlockJobs ¶
func (task *SCancelBlockJobs) StartCancelBlockJobs(drivers []string)
type SDeleteDiskSnapshot ¶
type SDestPrepareMigrate ¶
type SDestPrepareMigrate struct { Sid string ServerUrl string QemuVersion string SourceQemuCmdline string NoMemDev bool ScsiNumQueues int64 NicsPciSlot *jsonutils.JSONDict MigrateCerts map[string]string EnableTLS bool SnapshotsUri string DisksUri string // TargetStorageId string TargetStorageIds []string LiveMigrate bool RebaseDisks bool Desc jsonutils.JSONObject DisksBackingFile jsonutils.JSONObject SrcSnapshots jsonutils.JSONObject MemorySnapshotsUri string SrcMemorySnapshots []string UserCred mcclient.TokenCredential }
type SDiskBackup ¶
type SDiskBackup struct { Sid string SnapshotId string BackupId string Disk storageman.IDisk }
type SDiskSnapshot ¶
type SDiskSnapshot struct { UserCred mcclient.TokenCredential Sid string SnapshotId string Disk storageman.IDisk }
type SDriveBackupTask ¶
type SDriveBackupTask struct { *SKVMGuestInstance // contains filtered or unexported fields }
func NewDriveBackupTask ¶
func NewDriveBackupTask( ctx context.Context, s *SKVMGuestInstance, nbdUri, syncMode string, onSucc func(), ) *SDriveBackupTask
func (*SDriveBackupTask) Start ¶
func (s *SDriveBackupTask) Start()
type SDriveMirrorTask ¶
type SDriveMirrorTask struct { *SKVMGuestInstance // contains filtered or unexported fields }
func NewDriveMirrorTask ¶
func NewDriveMirrorTask( ctx context.Context, s *SKVMGuestInstance, nbdUri, syncMode string, blockReplication bool, onSucc func(), ) *SDriveMirrorTask
func (*SDriveMirrorTask) Start ¶
func (s *SDriveMirrorTask) Start()
type SDriverMirror ¶
type SDriverMirror struct { Sid string NbdServerUri string Desc jsonutils.JSONObject }
type SEsxiAccessInfo ¶
type SEsxiAccessInfo struct { Datastore vcenter.SVCenterAccessInfo HostIp string GuestExtId string }
type SGuestBlockIoThrottleTask ¶
type SGuestBlockIoThrottleTask struct { *SKVMGuestInstance // contains filtered or unexported fields }
func (*SGuestBlockIoThrottleTask) Start ¶
func (task *SGuestBlockIoThrottleTask) Start() error
type SGuestBlockReplicationTask ¶
type SGuestBlockReplicationTask struct { *SKVMGuestInstance // contains filtered or unexported fields }
func NewGuestBlockReplicationTask ¶
func NewGuestBlockReplicationTask( ctx context.Context, s *SKVMGuestInstance, nbdHost, nbdPort, syncMode string, onSucc func(), onFail func(string), ) *SGuestBlockReplicationTask
func (*SGuestBlockReplicationTask) Start ¶
func (s *SGuestBlockReplicationTask) Start()
type SGuestCreateFromEsxi ¶
type SGuestCreateFromEsxi struct { Sid string GuestDesc *jsonutils.JSONDict EsxiAccessInfo SEsxiAccessInfo }
type SGuestCreateFromLibvirt ¶
type SGuestDeploy ¶
type SGuestDeploy struct { UserCred mcclient.TokenCredential Sid string Body jsonutils.JSONObject IsInit bool }
type SGuestDiskSnapshotTask ¶
type SGuestDiskSnapshotTask struct { *SGuestReloadDiskTask // contains filtered or unexported fields }
func NewGuestDiskSnapshotTask ¶
func NewGuestDiskSnapshotTask( ctx context.Context, s *SKVMGuestInstance, disk storageman.IDisk, snapshotId string, ) *SGuestDiskSnapshotTask
func (*SGuestDiskSnapshotTask) Start ¶
func (s *SGuestDiskSnapshotTask) Start()
type SGuestDiskSyncTask ¶
type SGuestDiskSyncTask struct {
// contains filtered or unexported fields
}
func NewGuestDiskSyncTask ¶
func NewGuestDiskSyncTask(guest *SKVMGuestInstance, delDisks, addDisks []jsonutils.JSONObject, cdrom *string) *SGuestDiskSyncTask
func (*SGuestDiskSyncTask) OnChangeCdromContentSucc ¶
func (d *SGuestDiskSyncTask) OnChangeCdromContentSucc(results string)
func (*SGuestDiskSyncTask) Start ¶
func (d *SGuestDiskSyncTask) Start(callback func(...error))
type SGuestHotplugCpuMem ¶
type SGuestHotplugCpuMemTask ¶
type SGuestHotplugCpuMemTask struct { *SKVMGuestInstance // contains filtered or unexported fields }
func NewGuestHotplugCpuMemTask ¶
func NewGuestHotplugCpuMemTask( ctx context.Context, s *SKVMGuestInstance, addCpuCount, addMemSize int, ) *SGuestHotplugCpuMemTask
func (*SGuestHotplugCpuMemTask) Start ¶
func (task *SGuestHotplugCpuMemTask) Start()
First at all add cpu count, second add mem size
type SGuestIoThrottle ¶
type SGuestIsolatedDeviceSyncTask ¶
type SGuestIsolatedDeviceSyncTask struct {
// contains filtered or unexported fields
}
func NewGuestIsolatedDeviceSyncTask ¶
func NewGuestIsolatedDeviceSyncTask(guest *SKVMGuestInstance, delDevs, addDevs []jsonutils.JSONObject) *SGuestIsolatedDeviceSyncTask
func (*SGuestIsolatedDeviceSyncTask) Start ¶
func (t *SGuestIsolatedDeviceSyncTask) Start(cb func(...error))
type SGuestLiveChangeDisk ¶
type SGuestLiveChangeDisk struct { *SKVMGuestInstance // contains filtered or unexported fields }
func NewGuestLiveChangeDiskTask ¶
func NewGuestLiveChangeDiskTask(ctx context.Context, guest *SKVMGuestInstance, params *SStorageCloneDisk) (*SGuestLiveChangeDisk, error)
func (*SGuestLiveChangeDisk) Start ¶
func (t *SGuestLiveChangeDisk) Start()
type SGuestLiveMigrateTask ¶
type SGuestLiveMigrateTask struct { *SKVMGuestInstance // contains filtered or unexported fields }
func NewGuestLiveMigrateTask ¶
func NewGuestLiveMigrateTask( ctx context.Context, guest *SKVMGuestInstance, params *SLiveMigrate, ) *SGuestLiveMigrateTask
func (*SGuestLiveMigrateTask) Start ¶
func (s *SGuestLiveMigrateTask) Start()
type SGuestManager ¶
type SGuestManager struct { ServersPath string Servers *sync.Map CandidateServers map[string]*SKVMGuestInstance UnknownServers *sync.Map ServersLock *sync.Mutex GuestStartWorker *appsrv.SWorkerManager // contains filtered or unexported fields }
func GetGuestManager ¶
func GetGuestManager() *SGuestManager
func NewGuestManager ¶
func NewGuestManager(host hostutils.IHost, serversPath string) *SGuestManager
func (*SGuestManager) Bootstrap ¶
func (m *SGuestManager) Bootstrap() chan struct{}
func (*SGuestManager) CPUSet ¶
func (m *SGuestManager) CPUSet(ctx context.Context, sid string, req *compute.ServerCPUSetInput) (*compute.ServerCPUSetResp, error)
func (*SGuestManager) CPUSetRemove ¶
func (m *SGuestManager) CPUSetRemove(ctx context.Context, sid string) error
func (*SGuestManager) CanMigrate ¶
func (m *SGuestManager) CanMigrate(sid string) bool
func (*SGuestManager) CancelBlockJobs ¶
func (m *SGuestManager) CancelBlockJobs(ctx context.Context, params interface{}) (jsonutils.JSONObject, error)
func (*SGuestManager) CancelBlockReplication ¶
func (m *SGuestManager) CancelBlockReplication(ctx context.Context, params interface{}) (jsonutils.JSONObject, error)
func (*SGuestManager) CleanServer ¶
func (m *SGuestManager) CleanServer(sid string)
func (*SGuestManager) ClenaupCpuset ¶
func (m *SGuestManager) ClenaupCpuset()
func (*SGuestManager) CloseForward ¶
func (m *SGuestManager) CloseForward(ctx context.Context, sid string, req *hostapi.GuestCloseForwardRequest) (*hostapi.GuestCloseForwardResponse, error)
func (*SGuestManager) CpusetBalance ¶
func (m *SGuestManager) CpusetBalance(ctx context.Context, params interface{}) (jsonutils.JSONObject, error)
delay cpuset balance
func (*SGuestManager) Delete ¶
func (m *SGuestManager) Delete(sid string) (*SKVMGuestInstance, error)
func (*SGuestManager) DeleteSnapshot ¶
func (m *SGuestManager) DeleteSnapshot(ctx context.Context, params interface{}) (jsonutils.JSONObject, error)
func (*SGuestManager) DestPrepareMigrate ¶
func (m *SGuestManager) DestPrepareMigrate(ctx context.Context, params interface{}) (jsonutils.JSONObject, error)
func (*SGuestManager) DoDeleteMemorySnapshot ¶
func (m *SGuestManager) DoDeleteMemorySnapshot(ctx context.Context, params interface{}) (jsonutils.JSONObject, error)
func (*SGuestManager) DoMemorySnapshot ¶
func (m *SGuestManager) DoMemorySnapshot(ctx context.Context, params interface{}) (jsonutils.JSONObject, error)
func (*SGuestManager) DoResetMemorySnapshot ¶
func (m *SGuestManager) DoResetMemorySnapshot(ctx context.Context, params interface{}) (jsonutils.JSONObject, error)
func (*SGuestManager) DoSnapshot ¶
func (m *SGuestManager) DoSnapshot(ctx context.Context, params interface{}) (jsonutils.JSONObject, error)
func (*SGuestManager) ExitGuestCleanup ¶
func (m *SGuestManager) ExitGuestCleanup()
func (*SGuestManager) GenerateDescFromXml ¶
func (m *SGuestManager) GenerateDescFromXml(libvirtConfig *compute.SLibvirtHostConfig) (jsonutils.JSONObject, error)
func (*SGuestManager) GetFreePortByBase ¶
func (m *SGuestManager) GetFreePortByBase(basePort int) int
func (*SGuestManager) GetFreeVncPort ¶
func (m *SGuestManager) GetFreeVncPort() int
func (*SGuestManager) GetGuestNicDesc ¶
func (m *SGuestManager) GetGuestNicDesc(mac, ip, port, bridge string, isCandidate bool) (jsonutils.JSONObject, jsonutils.JSONObject)
func (*SGuestManager) GetHost ¶
func (m *SGuestManager) GetHost() hostutils.IHost
func (*SGuestManager) GetLiveMigrateFreePort ¶
func (m *SGuestManager) GetLiveMigrateFreePort() int
func (*SGuestManager) GetNBDServerFreePort ¶
func (m *SGuestManager) GetNBDServerFreePort() int
func (*SGuestManager) GetServer ¶
func (m *SGuestManager) GetServer(sid string) (*SKVMGuestInstance, bool)
func (*SGuestManager) GetUnknownServer ¶
func (m *SGuestManager) GetUnknownServer(sid string) (*SKVMGuestInstance, bool)
func (*SGuestManager) GuestCreate ¶
func (m *SGuestManager) GuestCreate(ctx context.Context, params interface{}) (jsonutils.JSONObject, error)
func (*SGuestManager) GuestCreateFromEsxi ¶
func (m *SGuestManager) GuestCreateFromEsxi( ctx context.Context, params interface{}, ) (jsonutils.JSONObject, error)
func (*SGuestManager) GuestCreateFromLibvirt ¶
func (m *SGuestManager) GuestCreateFromLibvirt( ctx context.Context, params interface{}, ) (jsonutils.JSONObject, error)
func (*SGuestManager) GuestDeploy ¶
func (m *SGuestManager) GuestDeploy(ctx context.Context, params interface{}) (jsonutils.JSONObject, error)
Delay process
func (*SGuestManager) GuestIoThrottle ¶
func (m *SGuestManager) GuestIoThrottle(ctx context.Context, params interface{}) (jsonutils.JSONObject, error)
func (*SGuestManager) GuestStart ¶
func (m *SGuestManager) GuestStart(ctx context.Context, userCred mcclient.TokenCredential, sid string, body jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SGuestManager) GuestSuspend ¶
func (m *SGuestManager) GuestSuspend(ctx context.Context, params interface{}) (jsonutils.JSONObject, error)
func (*SGuestManager) GuestSync ¶
func (m *SGuestManager) GuestSync(ctx context.Context, params interface{}) (jsonutils.JSONObject, error)
func (*SGuestManager) HotplugCpuMem ¶
func (m *SGuestManager) HotplugCpuMem(ctx context.Context, params interface{}) (jsonutils.JSONObject, error)
func (*SGuestManager) IsGuestDir ¶
func (m *SGuestManager) IsGuestDir(f os.FileInfo) bool
func (*SGuestManager) IsGuestExist ¶
func (m *SGuestManager) IsGuestExist(sid string) bool
func (*SGuestManager) LibvirtDomainDiskToDiskConfig ¶
func (m *SGuestManager) LibvirtDomainDiskToDiskConfig( domainDisks []libvirtxml.DomainDisk) ([]compute.SImportDisk, error)
func (*SGuestManager) LibvirtDomainInterfaceToNicConfig ¶
func (m *SGuestManager) LibvirtDomainInterfaceToNicConfig( domainInterfaces []libvirtxml.DomainInterface) ([]compute.SImportNic, error)
func (*SGuestManager) LibvirtDomainToGuestDesc ¶
func (m *SGuestManager) LibvirtDomainToGuestDesc(domain *libvirtxml.Domain) (*compute.SImportGuestDesc, error)
Read key infomation from domain xml
func (*SGuestManager) ListForward ¶
func (m *SGuestManager) ListForward(ctx context.Context, sid string, req *hostapi.GuestListForwardRequest) (*hostapi.GuestListForwardResponse, error)
func (*SGuestManager) LiveChangeDisk ¶
func (m *SGuestManager) LiveChangeDisk(ctx context.Context, params interface{}) (jsonutils.JSONObject, error)
func (*SGuestManager) LiveMigrate ¶
func (m *SGuestManager) LiveMigrate(ctx context.Context, params interface{}) (jsonutils.JSONObject, error)
func (*SGuestManager) LoadExistingGuests ¶
func (m *SGuestManager) LoadExistingGuests()
func (*SGuestManager) LoadServer ¶
func (m *SGuestManager) LoadServer(sid string)
func (*SGuestManager) Monitor ¶
func (m *SGuestManager) Monitor(sid, cmd string, qmp bool, callback func(string)) error
func (*SGuestManager) OnLoadExistingGuestsComplete ¶
func (m *SGuestManager) OnLoadExistingGuestsComplete()
func (*SGuestManager) OnVerifyExistingGuestsFail ¶
func (m *SGuestManager) OnVerifyExistingGuestsFail(err error, pendingDelete bool)
func (*SGuestManager) OnVerifyExistingGuestsSucc ¶
func (m *SGuestManager) OnVerifyExistingGuestsSucc(servers []jsonutils.JSONObject, pendingDelete bool)
func (*SGuestManager) OnlineResizeDisk ¶
func (m *SGuestManager) OnlineResizeDisk(ctx context.Context, sid string, diskId string, sizeMb int64) (jsonutils.JSONObject, error)
func (*SGuestManager) OpenForward ¶
func (m *SGuestManager) OpenForward(ctx context.Context, sid string, req *hostapi.GuestOpenForwardRequest) (*hostapi.GuestOpenForwardResponse, error)
func (*SGuestManager) PrepareCreate ¶
func (m *SGuestManager) PrepareCreate(sid string) error
func (*SGuestManager) PrepareDeploy ¶
func (m *SGuestManager) PrepareDeploy(sid string) error
func (*SGuestManager) PrepareImportFromLibvirt ¶
func (m *SGuestManager) PrepareImportFromLibvirt( ctx context.Context, params interface{}, ) (jsonutils.JSONObject, error)
func (*SGuestManager) QgaCommand ¶
func (*SGuestManager) QgaGuestPing ¶
func (m *SGuestManager) QgaGuestPing(ctx context.Context, params interface{}) (jsonutils.JSONObject, error)
func (*SGuestManager) QgaGuestSetPassword ¶
func (m *SGuestManager) QgaGuestSetPassword(ctx context.Context, params interface{}) (jsonutils.JSONObject, error)
func (*SGuestManager) ReloadDiskSnapshot ¶
func (m *SGuestManager) ReloadDiskSnapshot( ctx context.Context, params interface{}, ) (jsonutils.JSONObject, error)
func (*SGuestManager) RemoveCandidateServer ¶
func (m *SGuestManager) RemoveCandidateServer(server *SKVMGuestInstance)
func (*SGuestManager) RequestVerifyDirtyServer ¶
func (m *SGuestManager) RequestVerifyDirtyServer(s *SKVMGuestInstance)
func (*SGuestManager) Resume ¶
func (m *SGuestManager) Resume(ctx context.Context, sid string, isLiveMigrate bool, cleanTLS bool) (jsonutils.JSONObject, error)
func (*SGuestManager) SaveServer ¶
func (m *SGuestManager) SaveServer(sid string, s *SKVMGuestInstance)
func (*SGuestManager) ShutdownServers ¶
func (m *SGuestManager) ShutdownServers()
func (*SGuestManager) SrcPrepareMigrate ¶
func (m *SGuestManager) SrcPrepareMigrate(ctx context.Context, params interface{}) (jsonutils.JSONObject, error)
func (*SGuestManager) StartBlockReplication ¶
func (m *SGuestManager) StartBlockReplication(ctx context.Context, params interface{}) (jsonutils.JSONObject, error)
func (*SGuestManager) StartCpusetBalancer ¶
func (m *SGuestManager) StartCpusetBalancer()
func (*SGuestManager) Status ¶
func (m *SGuestManager) Status(sid string) string
func (*SGuestManager) StatusWithBlockJobsCount ¶
func (m *SGuestManager) StatusWithBlockJobsCount(ctx context.Context, params interface{}) (jsonutils.JSONObject, error)
func (*SGuestManager) StorageCloneDisk ¶
func (m *SGuestManager) StorageCloneDisk(ctx context.Context, params interface{}) (jsonutils.JSONObject, error)
func (*SGuestManager) VerifyExistingGuests ¶
func (m *SGuestManager) VerifyExistingGuests(pendingDelete bool)
type SGuestNetworkSyncTask ¶
type SGuestNetworkSyncTask struct {
// contains filtered or unexported fields
}
func NewGuestNetworkSyncTask ¶
func NewGuestNetworkSyncTask(guest *SKVMGuestInstance, delNics, addNics []jsonutils.JSONObject) *SGuestNetworkSyncTask
func (*SGuestNetworkSyncTask) Start ¶
func (n *SGuestNetworkSyncTask) Start(callback func(...error))
type SGuestOnlineResizeDiskTask ¶
type SGuestOnlineResizeDiskTask struct { *SKVMGuestInstance // contains filtered or unexported fields }
func NewGuestOnlineResizeDiskTask ¶
func NewGuestOnlineResizeDiskTask( ctx context.Context, s *SKVMGuestInstance, diskId string, sizeMB int64, ) *SGuestOnlineResizeDiskTask
func (*SGuestOnlineResizeDiskTask) OnGetBlocksSucc ¶
func (task *SGuestOnlineResizeDiskTask) OnGetBlocksSucc(blocks []monitor.QemuBlock)
func (*SGuestOnlineResizeDiskTask) OnResizeSucc ¶
func (task *SGuestOnlineResizeDiskTask) OnResizeSucc(err string)
func (*SGuestOnlineResizeDiskTask) Start ¶
func (task *SGuestOnlineResizeDiskTask) Start()
type SGuestReloadDiskTask ¶
type SGuestReloadDiskTask struct { *SKVMGuestInstance // contains filtered or unexported fields }
func NewGuestReloadDiskTask ¶
func NewGuestReloadDiskTask( ctx context.Context, s *SKVMGuestInstance, disk storageman.IDisk, ) *SGuestReloadDiskTask
func (*SGuestReloadDiskTask) Start ¶
func (s *SGuestReloadDiskTask) Start()
func (*SGuestReloadDiskTask) WaitSnapshotReplaced ¶
func (s *SGuestReloadDiskTask) WaitSnapshotReplaced(callback func()) error
type SGuestResumeTask ¶
type SGuestResumeTask struct { *SKVMGuestInstance // contains filtered or unexported fields }
func NewGuestResumeTask ¶
func NewGuestResumeTask(ctx context.Context, s *SKVMGuestInstance, isTimeout bool, cleanTLS bool) *SGuestResumeTask
func (*SGuestResumeTask) GetStateFilePath ¶
func (s *SGuestResumeTask) GetStateFilePath() string
func (*SGuestResumeTask) SetGetTaskData ¶
func (s *SGuestResumeTask) SetGetTaskData(f func() (jsonutils.JSONObject, error))
func (*SGuestResumeTask) Start ¶
func (s *SGuestResumeTask) Start()
func (*SGuestResumeTask) Stop ¶
func (s *SGuestResumeTask) Stop()
type SGuestSnapshotDeleteTask ¶
type SGuestSnapshotDeleteTask struct { *SGuestReloadDiskTask // contains filtered or unexported fields }
func NewGuestSnapshotDeleteTask ¶
func NewGuestSnapshotDeleteTask( ctx context.Context, s *SKVMGuestInstance, disk storageman.IDisk, deleteSnapshot, convertSnapshot string, pendingDelete bool, ) *SGuestSnapshotDeleteTask
func (*SGuestSnapshotDeleteTask) Start ¶
func (s *SGuestSnapshotDeleteTask) Start()
type SGuestStopTask ¶
type SGuestStopTask struct { *SKVMGuestInstance // contains filtered or unexported fields }
func NewGuestStopTask ¶
func NewGuestStopTask(guest *SKVMGuestInstance, ctx context.Context, timeout int64) *SGuestStopTask
func (*SGuestStopTask) CheckGuestRunningLater ¶
func (s *SGuestStopTask) CheckGuestRunningLater()
func (*SGuestStopTask) Start ¶
func (s *SGuestStopTask) Start()
type SGuestStorageCloneDiskTask ¶
type SGuestStorageCloneDiskTask struct { *SKVMGuestInstance // contains filtered or unexported fields }
func NewGuestStorageCloneDiskTask ¶
func NewGuestStorageCloneDiskTask(ctx context.Context, guest *SKVMGuestInstance, params *SStorageCloneDisk) *SGuestStorageCloneDiskTask
func (*SGuestStorageCloneDiskTask) Start ¶
func (t *SGuestStorageCloneDiskTask) Start(guestRunning bool)
type SGuestStreamDisksTask ¶
type SGuestStreamDisksTask struct { *SKVMGuestInstance // contains filtered or unexported fields }
func NewGuestStreamDisksTask ¶
func NewGuestStreamDisksTask(ctx context.Context, guest *SKVMGuestInstance, callback func(), disksIdx []int) *SGuestStreamDisksTask
func (*SGuestStreamDisksTask) Start ¶
func (s *SGuestStreamDisksTask) Start()
type SGuestSuspendTask ¶
type SGuestSuspendTask struct { *SKVMGuestInstance // contains filtered or unexported fields }
func NewGuestSuspendTask ¶
func NewGuestSuspendTask( guest *SKVMGuestInstance, ctx context.Context, onFinishCallback func(*SGuestSuspendTask, string), ) *SGuestSuspendTask
func (*SGuestSuspendTask) GetStateFilePath ¶
func (s *SGuestSuspendTask) GetStateFilePath() string
func (*SGuestSuspendTask) Start ¶
func (s *SGuestSuspendTask) Start()
type SGuestSyncConfigTaskExecutor ¶
type SGuestSyncConfigTaskExecutor struct {
// contains filtered or unexported fields
}
func NewGuestSyncConfigTaskExecutor ¶
func NewGuestSyncConfigTaskExecutor(ctx context.Context, guest *SKVMGuestInstance, tasks []IGuestTasks, callback func([]error)) *SGuestSyncConfigTaskExecutor
func (*SGuestSyncConfigTaskExecutor) Start ¶
func (t *SGuestSyncConfigTaskExecutor) Start(delay int)
type SKVMGuestInstance ¶
type SKVMGuestInstance struct { Id string QemuVersion string VncPassword string Desc *jsonutils.JSONDict Monitor monitor.Monitor // contains filtered or unexported fields }
func NewKVMGuestInstance ¶
func NewKVMGuestInstance(id string, manager *SGuestManager) *SKVMGuestInstance
func (*SKVMGuestInstance) BlockIoThrottle ¶
func (s *SKVMGuestInstance) BlockIoThrottle(ctx context.Context, bps, iops int64) error
func (*SKVMGuestInstance) BlockJobsCount ¶
func (s *SKVMGuestInstance) BlockJobsCount() int
func (*SKVMGuestInstance) CPUSet ¶
func (s *SKVMGuestInstance) CPUSet(ctx context.Context, input *api.ServerCPUSetInput) (*api.ServerCPUSetResp, error)
func (*SKVMGuestInstance) CPUSetRemove ¶
func (s *SKVMGuestInstance) CPUSetRemove(ctx context.Context) error
func (*SKVMGuestInstance) CheckBlockOrRunning ¶
func (s *SKVMGuestInstance) CheckBlockOrRunning(jobs int)
func (*SKVMGuestInstance) CleanGuest ¶
func (s *SKVMGuestInstance) CleanGuest(ctx context.Context, params interface{}) (jsonutils.JSONObject, error)
Delay process
func (*SKVMGuestInstance) CleanImportMetadata ¶
func (s *SKVMGuestInstance) CleanImportMetadata() *jsonutils.JSONDict
func (*SKVMGuestInstance) CleanStartupTask ¶
func (s *SKVMGuestInstance) CleanStartupTask()
func (*SKVMGuestInstance) CleanStatefiles ¶
func (s *SKVMGuestInstance) CleanStatefiles()
func (*SKVMGuestInstance) CleanupCpuset ¶
func (s *SKVMGuestInstance) CleanupCpuset()
func (*SKVMGuestInstance) CreateFromDesc ¶
func (s *SKVMGuestInstance) CreateFromDesc(desc jsonutils.JSONObject) error
func (*SKVMGuestInstance) Delete ¶
func (s *SKVMGuestInstance) Delete(ctx context.Context, migrated bool) error
func (*SKVMGuestInstance) DeployFs ¶
func (s *SKVMGuestInstance) DeployFs(ctx context.Context, userCred mcclient.TokenCredential, deployInfo *deployapi.DeployInfo) (jsonutils.JSONObject, error)
func (*SKVMGuestInstance) DirtyServerRequestStart ¶
func (s *SKVMGuestInstance) DirtyServerRequestStart()
func (*SKVMGuestInstance) DiskCount ¶
func (s *SKVMGuestInstance) DiskCount() int
func (*SKVMGuestInstance) DoResumeTask ¶
func (s *SKVMGuestInstance) DoResumeTask(ctx context.Context, isTimeout bool)
func (*SKVMGuestInstance) ExecDeleteSnapshotTask ¶
func (s *SKVMGuestInstance) ExecDeleteSnapshotTask( ctx context.Context, disk storageman.IDisk, deleteSnapshot string, convertSnapshot string, pendingDelete bool, ) (jsonutils.JSONObject, error)
func (*SKVMGuestInstance) ExecDiskSnapshotTask ¶
func (s *SKVMGuestInstance) ExecDiskSnapshotTask( ctx context.Context, userCred mcclient.TokenCredential, disk storageman.IDisk, snapshotId string, ) (jsonutils.JSONObject, error)
func (*SKVMGuestInstance) ExecMemorySnapshotResetTask ¶
func (s *SKVMGuestInstance) ExecMemorySnapshotResetTask(ctx context.Context, input *hostapi.GuestMemorySnapshotResetRequest) (jsonutils.JSONObject, error)
func (*SKVMGuestInstance) ExecMemorySnapshotTask ¶
func (s *SKVMGuestInstance) ExecMemorySnapshotTask(ctx context.Context, input *hostapi.GuestMemorySnapshotRequest) (jsonutils.JSONObject, error)
func (*SKVMGuestInstance) ExecReloadDiskTask ¶
func (s *SKVMGuestInstance) ExecReloadDiskTask(ctx context.Context, disk storageman.IDisk) (jsonutils.JSONObject, error)
func (*SKVMGuestInstance) ExecStopTask ¶
func (s *SKVMGuestInstance) ExecStopTask(ctx context.Context, params interface{}) (jsonutils.JSONObject, error)
func (*SKVMGuestInstance) ExecSuspendTask ¶
func (s *SKVMGuestInstance) ExecSuspendTask(ctx context.Context)
func (*SKVMGuestInstance) ExitCleanup ¶
func (s *SKVMGuestInstance) ExitCleanup(clear bool)
func (*SKVMGuestInstance) ForceStop ¶
func (s *SKVMGuestInstance) ForceStop() bool
func (*SKVMGuestInstance) GetCgroupName ¶
func (s *SKVMGuestInstance) GetCgroupName() string
func (*SKVMGuestInstance) GetCleanFiles ¶
func (s *SKVMGuestInstance) GetCleanFiles() []string
func (*SKVMGuestInstance) GetDescFilePath ¶
func (s *SKVMGuestInstance) GetDescFilePath() string
func (*SKVMGuestInstance) GetDiskAddr ¶
func (s *SKVMGuestInstance) GetDiskAddr(idx int) int
func (*SKVMGuestInstance) GetFuseTmpPath ¶
func (s *SKVMGuestInstance) GetFuseTmpPath() string
func (*SKVMGuestInstance) GetHmpMonitorPort ¶
func (s *SKVMGuestInstance) GetHmpMonitorPort(vncPort int) int
func (*SKVMGuestInstance) GetId ¶
func (s *SKVMGuestInstance) GetId() string
func (*SKVMGuestInstance) GetMonitorPath ¶
func (s *SKVMGuestInstance) GetMonitorPath() string
func (*SKVMGuestInstance) GetName ¶
func (s *SKVMGuestInstance) GetName() string
func (*SKVMGuestInstance) GetNeedMergeBackingFileDiskIndexs ¶
func (s *SKVMGuestInstance) GetNeedMergeBackingFileDiskIndexs() []int
func (*SKVMGuestInstance) GetNicDescMatch ¶
func (s *SKVMGuestInstance) GetNicDescMatch(mac, ip, port, bridge string) jsonutils.JSONObject
func (*SKVMGuestInstance) GetPciBus ¶
func (s *SKVMGuestInstance) GetPciBus() string
func (*SKVMGuestInstance) GetPid ¶
func (s *SKVMGuestInstance) GetPid() int
func (*SKVMGuestInstance) GetPidFilePath ¶
func (s *SKVMGuestInstance) GetPidFilePath() string
func (*SKVMGuestInstance) GetQemuVersionStr ¶
func (s *SKVMGuestInstance) GetQemuVersionStr() string
func (*SKVMGuestInstance) GetQmpMonitorPort ¶
func (s *SKVMGuestInstance) GetQmpMonitorPort(vncPort int) int
func (*SKVMGuestInstance) GetStartScriptPath ¶
func (s *SKVMGuestInstance) GetStartScriptPath() string
func (*SKVMGuestInstance) GetStateFilePath ¶
func (s *SKVMGuestInstance) GetStateFilePath(version string) string
func (*SKVMGuestInstance) GetStopScriptPath ¶
func (s *SKVMGuestInstance) GetStopScriptPath() string
func (*SKVMGuestInstance) GetVdiProtocol ¶
func (s *SKVMGuestInstance) GetVdiProtocol() string
func (*SKVMGuestInstance) GetVncFilePath ¶
func (s *SKVMGuestInstance) GetVncFilePath() string
func (*SKVMGuestInstance) GetVncPort ¶
func (s *SKVMGuestInstance) GetVncPort() int
func (*SKVMGuestInstance) GetVpcNIC ¶
func (s *SKVMGuestInstance) GetVpcNIC() jsonutils.JSONObject
func (*SKVMGuestInstance) HomeDir ¶
func (s *SKVMGuestInstance) HomeDir() string
func (*SKVMGuestInstance) ImportServer ¶
func (s *SKVMGuestInstance) ImportServer(pendingDelete bool)
func (*SKVMGuestInstance) InitQga ¶
func (s *SKVMGuestInstance) InitQga() error
func (*SKVMGuestInstance) IsDaemon ¶
func (s *SKVMGuestInstance) IsDaemon() bool
func (*SKVMGuestInstance) IsDirtyShotdown ¶
func (s *SKVMGuestInstance) IsDirtyShotdown() bool
func (*SKVMGuestInstance) IsKvmSupport ¶
func (s *SKVMGuestInstance) IsKvmSupport() bool
func (*SKVMGuestInstance) IsLoaded ¶
func (s *SKVMGuestInstance) IsLoaded() bool
func (*SKVMGuestInstance) IsMaster ¶
func (s *SKVMGuestInstance) IsMaster() bool
func (*SKVMGuestInstance) IsMigratingDestGuest ¶
func (s *SKVMGuestInstance) IsMigratingDestGuest() bool
func (*SKVMGuestInstance) IsMonitorAlive ¶
func (s *SKVMGuestInstance) IsMonitorAlive() bool
func (*SKVMGuestInstance) IsRunning ¶
func (s *SKVMGuestInstance) IsRunning() bool
func (*SKVMGuestInstance) IsSharedStorage ¶
func (s *SKVMGuestInstance) IsSharedStorage() bool
func (*SKVMGuestInstance) IsSlave ¶
func (s *SKVMGuestInstance) IsSlave() bool
func (*SKVMGuestInstance) IsStopped ¶
func (s *SKVMGuestInstance) IsStopped() bool
func (*SKVMGuestInstance) IsStopping ¶
func (s *SKVMGuestInstance) IsStopping() bool
func (*SKVMGuestInstance) IsSuspend ¶
func (s *SKVMGuestInstance) IsSuspend() bool
func (*SKVMGuestInstance) IsValid ¶
func (s *SKVMGuestInstance) IsValid() bool
func (*SKVMGuestInstance) IsVdiSpice ¶
func (s *SKVMGuestInstance) IsVdiSpice() bool
func (*SKVMGuestInstance) ListStateFilePaths ¶
func (s *SKVMGuestInstance) ListStateFilePaths() []string
func (*SKVMGuestInstance) LoadDesc ¶
func (s *SKVMGuestInstance) LoadDesc() error
func (*SKVMGuestInstance) OnResumeSyncMetadataInfo ¶
func (s *SKVMGuestInstance) OnResumeSyncMetadataInfo()
func (*SKVMGuestInstance) PrepareDir ¶
func (s *SKVMGuestInstance) PrepareDir() error
func (*SKVMGuestInstance) PrepareDisksMigrate ¶
func (s *SKVMGuestInstance) PrepareDisksMigrate(liveMigrage bool) (*jsonutils.JSONDict, error)
func (*SKVMGuestInstance) PrepareMigrateCerts ¶
func (s *SKVMGuestInstance) PrepareMigrateCerts() (map[string]string, error)
func (*SKVMGuestInstance) QgaPath ¶
func (s *SKVMGuestInstance) QgaPath() string
func (*SKVMGuestInstance) SaveDesc ¶
func (s *SKVMGuestInstance) SaveDesc(desc jsonutils.JSONObject) error
func (*SKVMGuestInstance) SetCgroup ¶
func (s *SKVMGuestInstance) SetCgroup()
func (*SKVMGuestInstance) SetVncPassword ¶
func (s *SKVMGuestInstance) SetVncPassword()
func (*SKVMGuestInstance) SlaveDisksBlockStream ¶
func (s *SKVMGuestInstance) SlaveDisksBlockStream() error
func (*SKVMGuestInstance) StartDelete ¶
func (s *SKVMGuestInstance) StartDelete(ctx context.Context, migrated bool) error
func (*SKVMGuestInstance) StartGuest ¶
func (s *SKVMGuestInstance) StartGuest(ctx context.Context, userCred mcclient.TokenCredential, params *jsonutils.JSONDict) error
func (*SKVMGuestInstance) StartMonitor ¶
func (s *SKVMGuestInstance) StartMonitor(ctx context.Context, cb func())
func (*SKVMGuestInstance) StartMonitorWithImportGuestSocketFile ¶
func (s *SKVMGuestInstance) StartMonitorWithImportGuestSocketFile(ctx context.Context, socketFile string, cb func())
func (*SKVMGuestInstance) StartPresendArp ¶
func (s *SKVMGuestInstance) StartPresendArp()
func (*SKVMGuestInstance) StaticSaveSnapshot ¶
func (s *SKVMGuestInstance) StaticSaveSnapshot( ctx context.Context, disk storageman.IDisk, snapshotId string, encryptKey string, encFormat qemuimg.TEncryptFormat, encAlg seclib2.TSymEncAlg, ) (jsonutils.JSONObject, error)
func (*SKVMGuestInstance) Stop ¶
func (s *SKVMGuestInstance) Stop() bool
func (*SKVMGuestInstance) StreamDisks ¶
func (s *SKVMGuestInstance) StreamDisks(ctx context.Context, callback func(), disksIdx []int)
func (*SKVMGuestInstance) SyncConfig ¶
func (s *SKVMGuestInstance) SyncConfig(ctx context.Context, desc jsonutils.JSONObject, fwOnly bool) (jsonutils.JSONObject, error)
func (*SKVMGuestInstance) SyncMetadata ¶
func (s *SKVMGuestInstance) SyncMetadata(meta *jsonutils.JSONDict) error
func (*SKVMGuestInstance) SyncMirrorJobFailed ¶
func (s *SKVMGuestInstance) SyncMirrorJobFailed(reason string)
func (*SKVMGuestInstance) SyncQemuCmdline ¶
func (s *SKVMGuestInstance) SyncQemuCmdline(cmdline string)
func (*SKVMGuestInstance) SyncStatus ¶
func (s *SKVMGuestInstance) SyncStatus(reason string)
func (*SKVMGuestInstance) WriteMigrateCerts ¶
func (s *SKVMGuestInstance) WriteMigrateCerts(certs map[string]string) error
type SLibvirtDomainImportConfig ¶
type SLibvirtDomainImportConfig struct { LibvritDomainXmlDir string Servers []SLibvirtServer }
type SLibvirtServer ¶
type SLiveMigrate ¶
type SMemorySnapshot ¶
type SMemorySnapshot struct { *hostapi.GuestMemorySnapshotRequest Sid string }
type SMemorySnapshotDelete ¶
type SMemorySnapshotDelete struct {
*hostapi.GuestMemorySnapshotDeleteRequest
}
type SMemorySnapshotReset ¶
type SMemorySnapshotReset struct { *hostapi.GuestMemorySnapshotResetRequest Sid string }
type SQgaGuestSetPassword ¶
type SQgaGuestSetPassword struct { *hostapi.GuestSetPasswordRequest Sid string }
type SReloadDisk ¶
type SReloadDisk struct { Sid string Disk storageman.IDisk }
type SSrcPrepareMigrate ¶
type SStorageCloneDisk ¶
type SStorageCloneDisk struct { ServerId string SourceStorage storageman.IStorage SourceDisk storageman.IDisk TargetStorage storageman.IStorage TargetDiskId string DiskFormat string TargetDiskDesc *compute.GuestdiskJsonDesc }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.