Send data to Virtual Machines without internet or plugins
Virtual machine
This is just a tiny tutorial on how to send data to a Virtual Machine, from your host machine, without connecting it to the internet (usually for the safety-concerned people out there).
Usually there are plugins/extensions that can be used to share folders between the host and the VM but I learned of a way which might be simpler.
The idea is to create an ISO file containing only whatever you want to send. After that you need to "insert a CD drive" and select the ISO file you just created, and then update the VM to accept it.
To create the ISO file on Linux you can use this command:
mkisofs -RJ -o ~/Downloads/files.iso ~/some/folder/somewhere/
The output might be something like this:
7.31% done, estimate finish Sun Apr 23 00:49:02 2023
14.59% done, estimate finish Sun Apr 23 00:49:02 2023
21.89% done, estimate finish Sun Apr 23 00:49:02 2023
29.17% done, estimate finish Sun Apr 23 00:49:02 2023
36.47% done, estimate finish Sun Apr 23 00:49:02 2023
43.75% done, estimate finish Sun Apr 23 00:49:02 2023
51.06% done, estimate finish Sun Apr 23 00:49:02 2023
58.33% done, estimate finish Sun Apr 23 00:49:02 2023
65.64% done, estimate finish Sun Apr 23 00:49:02 2023
72.92% done, estimate finish Sun Apr 23 00:49:02 2023
80.22% done, estimate finish Sun Apr 23 00:49:02 2023
87.49% done, estimate finish Sun Apr 23 00:49:02 2023
94.80% done, estimate finish Sun Apr 23 00:49:02 2023
Total translation table size: 0
Total rockridge attributes bytes: 0
Total directory bytes: 12288
Path table size(bytes): 92
Max brk space used 23000
68580 extents written (133 MB)
This way you can download everything you need in your host machine and then "upload" the files to your VM. This may include:
- EXE programs;
- Folders;
- Testing code;
- Programs you might want to test in the new environment;
- All else that fits
The whole process might become cumbersome and annoying in the long run and it is up to you to create a more convenient solution. VMs usually come with APIs and CLI commands that may help you in that task and Python comes with Tkinter from scratch so you can build your interface if you'd like.
dptoledo@pm.me