Skip to content

Instantly share code, notes, and snippets.

@varunpalekar
Created April 13, 2020 05:39
Show Gist options
  • Save varunpalekar/b22797e41a64f89afa79ae80e621de19 to your computer and use it in GitHub Desktop.
Save varunpalekar/b22797e41a64f89afa79ae80e621de19 to your computer and use it in GitHub Desktop.
Extract files from VDI linux

Introduction

We have problem that not able to run virtual box machine due to some windows VTX lock issue, so then I decided why not to run new machine using hyper-V, but what about the disk data. Here I am explaining how to get your data easily.

There may be multiple type of disk:

1. Linux plain partition disk:

Use 7zip to open vdi file, you can easily get the file content, then extract it.

2. LVM Linux disk

  1. Use 7zip to extract img file of your lvm partition (e.g., 2.img)
  2. Copy 2.img file to any linux machine
  3. Mount img file in loopset sudo losetup /dev/loop10 /path/to/disk.img
  4. grep lvm vg group sudo vgscan
  5. Active vg group if its not sudo vgchange -ay <vg-group-name>
  6. Now mount lv sudo mount /dev/<vg-name>/<lv-name> <mount-path>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment