0

I'm trying to access files contained in box packages created with

vagrant package

Creating the boxes is no problem and I can open them with a something like 7-Zip to reveal the vmdk file inside, but, they don't seem to contain the same files I see in a vmdk downloaded from the Vagrant box repository.

For instance, this is the file structure of an Ubuntu box downloaded from the repository:

vmdk file listing

It looks like a regular Linux file system and I can extract any files I want.

And this is the vmdk of a box made with Vagrant package:

vmdk file listing

and the 0.img file:

vmdk file listing

Now I can drill down into some of those but the folders and files are not organised in the same way as the regular listing above. But in particular I can't see any sign of the folders and files I've created within the box which are certainly packaged by Vagrant package since that's its function.

I'm on Windows and some of those listed files I can't get into such as the System.map which may hold the gold I'm after.

So, my questions are:

  • where would I expect to find the files I'm after?
  • is it possible to package a Vagrant box so it has a regular file system output as in boxes downloaded from the repository?
  • also, the 1.lvm file listed is a massive 42GB which I can't quite extract to my current drive. Is that likely to be important to my quest? I can't seem to look inside it without extracting it.
0

You're seeing a representation of the entire disk in 7-Zip. Your experience when opening disk images with 7-Zip may differ, based on the partitioning scheme, partition types, and file systems used on the disk.

7-Zip understands various partitioning schemes (e.g. MBR, APM, GPT), various partition types, and file systems (e.g. FAT, NTFS, EXT2, EXT3). 7-Zip at this time does not handle Logical Volume Manager (LVM) partitions. You can extract that LVM partition and mount it on a Linux machine to see the files you're expecting.

So to answer your questions directly:

  1. In partition #1, (1.lvm)
  2. Sure, change your disk configuration prior to packaging it up.
  3. Yes, for the above reasons
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.