#! /bin/bash ############################################################ ## movevbfe.conf ## It scp the windowsXP.vdi file from root@10.205.19.205:/home/tlyoon/repo/VirtualWindows/ to /state/partition1/home/mpi/.VirtualBox/HardDisks. When this is done, the same copy of windowsXP.vdi is duplicated into /state/partition1/repo/VBanicca/.VirtualBox/HardDisks/ ############Copying windowsXP.vdi into mpi home folder, and keeping a backup copy in /state/partition1/repo/VBrepo ############ Need to standby to key in password during scp ############################################## ############ this copying takes up quite a bit of time since the hardisk windowsXP.vdi is large. ############ the windowsXP.vdi is stored at tlyoon@10.205.19.205:/home/tlyoon/repo/VirtualWindows/windowsXP.vdi. mkdir /export/home/mpi/.VirtualBox/ mkdir /export/home/mpi/.VirtualBox/HardDisks #template copy, to be copied to other nodes. mkdir /export/repo mkdir /export/repo/VBanicca mkdir /export/repo/VBanicca/.VirtualBox mkdir /export/repo/VBanicca/.VirtualBox/HardDisks #used by local users in the frontend. cd /export/home/mpi/.VirtualBox/HardDisks ### Copying with scp, slow ################################################ scp -r root@10.205.19.205:/home/tlyoon/repo/VirtualWindows/windowsXP.vdi . ### Copying with scp, slow ################################################ chown -R mpi:users /export/home/mpi/.VirtualBox chmod -R 755 /export/home/mpi/.VirtualBox ### Copying with cp, fast ################################################ cp /export/home/mpi/.VirtualBox/HardDisks/windowsXP.vdi /export/repo/VBanicca/.VirtualBox/HardDisks/. ### Copying with cp, fast ################################################ chown root:users /export/repo/VBanicca/.VirtualBox/HardDisks/windowsXP.vdi chmod -R 777 /export/repo/VBanicca/.VirtualBox/HardDisks/windowsXP.vdi rocks sync users rocks sync config rocks sync host network echo -e "\nMessage from the author :\nCOMPLETE!!! \n"