标签:for spec 参数 run conf red ecif 用法 sse
1、安装guestfish
yum install libguestfs-tools
注意,如果要修改windows镜像需要安装
yum install libguestfs-winsupport
2、修改配置文件:/etc/libvirt/qemu.conf
user = "root" # The group for QEMU processes run by the system instance. It can be # specified in a similar way to user. group = "root"
将user和group前面的#号放开
然后重启:
systemctl start libvirtd
3、修改文件内容
以下示例是将镜像里面的/opt/scalarizr/embedded/lib/python2.7/site-packages/scalarizr-3.3.4-py2.7.egg/scalarizr/storage2/volumes/cinder.py
的233行里面的display_description改成description
guestfish -a redhat6.7-kvm-oracle11g-22disk-pulsar2.2.qcow2 -i sh "sed -i ‘233s/display_description/description/‘ /opt/scalarizr/embedded/lib/python2.7/site-packages/scalarizr-3.3.4-py2.7.egg/scalarizr/storage2/volumes/cinder.py"
注意,不使用-i参数的话,需要在交互shell中运行
更多guestfish用法可以参考:http://xiaoli110.blog.51cto.com/1724/1568307/
标签:for spec 参数 run conf red ecif 用法 sse
原文地址:http://www.cnblogs.com/boshen-hzb/p/7586484.html