在好例子网,分享、交流、成长!
您当前所在位置:首页Python 开发实例Python语言基础 → Libvirt_Application_Development_Guide_Using_Python-en-US

Libvirt_Application_Development_Guide_Using_Python-en-US

Python语言基础

下载此实例
  • 开发语言:Python
  • 实例大小:0.80M
  • 下载次数:5
  • 浏览次数:116
  • 发布时间:2020-01-07
  • 实例类别:Python语言基础
  • 发 布 人:liuzhiming429
  • 文件格式:.pdf
  • 所需积分:2
 相关标签: python GUI app

实例介绍

【实例简介】

【实例截图】

【核心代码】

Preface ix
1. Document Conventions ................................................................................................... ix
1.1. Typographic Conventions ..................................................................................... ix
1.2. Pull-quote Conventions ......................................................................................... x
1.3. Notes and Warnings ............................................................................................ xi
2. We Need Feedback! ....................................................................................................... xi
1. Introduction 1
1.1. Overview ..................................................................................................................... 1
1.2. Glossary of terms ......................................................................................................... 1
2. Architecture 3
2.1. Object model ............................................................................................................... 3
2.1.1. Hypervisor connections ...................................................................................... 3
2.1.2. Guest domains .................................................................................................. 3
2.1.3. Virtual networks ................................................................................................. 4
2.1.4. Storage pools .................................................................................................... 4
2.1.5. Storage volumes ............................................................................................... 5
2.1.6. Host devices ..................................................................................................... 5
2.2. Driver model ................................................................................................................ 6
2.3. Remote management ................................................................................................... 7
2.3.1. Basic usage ...................................................................................................... 7
2.3.2. Data Transports ................................................................................................. 8
2.3.3. Authentication schemes ..................................................................................... 9
2.4. Generating TLS certificates ........................................................................................... 9
2.4.1. Public Key Infrastructure setup ......................................................................... 10
3. Connections 11
3.1. Overview .................................................................................................................... 11
3.1.1. open ............................................................................................................... 11
3.1.2. openReadOnly ................................................................................................. 12
3.1.3. openAuth ........................................................................................................ 12
3.1.4. close ............................................................................................................... 13
3.2. URI formats ............................................................................................................... 14
3.2.1. Local URIs ...................................................................................................... 14
3.2.2. Remote URIs .................................................................................................. 15
3.3. Capability Information Methods ................................................................................... 17
3.4. Host information ......................................................................................................... 21
3.4.1. getHostname ................................................................................................... 21
3.4.2. getMaxVcpus ................................................................................................... 21
3.4.3. getInfo ............................................................................................................. 22
3.4.4. getCellsFreeMemory ........................................................................................ 23
3.4.5. getType ........................................................................................................... 23
3.4.6. getVersion ....................................................................................................... 24
3.4.7. getLibVersion ................................................................................................... 24
3.4.8. getURI ............................................................................................................ 25
3.4.9. isEncrypted ..................................................................................................... 25
3.4.10. isSecure ........................................................................................................ 25
3.4.11. isAlive ........................................................................................................... 26
3.4.12. compareCPU ................................................................................................. 26
3.4.13. getFreeMemory ............................................................................................. 27
3.4.14. getFreePages ................................................................................................ 27
3.4.15. getMemoryParameters ................................................................................... 28
Libvirt Application Development Guide Using Python Draft
vi
3.4.16. getMemoryStats ............................................................................................. 28
3.4.17. getSecurityModel ........................................................................................... 29
3.4.18. getSysinfo ..................................................................................................... 29
3.4.19. getCPUMap ................................................................................................... 30
3.4.20. getCPUStats .................................................................................................. 30
3.4.21. getCPUModelNames ...................................................................................... 30
4. Guest Domains 33
4.1. Domain Overview ....................................................................................................... 33
4.2. Listing Domains .......................................................................................................... 34
4.3. Obtaining State Information About a Domain ................................................................ 37
4.3.1. Fetching the ID of a domain ............................................................................. 37
4.3.2. Fetching the UUID of a domain ........................................................................ 37
4.3.3. Fetching the OS type of a domain .................................................................... 38
4.3.4. Determining if the domain has a current snapshot .............................................. 38
4.3.5. Determining if the domain has managed save images ........................................ 39
4.3.6. Fetch the hostname of the domain ................................................................... 39
4.3.7. Get the Domain hardware info .......................................................................... 40
4.3.8. Determine if the Domain is running ................................................................... 41
4.3.9. Determine if the Domain is persistent ............................................................... 41
4.3.10. Determine if the Domain is updated ................................................................ 42
4.3.11. Determine the max memory of the Domain ...................................................... 42
4.3.12. Determine the max Vcpus of the Domain ........................................................ 43
4.3.13. Fetch the name of the Domain ....................................................................... 43
4.3.14. Fetch the state of the Domain ........................................................................ 44
4.3.15. Extract the time information from Domain ........................................................ 45
4.4. Lifecycle Control ......................................................................................................... 45
4.4.1. Provisioning and Starting ................................................................................. 46
4.4.2. Stopping .......................................................................................................... 53
4.4.3. Suspend / Resume and Save / Restore ............................................................. 53
4.4.4. Migration ......................................................................................................... 55
4.4.5. Autostart ......................................................................................................... 58
4.5. Domain Configuration ................................................................................................. 58
4.5.1. Boot Modes ..................................................................................................... 58
4.5.2. Memory / CPU Resources ................................................................................ 59
4.6. Monitoring Performance .............................................................................................. 60
4.6.1. Domain Block Device Performance ................................................................... 60
4.6.2. vCPU Performance .......................................................................................... 61
4.6.3. Memory Statistics ............................................................................................ 62
4.6.4. I/O Statistics .................................................................................................... 63
4.7. Device configuration ................................................................................................... 63
4.7.1. Emulator ......................................................................................................... 64
4.7.2. Disks ............................................................................................................... 65
4.7.3. Networking ...................................................................................................... 66
4.7.4. Mice, Keyboard & Tablets ................................................................................ 67
4.7.5. USB Device Passthrough ................................................................................. 68
4.7.6. PCI device passthrough ................................................................................... 68
4.8. Live Configuration Change .......................................................................................... 69
4.8.1. Block Device Jobs ........................................................................................... 69
5. Storage Pools 71
5.1. Overview .................................................................................................................... 72
Draft
vii
5.2. Listing pools ............................................................................................................... 72
5.3. Pool usage ................................................................................................................ 73
5.4. Lifecycle control ......................................................................................................... 74
5.5. Discovering pool sources ............................................................................................ 75
5.6. Pool configuration ....................................................................................................... 76
5.7. Volume overview ........................................................................................................ 77
5.8. Listing volumes .......................................................................................................... 77
5.9. Volume information ..................................................................................................... 77
5.10. Creating and deleting volumes .................................................................................. 78
5.11. Cloning volumes ....................................................................................................... 79
5.12. Configuring volumes ................................................................................................. 80
6. Virtual Networks 83
6.1. Overview .................................................................................................................... 83
6.2. Listing networks ......................................................................................................... 83
6.3. Lifecycle control ......................................................................................................... 84
6.4. Network configuration ................................................................................................. 85
7. Network Interfaces 87
7.1. Overview .................................................................................................................... 87
7.2. XML Interface Description Format ............................................................................... 87
7.3. Retrieving Information About Interfaces ....................................................................... 88
7.3.1. Enumerating Interfaces .................................................................................... 88
7.3.2. Obtaining a virInterface instance for an Interface ............................................... 89
7.3.3. Retrieving Detailed Interface Information ........................................................... 90
7.3.4. Retrieving Interface Network Addresses ............................................................ 91
7.4. Managing interface configuration files .......................................................................... 91
7.4.1. Defining an interface configuration .................................................................... 92
7.4.2. Undefining an interface configuration ................................................................ 92
7.4.3. changeRollback ............................................................................................... 93
7.4.4. changeBegin ................................................................................................... 93
7.4.5. changeCommit ................................................................................................ 94
7.5. Interface lifecycle management ................................................................................... 94
7.5.1. Activating an interface ...................................................................................... 94
7.5.2. Deactivating an interface .................................................................................. 94
8. Error Handling 97
8.1. virGetLastError ......................................................................................................... 101
8.2. Subclassing libvirtError ............................................................................................. 102
8.3. Registering an Error Handler Function ....................................................................... 102
9. Event and Timer Handling 105
9.1. Event Handling ......................................................................................................... 105
9.2. Timer Handling ......................................................................................................... 106
10. Security Model 109
11. Debugging / Logging 111
11.1. Environment Variables ............................................................................................. 112
A. Revision History 113
Index 115

