Is there a trick to creating a file in the filesystem root (/) using a provisioner? I cannot get past the permission denied, even with sudo, yet the chef provisioner that follows runs fine and can modify everything.
28 {
29 "type": "shell",
30 "inline": ["echo 'vagrant' | sudo -S echo '{ \"platform_type\": \"vm\" }' > /.platform_info"]
31 },
==> vmware-vmx: /tmp/script_7904.sh: 2: /tmp/script_7904.sh: cannot create /.platform_info: Permission denied
This command works fine with the docker builder because permissions are a fantasy there, but any other builder (aws, vm) it fails.