attach-device
使用 XML 文件中的设备定义在客户端中添加设备。
attach-disk
在客户端中附加新磁盘设备。
attach-interface
在客户端中附加新网络接口。
detach-device
从客户端中分离设备,使用同样的 XML 描述作为命令 attach-device。
detach-disk
从客户端中分离磁盘设备。
detach-interface
从客户端中分离网络接口。
表 15.2. 资源管理选项
这些是其它 virsh 选项:
命令
Description
version
显示 virsh 版本
nodeinfo
有关管理程序的输出信息
表 15.3. 其它选项
连接至管理程序
使用 virsh 连接到管理程序会话:
# virsh connect {hostname OR URL}
Where is the machine name of the hypervisor. To initiate a read-only connection, append the above command with -readonly.
创建虚拟机 XML 转储(配置文件)
使用 virsh 输出客户端 XML 配置文件:
# virsh dumpxml {domain-id, domain-name or domain-uuid}
This command outputs the guest's XML configuration file to standard out (stdout). You can save the data by piping the output to a file. An example of piping the output to a file called guest.xml:
# virsh dumpxml GuestID > guest.xml
This file guest.xml can recreate the guest (refer to 编辑客户端配置文件. You can edit this XML configuration file to configure additional devices or to deploy additional guests. Refer to 第 18.1 节 “使用带 virsh 的 XML 配置文件” for more information on modifying files created with virsh dumpxml.
virsh dumpxml 输出示例:
# virsh dumpxml r5b2-mySQL01
r5b2-mySQL01
4a4c59a7ee3fc78196e4288f2862f011
/usr/bin/pygrub
linux
/var/lib/libvirt/vmlinuz.2dgnU_
/var/lib/libvirt/initrd.UQafMw
ro root=/dev/VolGroup00/LogVol00 rhgb quiet
512000
1
destroy
restart
restart
使用配置文件创建客户端
Guests can be created from XML configuration files. You can copy existing XML from previously created guests or use the dumpxml option (refer to 创建虚拟机 XML 转储(配置文件)). To create a guest with virsh from an XML file:
# virsh create configuration_file.xml
编辑客户端配置文件
Instead of using the dumpxml option (refer to 创建虚拟机 XML 转储(配置文件)) guests can be edited either while they run or while they are offline. The virsh edit command provides this functionality. For example, to edit the guest named softwaretesting:
# virsh suspend {domain-id, domain-name or domain-uuid}
When a guest is in a suspended state, it consumes system RAM but not processor resources. Disk and network I/O does not occur while the guest is suspended. This operation is immediate and the guest can be restarted with the resume (恢复客户端) option.
恢复客户端
使用 virsh 的 resume 选项恢复客户端:
# virsh resume {domain-id, domain-name or domain-uuid}
# virsh save {domain-name, domain-id or domain-uuid} filename
This stops the guest you specify and saves the data to a file, which may take some time given the amount of memory in use by your guest. You can restore the state of the guest with the restore (恢复客户端) option. Save is similar to pause, instead of just pausing a guest the present state of the guest is saved.
恢复客户端
Restore a guest previously saved with the virsh save command (保存客户端) using virsh:
# virsh destroy {domain-id, domain-name or domain-uuid}
This command does an immediate ungraceful shutdown and stops the specified guest. Using virsh destroy can corrupt guest file systems . Use the destroy option only when the guest is unresponsive. For para-virtualized guests, use the shutdown option(关闭客户端) instead.
The GuestName parameter represents the name of the guest which you want to migrate.
The DestinationURL parameter is the URL or hostname of the destination system. The destination system must run the same version of Fedora, be using the same hypervisor and have libvirt running.
Once the command is entered you will be prompted for the root password of the destination system.
昨晚和朋友聊天,喝了点咖啡,由于我经常喝茶,很长时间没喝咖啡了,所以失眠了,于是起床读JVM规范,读完后在朋友圈发了一条信息:
JVM Run-Time Data Areas:The Java Virtual Machine defines various run-time data areas that are used during execution of a program. So
Spark SQL supports most commonly used features of HiveQL. However, different HiveQL statements are executed in different manners:
1. DDL statements (e.g. CREATE TABLE, DROP TABLE, etc.)
nginx在运行过程中是否稳定,是否有异常退出过?这里总结几项平时会用到的小技巧。
1. 在error.log中查看是否有signal项,如果有,看看signal是多少。
比如,这是一个异常退出的情况:
$grep signal error.log
2012/12/24 16:39:56 [alert] 13661#0: worker process 13666 exited on s
方法一:常用方法 关闭XML验证
工具栏:windows => preferences => xml => xml files => validation => Indicate when no grammar is specified:选择Ignore即可。
方法二:(个人推荐)
添加 内容如下
<?xml version=
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml&quo
最主要的是使用到了一个jquery的插件jquery.media.js,使用这个插件就很容易实现了。
核心代码
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.