I'm preparing a migration check list to move from Slackware 13.1 32-bit to Slackware 14.0 64-bit. Lots to do.
I appreciate advice from others who have experience with using raw devices in VirtualBox.
Currently I have build environments on separate partitions on a spare hot-swappable SATA drive. Each build environment uses two partitions, / and /var (yes, I could merge those into one partition). As I have only the one machine for both daily usage and software compiling, I need to reboot at the end of the day to the desired build environment and run my builds at night.
I'm planning to update my primary system with a larger drive. I want to move the build environments to the new drive to eliminate needing the spare drive. Then I want to have access to the build environments through a virtual machine to significantly reduce reboots and night-time only builds. I do not want to use virtual hard disks because virtual disks are slower than real disks.
After reading the VirtualBox user manual and surfing the web for details, I think the challenge resolves to these steps:
1. Transfer the build environment partitions from the spare drive to the new drive (update fstab, etc.)
2. In each build environment install lilo to the partition boot record (for example, lilo -b /dev/sdb6 -C /etc/lilo.conf).
3. Chainload the master boot loader to each build environment boot loader.
4. Verify each build environment system boots on the new drive.
5. In my primary desktop system, create a raw disk image using the specific partitions of the build environment. For example:
vboxmanage internalcommands createrawvmdk -filename /home/public/vm-images/Slackware64-14.0.vmdk -rawdisk /dev/sdb -partitions 5,6 -relative -register -mbr /dev/sdb6
6. Create the virtual machines and use the respective build environment vmdk disk.
7. In each virtual machine create a shared folder (all of my sources and build directories are in /home/public/builds/).
8. To support running in the virtual machine or rebooting to the actual partitions, I probably need a special shell script to mount the build partition directly or to the shared folder.
9. Assign 3 GB to each VM (I have 8 GB installed).
10. Edit the build environment fstab tmpfs usage to use 2.5 GB. 2.5 GB supports all of the packages I build. (The build environments need very little running thus most RAM can be used by tmpfs. Building in tmpfs is much faster than on a disk partition.)
I understand there is danger with using common partitions between the host and guest. Does that include shared folders or only those partitions mounted directly in the host and guest? Would using NFS be better from within the virtual machine?