User Tools

Site Tools


command_line

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
command_line [2017/10/06 00:17]
k2patel [How to allow network access to KVM Guest]
command_line [2021/08/24 21:11] (current)
k2patel
Line 152: Line 152:
  
 ==== Extract folder from KVM Guest Image ==== ==== Extract folder from KVM Guest Image ====
-This is appear ​to be far easy solution ​then i thought.\\+This appears ​to be the far easy solution ​than I thought.\\
 [[http://​libguestfs.org/​virt-copy-out.1.html|Link to official Document]] [[http://​libguestfs.org/​virt-copy-out.1.html|Link to official Document]]
 +
 +For RHEL you require the following packages installed.
 +  * libguestfs-tools
 +  * libguestfs-xfs ​ # if guest filesystem is XFS.
  
 <code bash> <code bash>
Line 159: Line 163:
 virt-copy-out -a machine2.qcow2 /​metadata/​testing/​users test/ virt-copy-out -a machine2.qcow2 /​metadata/​testing/​users test/
 </​code>​ </​code>​
 +
 +==== Image File explorer ====
 +This is a simple way to extract or access files.\\
 +Scan and assign the dev node.
 +<code bash>
 +losetup --partscan --find --show sdcard.img
 +</​code>​
 +
 +List all the block devices, including newly scanned.
 +<code bash>
 +lsblk --fs
 +</​code>​
 +
 +Mounting the file system
 +<code bash>
 +mount /​dev/​loop0p2 /mnt/sdcard
 +</​code>​
 +
 +Once unmounted remove the lo drive.
 +<code bash>
 +losetup --detach-all
 +</​code>​
 +
 +
command_line.1507249068.txt.gz ยท Last modified: 2020/08/10 02:28 (external edit)