Using Packer to apply additional initialization steps to an existing virtual machine is supported by Packer using vmware-vmx builder
VMware Packer VMware VMware ( VMX). , VMware Fusion Professional OS X, VMware Linux Windows VMware Player Linux.
, CentOS VMX Vagrant, packer.json :
{
"builders": [{
"type": "vmware-vmx",
"source_path": "/path/to/a/vm.vmx",
"ssh_username": "root",
"ssh_password": "root",
"ssh_wait_timeout": "30s",
"shutdown_command": "echo 'packer' | sudo -S shutdown -P now"
}],
"provisioners": [{
"type": "shell",
"inline": ["echo 'my additional provisioning steps'"]
}],
"post-processors": [{
"type": "vagrant",
"keep_input_artifact": true,
"output": "mycentos.box"
}]
}
Packer VMX, , , , , Vagrant ".box".