virsh 命令最新整理。 每个“;”之后是正解
1,migrate --domain --destURL --dname --live(热迁移)
migrate lf 192.168.16.3 dname
2,managedsave domain-id 保存当前运行的虚拟机的状态,当虚拟机再次启动的时候会恢复到之前保存的状态
Domain Management (help keyword 'domain'): 详细解释: 用法:
attach-device 从一个XML文件附加装置; 使用 XML文件中的设备定义在客户端中添加设备。attach-device lf lf.xml
attach-disk 附加磁盘设备
attach-interface 获得网络界面
autostart 自动开始一个域;定义为该状态的domain会在libvirt服务启动时自动启动。
blkdeviotune Set or query a block device I/O tuning parameters.;使用blkdeviotune可以设置虚拟机的读写速度和iops
blkiotune Get or set blkio parameters; 设置磁盘的权重 设置虚拟机的权重为700,并立即生效。
blockpull Populate a disk from its backing image.;将backing file数据合并至overlay中,截止目前只能将backing file合并至当前使用的active中,也就是说还不支 持指定top的合并.(blockcommit: 从 top 合并数据到 base )
blockjob Manage active block operations.;xxxxxxxxxxxx
blockresize Resize block device of domain. ;调整块设备大小。调整容量大小
console 连接到客户会话
cpu-baseline compute baseline CPU ;xxxxxxxxxxxx
cpu-compare compare host CPU with a CPU described by an XML file;xxxxxxxxxxxx
create 从一个 XML 文件创建一个域;创建一个虚拟机并启动
define 从一个 XML 文件定义(但不开始)一个域;定义一个虚拟机
destroy destroy (stop) a domain;强制关机
detach-device 从一个 XML 文件分离设备;xxxxxxxxxxxx
detach-disk 分离磁盘设备;xxxxxxxxxxxx
detach-interface 分离网络界面;xxxxxxxxxxxx
domid 把一个域名或 UUID 转换为域 id;根据虚拟机名称获取域名或ID
domif-setlink set link state of a virtual interface ;需要参数interface。
domjobabort abort active domain job;xxxxxxxxxxxx
domjobinfo domain job information;xxxxxxxxxxxx
domname 将域 id 或 UUID 转换为域名
domuuid 把一个域名或 id 转换为域 UUID
domxml-from-native Convert native config to domain XML;配置文件到xml的转换
domxml-to-native Convert domain XML to native config;xml到配置文件的转换
dump 把一个域的内核 dump 到一个文件中以方便分析
dumpxml XML 中的域信息
edit 编辑某个域的 XML 配置
inject-nmi Inject NMI to the guest ;把NMI注入到客户机
send-key Send keycodes to the guest;将键码发送到客户机
managedsave managed save of a domain state;相当于系统还原点
managedsave-remove Remove managed save of a domain;删除系统还原点
maxvcpus connection vcpu maximum ;连接虚拟处理器最大值
memtune Get or set memory parameters;设置内存参数
OPTIONS
[--domain] <string> domain name, id or uuid
--hard-limit <number> 强制最大内存 (default KiB)
--soft-limit <number> 可用最大内存 (default KiB)
--swap-hard-limit <number> 强制最大swap使用大小(default KiB)
--min-guarantee <number> 最小保证的内存 (default KiB)
--config 下次重启生效
--live 在线生效
--current 只在当前生效
例子:
memtune 6 --hard-limit 4194304 --soft-limit 8388608 --swap-hard-limit 4194304 --config
migrate 将域迁移到另一个主机中。;完成VM状态转储.保存运行状态虚拟机的内存设备状态信息至文件,可以通过此文件恢复到保存时的状态,有点类似系统
的休眠.(注意创建VM状态保存的时候VM磁盘必须是未发生写入改动的)
migrate-setmaxdowntime set maximum tolerable downtime;设定可以容忍的最长停机时间
migrate-setspeed Set the maximum migration bandwidth;设定最大迁移带宽
migrate-getspeed Get the maximum migration bandwidth;获取最大迁移带宽
reboot 重新启动一个域
reset reset a domain;重置域
restore 从一个存在一个文件中的状态恢复一个域;
resume 重新恢复一个域;重新运行。
save 把一个域的状态保存到一个文件
save-image-define redefine the XML for a domain's saved state file;为域的保存状态文件重新定义XML
save-image-dumpxml saved state domain information in XML; XML中的保存状态域信息
save-image-edit edit XML for a domain's saved state file;为域的保存状态文件编辑XML
schedinfo 显示/设置日程安排变量;显示/设定调度器参数
screenshot take a screenshot of a current domain console and store it into a file;获取当前域控制台的屏幕截图,并保存到文件中
setmaxmem 改变最大内存限制值;
setmem 改变内存的分配
setvcpus 改变虚拟 CPU 的数量;
shutdown 关闭一个域;关机
start 开始一个(以前定义的)非活跃的域
suspend 挂起一个域,暂停;
ttyconsole tty 控制台
undefine undefine a domain 取消已经定义的域
update-device update device from an XML file;从XML文件更新设备
vcpucount domain vcpu counts; 域虚拟处理器数量
vcpuinfo detailed domain vcpu information;详细的域虚拟处理器信息
vcpupin control or query domain vcpu affinity; 控制或查询域虚拟处理器亲近性
version 显示版本
vncdisplay vnc 显示
-----------------------------------------------------------------------
Domain Monitoring (help keyword 'monitor'):
domblkinfo domain block device size information
domblklist list all domain blocks ;查看虚拟机磁盘列表
domblkstat 获得域设备块状态
domcontrol domain control interface state;域控制台界面状态
domif-getlink get link state of a virtual interface;获取虚拟接口的链路状态
domifstat 获得域网络接口状态;获取域的网络接口统计信息
dominfo 域信息
dommemstat get memory statistics for a domain ;获取mem实际大小
domstate 域状态
list 列出域
Host and Hypervisor (help keyword 'host'):
capabilities 性能
connect 连接(重新连接)到 hypervisor
freecell NUMA可用内存
hostname 打印管理程序主机名
nodecpustats Prints cpu stats of the node.;CPU状态
nodeinfo 节点信息;CPU信息
nodememstats Prints memory stats of the node.
nodesuspend suspend the host node for a given time duration;将主机节点暂停一段特定的时间
qemu-attach QEMU Attach
qemu-monitor-command QEMU Monitor Command
sysinfo print the hypervisor sysinfo
uri 打印管理程序典型的URI
Interface (help keyword 'interface'):
iface-begin create a snapshot of current interfaces settings, which can be later commited (iface-commit) or restored (iface-rollback);拍摄当前接口设置的 快照,以后可以提交(iface-commit)或恢复(iface-rollback)
iface-bridge create a bridge device and attach an existing network device to it;建立网桥设备,并与现有网络设备相连
iface-commit commit changes made since iface-begin and free restore point;实行自iface-begin和闲置恢复点以来所作的变化
iface-define define (but don't start) a physical host interface from an XML file;从XML文件定义(但不启动)物理主机接口
iface-destroy destroy a physical host interface (disable it / "if-down");销毁物理主机接口(禁用它/ "if-down")
iface-dumpxml interface information in XML
iface-edit edit XML configuration for a physical host interface
iface-list list physical host interfaces ;XXXXXXXXXXXXXXXX
iface-mac convert an interface name to interface MAC address;XXX
iface-name convert an interface MAC address to interface name;XXX
iface-rollback rollback to previous saved configuration created via iface-begin;恢复到通过iface-begin创建的之前保存的配置
iface-start start a physical host interface (enable it / "if-up");启动物理主机接口(启用它/ "if-up")
iface-unbridge undefine a bridge device after detaching its slave device;分离从属设备后,取消定义网桥设备
iface-undefine undefine a physical host interface (remove it from configuration);取消定义物理主机接口(将它从配置中移除)
Network Filter (help keyword 'filter'):
nwfilter-define define or update a network filter from an XML file;从XML文件定义或更新网络过滤器
nwfilter-dumpxml network filter information in XML;XML中的网络过滤器信息
nwfilter-edit edit XML configuration for a network filter
nwfilter-list list network filters
nwfilter-undefine undefine a network filter
Networking (help keyword 'network'):
net-autostart 自动开始网络
net-create 从一个 XML 文件创建一个网络
net-define 从一个 XML 文件定义(但不开始)一个网络
net-destroy destroy (stop) a network
net-dumpxml XML 中的网络信息
net-edit 为网络编辑 XML 配置
net-info network information
net-list 列出网络
net-name 把一个网络UUID 转换为网络名
net-start 开始一个(以前定义的)不活跃的网络
net-undefine 取消定义一个非活跃的网络
net-uuid 把一个网络名转换为网络UUID
Node Device (help keyword 'nodedev'):
nodedev-create create a device defined by an XML file on the node
nodedev-destroy destroy (stop) a device on the node
nodedev-dettach dettach node device from its device driver
nodedev-dumpxml XML 中的节点设备详情
nodedev-list 这台主机中中的枚举设备
nodedev-reattach reattach node device to its device driver
nodedev-reset 重置节点设备
Secret (help keyword 'secret'):
secret-define define or modify a secret from an XML file
secret-dumpxml secret attributes in XML
secret-get-value Output a secret value
secret-list list secrets
secret-set-value set a secret value
secret-undefine undefine a secret
Snapshot (help keyword 'snapshot'):
snapshot-create Create a snapshot from XML;通过xml配置文件创建快照
snapshot-create-as Create a snapshot from a set of args ;直接用命令创建快照;创建外置disk-only磁盘快照
snapshot-current Get or set the current snapshot;查看snapshot当前状态信息。
snapshot-delete Delete a domain snapshot
snapshot-dumpxml Dump XML for a domain snapshot
snapshot-edit edit XML for a snapshot
snapshot-list List snapshots for a domain
snapshot-parent Get the name of the parent of a snapshot
snapshot-revert Revert a domain to a snapshot ;回滚快照
Storage Pool (help keyword 'pool'):
find-storage-pool-sources-as 找到潜在存储池源
find-storage-pool-sources 发现潜在存储池源
pool-autostart 自动启动某个池
pool-build 建立池
pool-create-as 从一组变量中创建一个池
pool-create 从一个 XML 文件中创建一个池
pool-define-as 在一组变量中定义池
pool-define 在一个 XML 文件中定义(但不启动)一个池
pool-delete 删除池
pool-destroy destroy (stop) a pool
pool-dumpxml XML 中的池信息
pool-edit 为存储池编辑 XML 配置
pool-info 存储池信息
pool-list 列出池
pool-name 将池 UUID 转换为池名称
pool-refresh 刷新池
pool-start 启动一个(以前定义的)非活跃的池
pool-undefine 取消定义一个不活跃的池
pool-uuid 把一个池名称转换为池 UUID
Storage Volume (help keyword 'volume'):
vol-clone clone a volume.
vol-create-as 从一组变量中创建卷;其实就是创建个文件。
vol-create 从一个 XML 文件创建一个卷
vol-create-from create a vol, using another volume as input
vol-delete 删除卷
vol-download Download a volume to a file
vol-dumpxml XML 中的卷信息
vol-info 存储卷信息
vol-key returns the volume key for a given volume name or path
vol-list 列出卷
vol-name returns the volume name for a given volume key or path;获取卷的名称根据路径或key
vol-path returns the volume path for a given volume name or key;根据卷名得到卷缩在路径。
vol-pool returns the storage pool for a given volume key or path;根据key和路径得到存储池的名称。
vol-upload upload a file into a volume;把某个文件导入卷内。
vol-wipe wipe a vol;擦出卷
virsh 命令最新整理。 每个“;”之后是正解的更多相关文章
- linux 常用命令--------雪松整理
linux 常用命令--------雪松整理 博客: http://hi.baidu.com/quanzhou722/blog错误在所难免,还望指正!========================= ...
- 05.virsh命令的常用操作(kvm)
注:以下命令均可在virsh的man手册页中找到 KVM虚拟机管理常用命令(domain): virsh命令参数 功能 用法举例 list 查看已经存在的domain信息(可以带参数) vir ...
- 使用OPTIMIZE TABLE命令来整理表碎片实践
操作环境:ubuntu 14.10 mysql 5.6.25 对含有BLOB或TEXT字段的表,若经常做修改或删除类的操作,需要定期执行OPTIMIZE TABLE命令来整理碎片. 1.creat ...
- libvirt(virsh命令介绍)
有了virt-install是安装虚拟机的命令,当然也需要一个管理虚拟机的命令了,那就是virsh. virsh命令使用 virsh <command> <domain-id> ...
- virsh命令来创建虚拟机
virsh命令来创建虚拟机步骤 (1)生成硬盘镜像文件: 格式:raw或qcow2 # qemu-img create -f raw fdisk.img 10G qemu-img convert re ...
- linux学习:特殊符号,数学运算,图像与数组与部分终端命令用法整理
指令:let.expr.array.convert.tput.date.read.md5.ln.apt.系统信息 一:特殊符号用法整理 系统变量 $# 是传给脚本的参数个数 $0 是脚本本身的名字 $ ...
- virsh命令和虚拟机克隆
virsh 命令 virsh list //列出正在运行虚拟机 virsh list --all //列出所有虚拟机 virsh console sunhao-1 //进入名字为sunh ...
- virsh命令行管理工具
virsh命令行管理工具 Libvirt有两种控制方式,命令行和图形界面 图形界面: 通过执行名virt-manager,启动libvirt的图形界面,在图形界面下可以一步一步的创建虚拟机,管理虚拟机 ...
- virsh命令管理虚拟机
virsh命令管理虚拟机 libvirt有两种控制方式,命令行和图形界面. 1.图形界面:通过执行名virt-manager,启动libvirt的图形界面,在图形界面下可以一步一步的创建虚拟机,管理虚 ...
随机推荐
- bzoj5090[lydsy11月赛]组题
裸的01分数规划,二分答案,没了. #include<cstdio> #include<algorithm> using namespace std; const int ma ...
- 转---秒杀多线程第八篇 经典线程同步 信号量Semaphore
阅读本篇之前推荐阅读以下姊妹篇: <秒杀多线程第四篇一个经典的多线程同步问题> <秒杀多线程第五篇经典线程同步关键段CS> <秒杀多线程第六篇经典线程同步事件Event& ...
- BZOJ3527:[ZJOI2014]力——题解
http://www.lydsy.com/JudgeOnline/problem.php?id=3527 给出n个数qi,给出Fj的定义如下: 令Ei=Fi/qi,求Ei. 参考:https://ww ...
- 十五分钟介绍 Redis数据结构--学习笔记
下面是一个对Redis官方文档<A fifteen minute introduction to Redis data types>一文的翻译,如其题目所言,此文目的在于让一个初学者能通过 ...
- Spring切面之一
为什么要使用AOP,在编写程序的时候,除了不必关心依赖的组件如何实现,在实际开发过程中,还需要将程序中涉及的公共问题集中解决.AOP是Aspect-Oriented Programming的简称,意思 ...
- Hive(五)hive的高级应用
一.视图 视图:享用基本表的数据,不会生成另外一份数据创建视图:create view view_name as select * from carss;create view carss_view ...
- 框架----Django之Ajax全套实例(原生AJAX,jQuery Ajax,“伪”AJAX,JSONP,CORS)
一.原生AJAX,jQuery Ajax,“伪”AJAX,JSONP 1. 浏览器访问 http://127.0.0.1:8000/index/ http://127.0.0.1:8000/fake_ ...
- 【单调栈】【CF5E】 Bindian Signalizing
传送门 Description 给你一个环,环上有一些点,点有点权.定义环上两点能相互看见当且仅当两点间存在一个弧使得弧上不存在一个点的点权大于着两个点.求一共有多少个点能互相看到 Input 第一行 ...
- 线程函数对比 win/linux
原文
- 题解 P1682 【过家家】
P1682 过家家 题目描述 有2n个小学生来玩过家家游戏,其中有n个男生,编号为1到n,另外n个女生,编号也是1到n.每一个女生可以先选择一个和她不吵嘴的男生来玩,除此之外,如果编号为X的女生的朋友 ...