Posted on 09-07-2016 05:00 AM
i am looking to deploy so 7 pre created VM in self service , has anyone does this if yes how have you packaged the VM for deployment and which branch on the machine have you saved it to
Solved! Go to Solution.
Posted on 09-23-2016 05:58 AM
My solution was thus...
sudo tar -czf Parallels Desktop Autodeploy.pkg.tar.gz Parallels Desktop Autodeploy.pkg
#!/bin/sh
#Extract
tar -vxzf /tmp/Parallels Desktop Autodeploy.pkg.tar.gz -C /tmp
#Install
sudo installer -pkg /tmp/Parallels Desktop Autodeploy.pkg -target /
#Cleanup
rm -rf /tmp/Parallels Desktop Autodeploy.pkg
rm -rf /tmp/Parallels Desktop Autodeploy.pkg.tar.gz
Seems to work well and cuts 9 gigabytes off the file size. Hope this was helpful to someone!
Posted on 09-07-2016 01:21 PM
I took a stab at this a couple of weeks ago.
Someone else will very likely chime in with a better way but here was my solution:
-Install Parallels on setup machine
-Install Windows 7 and set customized settings inside Windows 7
-Set Parallels VM sharing settings and preferences
-Exit Parallels
-Compress Parallels VM file (Windows 7.pvm) using tar command
-Add compressed file to Composer under /tmp/Windows 7.pvm.tar.gz and create .pkg
-Upload .pkg to Casper Admin
-Create script to unpackage the VM file and place it in the correct directory for the user:
-Bundle .pkg and script together in a policy with script set to run "after":
echo "$3 is the username"
if test -e /Users/$3/Documents/Parallels;
then
echo "Directory already exists";
else
mkdir /Users/$3/Documents/Parallels;
echo "Created Parallels directory";
fi
chown $3 /Users/$3/Documents/Parallels
chmod 755 /Users/$3/Documents/Parallels
mv /tmp/Windows 7.pvm.tar.gz /Users/$3/Documents/Parallels
tar -vxzf /Users/$3/Documents/Parallels/Windows 7.pvm.tar.gz -C /Users/$3/Documents/Parallels/
chmod -R 711 /Users/$3/Documents/Parallels/Windows 7.pvm
chown -R $3 /Users/$3/Documents/Parallels/Windows 7.pvm
rm -rf /Users/$3/Documents/Parallels/Windows 7.pvm.tar.gz
If you haven't seen it before, $3 is populated with the currently logged in user's username when being run by Casper. It won't be populated when you run it locally on your own.
My scripting is probably pretty sloppy compared to most on the site but this has been working reliably for me.
I am still installing Parallels from the website since I couldn't get a licensed package made properly, but I figure the heavy lifting is already done this way. It will still take forever to install via Self Service since the pkg is huge--7 GB for me.
This post was typed in haste--sorry for anything unclear or omitted. Hopefully this will give you an idea of how to proceed.
Posted on 09-07-2016 01:23 PM
Looks like "#" turns lines into a header. They should have been comments in the script!
Let's try this...
#!/bin/sh
echo "$3 is the username"
#Create Parallels folder
if test -e /Users/$3/Documents/Parallels;
then
echo "Directory already exists";
else
mkdir /Users/$3/Documents/Parallels;
echo "Created Parallels directory";
fi
#Set owner and permissions
chown $3 /Users/$3/Documents/Parallels
chmod 755 /Users/$3/Documents/Parallels
#Move compressed file to Parallels folder
mv /tmp/Windows 7.pvm.tar.gz /Users/$3/Documents/Parallels
#Unzip VM File
tar -vxzf /Users/$3/Documents/Parallels/Windows 7.pvm.tar.gz -C /Users/$3/Documents/Parallels/
#Set owner and permissions on VM file
chmod -R 711 /Users/$3/Documents/Parallels/Windows 7.pvm
chown -R $3 /Users/$3/Documents/Parallels/Windows 7.pvm
#Remove compressed file
rm -rf /Users/$3/Documents/Parallels/Windows 7.pvm.tar.gz
Posted on 09-09-2016 04:15 AM
@cpdecker thanks i will try it today
Posted on 09-20-2016 10:41 AM
So...update!
Somehow went through all this trouble without realizing the Parallels Deployment Tool is a thing that exists: http://kb.parallels.com/en/120093
I have my VM, Parallels, and config file with license built in all bundled into the pkg now, and it works. However, still trying to figure out what to do about compressing this file as its 16 gigabytes!
Any suggestions, nation?
Posted on 09-23-2016 05:58 AM
My solution was thus...
sudo tar -czf Parallels Desktop Autodeploy.pkg.tar.gz Parallels Desktop Autodeploy.pkg
#!/bin/sh
#Extract
tar -vxzf /tmp/Parallels Desktop Autodeploy.pkg.tar.gz -C /tmp
#Install
sudo installer -pkg /tmp/Parallels Desktop Autodeploy.pkg -target /
#Cleanup
rm -rf /tmp/Parallels Desktop Autodeploy.pkg
rm -rf /tmp/Parallels Desktop Autodeploy.pkg.tar.gz
Seems to work well and cuts 9 gigabytes off the file size. Hope this was helpful to someone!