On Mon, 17 Sep 2018 16:47:55 +0200 "Erik P. Olsen" <[email protected]> wrote:
> On 2018-08-21 at 22:23:05 Allan wrote: > > > On Tue, 21 Aug 2018 08:14:20 +0200 > > "Erik P. Olsen" <[email protected]> wrote: > > > > > On 2018-08-21 at 03:01:22 Allan wrote: > > > > > > > å Mon, 20 Aug 2018 15:18:05 +0200 > > > > "Erik P. Olsen" <[email protected]> skrev: > > > > > Unfortunately I have created too large a file to hold my > > > > > virtual Win10 system. I want to recover some of the surplus > > > > > disk area from the file. > > > > > > > > > > My host system is Fedora 28 and I thought I could export the > > > > > virtual machine, create a new and smaller file and import the > > > > > VM into this file. Is that doable or is there if possible a > > > > > better method? > > > > export and import doesn't change the VDI - it just copies it. > > > > > > That's exactly what I want to accomplish: copy the vdi file from a > > > large linux file to a smaller. And my problem with export is that > > > I don't see how I can specify where the output of the export > > > process goes. I want it to go to a usb stick not to a file on my > > > home dir. > > > > export gives you a 1:1 copy of what you have. There are no option > > to make the new VDI of any new size. > > > > So what you should do is create a new VDI file with the size you > > want. > > > > Then in your Win VM, you need to clean up your partitions (defrag), > > and then shrink the partition, so it is of same or smaller size > > than the new VDI, so it can fit inside it. There are tools in Win > > to do this. > > > > After that I would use a Fedora VM (create one if you don't have > > one), and attach both the Win VDI and the new VDI to it, and boot > > Fedora. Then you can use dd to copy everything from Win VDI to new > > VDI. > > > > That shoul fix your problem. > > > > BTW you can move all your VDI's to wherever you want inside the > > Virtual disk manager (GUI). > > I wonder would it be possible to create a system image of the virtual > windows 10 and then use this image to install it in a smaller VDI > file? That is more or less what you are doing in the above procedure. Another way might be to look at http://libguestfs.org/ which seems to have tools to rezise the VDI. The package is in Fedora repo. I have never tried that, though. Allan. _______________________________________________ VBox-users-community mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/vbox-users-community _______________________________________________ Unsubscribe: mailto:[email protected]?subject=unsubscribe
