guestfish 命令修改镜像文件
2016-06-07 14:13
537 查看
http://libguestfs.org/guestfish.1.html guestfish命令使用方法详解
此操作在centos7进行
1、安装guestfish 命令
[root@localhost etc]# yum install guestfish
Your transaction was saved, rerun it with:
yum load-transaction /tmp/yum_save_tx.2016-05-28.00-34._SrfSu.yumtx
[root@localhost etc]# yum load-transaction /tmp/yum_save_tx.2016-05-28.00-34._SrfSu.yumtx
Installed:
libguestfs-tools-c.x86_64 1:1.28.1-1.55.el7.centos.4
Dependency Installed:
hexedit.x86_64 0:1.2.13-5.el7 libconfig.x86_64 0:1.4.9-5.el7
Complete!
[root@localhost etc]# guest
guestfish guestmount guestunmount
安装完成后有三个命令!
2、用root用户挂载这个镜像为可读可写模式
[root@localhost ~]#guestfish --rw -a cirros-0.3.4-x86_64-uec.tar.gz
Welcome to guestfish, the guest filesystem shell for
editing virtual machine filesystems and disk images.
Type: 'help' for help on commands
'man' to read the manual
'quit' to quit the shell
><fs>
进入了 guestfish 会话
在做任何操作之前,必须先在 guestfish提示符运行run命令。它会启动一个虚拟机,用于完成我们所以的对文件的操作。
><fs>run
libvirt: XML-RPC error : Failed to connect socket to '/var/run/libvirt/libvirt-sock':
No such file or directory
libguestfs: error: could not connect to libvirt (URI = qemu:///system): Failed to connect socket to '/var/run/libvirt/libvirt-sock': No such file or directory
未完待续。。。。。
此操作在centos7进行
1、安装guestfish 命令
[root@localhost etc]# yum install guestfish
Your transaction was saved, rerun it with:
yum load-transaction /tmp/yum_save_tx.2016-05-28.00-34._SrfSu.yumtx
[root@localhost etc]# yum load-transaction /tmp/yum_save_tx.2016-05-28.00-34._SrfSu.yumtx
Installed:
libguestfs-tools-c.x86_64 1:1.28.1-1.55.el7.centos.4
Dependency Installed:
hexedit.x86_64 0:1.2.13-5.el7 libconfig.x86_64 0:1.4.9-5.el7
Complete!
[root@localhost etc]# guest
guestfish guestmount guestunmount
安装完成后有三个命令!
2、用root用户挂载这个镜像为可读可写模式
[root@localhost ~]#guestfish --rw -a cirros-0.3.4-x86_64-uec.tar.gz
Welcome to guestfish, the guest filesystem shell for
editing virtual machine filesystems and disk images.
Type: 'help' for help on commands
'man' to read the manual
'quit' to quit the shell
><fs>
进入了 guestfish 会话
在做任何操作之前,必须先在 guestfish提示符运行run命令。它会启动一个虚拟机,用于完成我们所以的对文件的操作。
><fs>run
libvirt: XML-RPC error : Failed to connect socket to '/var/run/libvirt/libvirt-sock':
No such file or directory
libguestfs: error: could not connect to libvirt (URI = qemu:///system): Failed to connect socket to '/var/run/libvirt/libvirt-sock': No such file or directory
源码安装libvirt: http://www.mamicode.com/info-detail-247948.html [root@localhost ~]# wget http://libvirt.org/sources/libvirt-1.2.5.tar.gz 通过list-filesystems命令,我们可查看镜像内的文件系统列表: [code]><fs> list-filesystems
未完待续。。。。。
相关文章推荐
- duilib 常见问题
- Material Design UI
- CodeForces 675 A Infinite Sequence
- HDU 5504 GT and sequence
- Fuel编译一些问题处理
- UIKit: UIControl
- query的DOM操作
- Qt Quick 准确的移动平台屏幕适配
- 关于json 与 Request Header 的Content-Type 一些关系。
- HBUilder_mui编码快捷键
- iOS复习main.storybord制作 图片浏览器 数组配合字典优化 UIImageView播放动画
- iOS 修改UISearchBar cancel 按钮
- iOS开发拓展篇—UIDynamic(捕捉行为)
- iOS开发拓展篇—UIDynamic(重力行为+碰撞检测)
- 按钮点击切换背景图片(两种情况)
- UITableViewCell 选中时的颜色设置
- 转:UGUI与NGUI的区别与优缺点
- iOS开发拓展篇—UIDynamic(简单介绍)
- UIView绘制机制(转)
- Kaggle quick start