Hacker News new | ask | show | jobs
by logicallee 3361 days ago
"can't" is a strong word.

why can't you do it in the user space within those VM's, communicating over a network adapter? If you don't care about putting on a raincoat, going outside to the Internet, and launching it up into the cloud, you can just install dropbox and get a sync'd directory without additional work. Obviously this is extra unnecessary overhead, two times, but for your use case you may not care.

you can alternatively roll your own solution though it might take you an hour or two. think about rsync over a local network adapter.

I realize these are hackish solutions but if it's stupid but it works, it's not stupid.

on the plus side you will control that traffic. having directory syncing that breaks the VM abstraction opens leaks due to potential oversights in how it's coded.

if I were in your predicament I would work around it.

1 comments

Bidirectional syncing primary use case is for development. Requiring a bunch of hacks and overhead is a terrible idea and controlling the traffic is not a useful feature for that use case.
I understand that, but it's not reasonable to ask that the VM intrusively modify the filesystem without the guest operating system knowing about it: therefore the "correct" solution is some guest userspace utilities for the user to install, which perform these operations from inside the VM. (If a 5 in a file changes to a 6, then rather this change happening from outside the VM, to the total surprise of the guest OS, as though you pulled the hard drive, mounted it in another computer, modified that one value, and remounted it in the original computer, all without the guest OS even being aware that the hard drive had been unmounted or modified, instead, it should be performed by a utility from inside the VM.)

The difference between this proper approach, and what you call "hacks" is minimal, and basically a question of packaging. To be clear, I agree that the VM developer should write and package these utilities for every major guest operating system it supports.