Created
December 11, 2012 05:13
-
-
Save rixth/4256064 to your computer and use it in GitHub Desktop.
A shell function to duplicate a VMWare Fusion 5 virtual machine, including renaming the innards.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function duplicate_vm() { | |
local from_name=$1 | |
local to_name=$2 | |
cp -r $from_name.vmwarevm $to_name.vmwarevm | |
pushd $to_name.vmwarevm > /dev/null | |
rm vmware*.log | |
mv $from_name.nvram $to_name.nvram | |
mv $from_name.plist $to_name.plist | |
mv $from_name.vmsd $to_name.vmsd | |
mv $from_name.vmx $to_name.vmx | |
mv $from_name.vmxf $to_name.vmxf | |
sed -i '' "s/$from_name/$to_name/" $to_name.vmxf | |
sed -i '' "s/$from_name/$to_name/" $to_name.vmx | |
sed -i '' "s/$from_name/$to_name/" $to_name.plist | |
popd > /dev/null | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment