Hi all,
I'm not sure how linked clones work. So please correct my misunderstanding.
I have a Vagrantfile
```
$setup = <<-SETUP
echo "Running as $(id)"
yum update -y
yum install -y java-1.8.0-openjdk-devel
SETUP
Vagrant.configure("2") do |config|
config.vm.define "master-01" do |master|
master.vm.box = "centos/7"
master.vm.provider "virtualbox" do |v|
v.cpus = 1
v.memory = 1024
v.linked_clone = true
end
master.vm.provision "shell", inline: $setup
end
config.vm.define "clone-01" do |clone|
clone.vm.box = "centos/7"
clone.vm.provider "virtualbox" do |v|
v.cpus = 2
v.memory = 2048
v.linked_clone = true
end
master.vm.provision "shell", inline: <<-INLINE
# download and start application (depends on Java)
INLINE
end
```
So ideally, I only run yum update only once (I noticed that the VM snapshot blows up to 1.5 GB) because it takes time. But in my example, when I spinup clone-01, clone-01 doesn't have Java already installed and it fails (to startup).
So my question is, how *should* I define a Vagrantfile for multi-machines where one machine is a linked clone of another where I only need to run yum update -y once?.
Can you tell me what I'm doing wrong here?
Thanks,