标签: python GUI app

实例下载地址

Libvirt_Application_Development_Guide_Using_Python-en-US

不能下载?内容有错? 点击这里报错 + 投诉 + 提问

好例子网口号:伸出你的我的手 — 分享

网友评论

发表评论

(您的评论需要经过审核才能显示)

查看所有0条评论>>

小贴士

感谢您为本站写下的评论,您的评论对其它用户来说具有重要的参考价值,所以请认真填写。

  • 类似“顶”、“沙发”之类没有营养的文字,对勤劳贡献的楼主来说是令人沮丧的反馈信息。
  • 相信您也不想看到一排文字/表情墙,所以请不要反馈意义不大的重复字符,也请尽量不要纯表情的回复。
  • 提问之前请再仔细看一遍楼主的说明,或许是您遗漏了。
  • 请勿到处挖坑绊人、招贴广告。既占空间让人厌烦,又没人会搭理,于人于己都无利。

关于好例子网

本站旨在为广大IT学习爱好者提供一个非营利性互相学习交流分享平台。本站所有资源都可以被免费获取学习研究。本站资源来自网友分享,对搜索内容的合法性不具有预见性、识别性、控制性,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,平台无法对用户传输的作品、信息、内容的权属或合法性、安全性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论平台是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二与二十三条之规定,若资源存在侵权或相关问题请联系本站客服人员,点此联系我们。关于更多版权及免责申明参见 版权及免责申明

;
报警