I just have 4.6GB VDI image. I have to copy it into a FAT32 Filesystem. I cannot use VMDK format and only VDI images.
How can I split the VDI into smaller VDI chunks so I can copy it into a USB.
I just have 4.6GB VDI image. I have to copy it into a FAT32 Filesystem. I cannot use VMDK format and only VDI images.
How can I split the VDI into smaller VDI chunks so I can copy it into a USB.
Do you just need it split into chunks small enough to fit on a FAT32 filesystem so that you can transport or copy it? If that is the case, you can:
split to split a file into pieces.dd to do the same.If you need the VM to actually run from the pen drive:
Edit 25-5-2014: Adding more information on the third option.
Creating the ≤4GiB files using dd:
dd if=/dev/null of=/mnt/myPenDrive/RAID_part_1.diskimage bs=1M count=3072
dd if=/dev/null of=/mnt/myPenDrive/RAID_part_2.diskimage bs=1M count=3072
Explanation:
Note the file can be almost any size, but since we are writing to a FAt32 filesystem they need to be smaller than 4GiB. So do not increase count to more than 4095.
Next we tell the OS that we want to see these files as a block device.
losetup /dev/loop0 /mnt/myPenDrive/RAID_part_1.diskimage
losetup /dev/loop1 /mnt/myPenDrive/RAID_part_2.diskimage
We can now access these files as a regular disk. E.g. run fdisk on then, format them in any way we want and mount the formatted volumes.
Once more: We can format this loopback device in an other format that FAT32. So the FAT32 limits no longer apply. Since or fake 'disk' is less than 4GiB the disk will still get full if we try to create a 6GiB file though. So lets expand the disk.
We can do this by concatenating multiple devices. Think of it as a paper notebook where you can glue two notebook together. The last page of the first notebook to the first page of the second notebook. Now you have turned two smaller notebooks (disk) into on large notebook.
A much more detailed and thorough description of that can be found here on our sister site.
For Linux you probably want to use mdadm.
First make sure you have mdadm available (e.g. try to run it, if not found try the relevant command of your distribution to install it. E.g. apt-get install mdadm for Ubuntu, or yum install mdadm for RedHat, or emerge mdadm for Gentoo).
mdadm --create /dev/md0 --level=linear --raid-devices=2 /dev/loop0 /dev/loop1
You should now have a new, 6GiB block device called /dev/md0. Format and mount it as desired.