码迷,mamicode.com
首页 > 其他好文 > 详细

guestmount

时间:2015-07-21 14:13:04      阅读:109      评论:0      收藏:0      [点我收藏+]

标签:

guestmount
For some types of changes, you may find it easier to mount the image‘s file system directly
in the guest. The guestmount program, also from the libguestfs project, allows you to do
so.
For example, to mount the root partition from our centos63_desktop.qcow2 image to
/mnt, we can do:
# guestmount -a centos63_desktop.qcow2 -m /dev/vg_centosbase/lv_root --rw /mnt
If we didn‘t know in advance what the mount point is in the guest, we could use the -
i(inspect) flag to tell guestmount to automatically determine what mount point to use:
# guestmount -a centos63_desktop.qcow2 -i --rw /mnt
Once mounted, we could do things like list the installed packages using rpm:
# rpm -qa --dbpath /mnt/var/lib/rpm
Once done, we unmount:
# umount /mnt

guestmount

标签:

原文地址:http://www.cnblogs.com/ruiy/p/4664060.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!