LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud
User Name
Password
Linux - Virtualization and Cloud This forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.

Notices


Reply
  Search this Thread
Old 08-14-2020, 04:09 PM   #1
JavaMeister
Member
 
Registered: Jul 2017
Location: NC
Distribution: Ubuntu 20.04
Posts: 34

Rep: Reputation: Disabled
How to extract files from a VirtualBox .VDI file


Ubuntu 18.04, VirtualBox 5.2.42, Windows 7 (64 bit) in vb has a virtual disk image file at /home/ron/VirtualBox/VM_MSW/HD.vdi

How the heck can I get a data file created in virtual Windows in the .vdi file copied / extracted into an ordinary file in, let's say /home/ron/aFile.txt?
 
Old 08-14-2020, 05:27 PM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,592

Rep: Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880
There are a couple of ways and I assume the Windows filesystem has not be corrupted in any way.

There is a virtuabox fuse filesystem i.e. vdfuse that should be in the repository that will allow you to mount partitions within the VDI image and allow you to copy the file. The package name is virtualbox-fuse. Never tried this method.

http://manpages.ubuntu.com/manpages/.../vdfuse.1.html

sudo vdfuse -f VM_MSW/HD.vdi /your_mount_point

Find your file and copy it to your home directory.

The contents of /your_mount_point should contain the partitions. Pick the one that contains your file and mount that partition via

sudo mount /your_mount_point/Partition1 /another_mount_point

You can always create another guest VM and attach the VDI file as a second drive. Mount the data partition and copy the file to a USB drive or transfer the file via sftp from your file manager to the host operating system.
 
Old 08-15-2020, 09:10 AM   #3
JavaMeister
Member
 
Registered: Jul 2017
Location: NC
Distribution: Ubuntu 20.04
Posts: 34

Original Poster
Rep: Reputation: Disabled
Thank you MichaelK for your response.

I am afraid I understand very little of it. I don't have the background. I have no idea what a "loop mount" is, for starters.

OTOH, VirtualBox is so slow and clumsy on my Ubuntu 18.04 system that I am going to give the whole thing up. TurboTax has given me nothing but trouble on MSW 7 on VirtualBox. And then I can't get my data file out of VB.

What trouble VB has given me is supplemented by unwanted intrusion from MS! To h*ll with it. I am blowing the whole thing away and probably never coming back. I will use my wife's MSW 10 machine for running TurboTax.

I'm sorry it did not work out, but thank you again for your attempt. I cannot mark this issue SOLVED, but I think the above should certainly make clear that it was not your failure.
 
Old 08-15-2020, 09:42 AM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,592

Rep: Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880
I run virtualbox on some older hardware and it can be slow. Turbotax can be a memory hog. How much memory is configure for Windows? You need a min of 2GB but if you have enough more is better. Turbotax stopped supporting W7 as of this year so might as well get rid of it...

A loop mount let's you mount an image file of a drive/partition as if it were a real physical device. An ISO installation file you might of downloaded to install Ubuntu is an image file of DVD.
 
Old 08-16-2020, 03:03 AM   #5
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by JavaMeister View Post
I am afraid I understand very little of it. I don't have the background. I have no idea what a "loop mount" is, for starters.
The software vdfuse does exactly what you want, it just doesn't have a graphical frontend.
Which OS is your host, Ubuntu?
This search leads to this and this.
Personally I think the man page should be sufficient. The askubuntu is a little older, carefully consider all upvoted answers.
 
Old 01-04-2021, 04:47 AM   #6
igadoter
Senior Member
 
Registered: Sep 2006
Location: wroclaw, poland
Distribution: many, primary Slackware
Posts: 2,717
Blog Entries: 1

Rep: Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625
The simplest way is to enable shared folder. Start Windows in Virtual Box and copy required file into shared folder. This folder is common folder for guest Windows and host Ubuntu. Everything inside this folder can be accessed in both systems.
 
Old 01-07-2021, 07:43 PM   #7
JavaMeister
Member
 
Registered: Jul 2017
Location: NC
Distribution: Ubuntu 20.04
Posts: 34

Original Poster
Rep: Reputation: Disabled
How to extract files from a VirtualBox .VDI file

Thank you igadoter! That sounds like exactly the solution I need.
Maybe I should start another thread, but, can you tell me how to create a shared folder?
Thanks.
 
Old 01-08-2021, 04:02 AM   #8
igadoter
Senior Member
 
Registered: Sep 2006
Location: wroclaw, poland
Distribution: many, primary Slackware
Posts: 2,717
Blog Entries: 1

Rep: Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625
I think better is to create new thread. At the moment I don't have Windows guest on VB. Say something like: how to create shared folder for Windows guest and Ubuntu host in Virtual Box?
 
1 members found this post helpful.
Old 01-08-2021, 02:24 PM   #9
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,939

Rep: Reputation: 3619Reputation: 3619Reputation: 3619Reputation: 3619Reputation: 3619Reputation: 3619Reputation: 3619Reputation: 3619Reputation: 3619Reputation: 3619Reputation: 3619
I get the feeling that one can open the file via 7-zip or even file manager directly. Haven't tried it lately but it's worth a try.
 
Old 01-08-2021, 05:33 PM   #10
Aeterna
Senior Member
 
Registered: Aug 2017
Location: Terra Mater
Distribution: VM Host: Slackware-current, VM Guests: Artix, Venom, antiX, Gentoo, FreeBSD, OpenBSD, OpenIndiana
Posts: 1,001

Rep: Reputation: Disabled
Quote:
Originally Posted by JavaMeister View Post
Thank you igadoter! That sounds like exactly the solution I need.
Maybe I should start another thread, but, can you tell me how to create a shared folder?
Thanks.
really easy:
1) Open VirtualBox Manager
2) click on VM Client (e.g. Slackware)
3) click Settings icon
4) click Shared Folders (left column)
5) On the right side click Folder with + Sign icon
6) Select path
7) confirm
8) boot up windows and connect to the shared folder
8a) I assume that your windows client has VB client additions installed

Also, if you never used VB Manager, I assume that your VM windows client has not enough RAM assigned and it is CPU underpowered. This can be fixed from VB Manager also.

Last edited by Aeterna; 01-08-2021 at 05:34 PM.
 
  


Reply

Tags
extract, image-formats, virtual box


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Using .vdi virtualbox file created in another installation rng Linux - General 2 12-20-2015 04:45 AM
[SOLVED] Cannot resize VirtualBox .vdi file when created from physical disk Vanyel Linux - Virtualization and Cloud 1 02-16-2013 10:53 PM
manually removing the .vdi files left over after removing VirtualBox adityavpratap Linux - General 2 10-24-2010 12:04 PM
copy hard disk from xp to vdi file for virtualbox[zenwalk] deathalele Linux - Software 3 06-23-2009 06:26 PM
Migrating a VirtualBox .vdi Image to CoLinux MetalSubstance Linux - Software 2 02-25-2008 07:03 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud

All times are GMT -5. The time now is 03:48 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration