Virtualization

Symantec Endpoint Protection — Mass Uninstall

0

There is a lot of controversy out in the ether as to the best way to uninstall SEP 12.1, on a massive scale. In my situation SEP has been nothing but a nightmare when it comes to managing endpoints. Some have worked flawlessly, while others just randomly “break” and need to be fixed. This process involves going from machine to machine, running Symantec’s “Clean Wipe” utility, rebooting several times, then finally re-installing SEP.

We’re at a point now where several endpoints are not communicating correctly with the parent server. There are also several duplicate GUID’s within the parent server causing machines to show up as not protected. In reality, these endpoints are fine, just not communicating with the parent server. Symantec recently released an update for SEP 12.1. We wanted to solve all of these issues with the parent server and “broken endpoints” before we upgrade everyone. So, I started browsing the web for the best solution to do a mass uninstall of SEP. We would then virtualize the Symantec parent server and re-push the SEP agents out to each machine. After digging around, the best solution I found was to go to Add/Remove Programs and uninstall SEP. In an office with a handful of machines, this might be practical. However, in our environment, with 150 nodes, visiting each desk is simply not an option.

I went into the registry and found the location of the uninstall script for Symantec Endpoint Protection:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{87C925D6-F6BF-4FBD-840B-53BAE2648B7B}

This registry key lists all of the information about the version of SEP, install location, etc. What we’re interested in though is the “Uninstall Script” key here in the registry. Copy this location to notepad, or write it down. While it looks like a random set of numbers from a portion of this script; it’s actually the same process ID used across all installs of SEP.

Now, you can take this uninstall script and throw it into your favorite scripting engine for deployment across the network — In our situation it’s KACE. Use MSIExec.exe with the appropriate switches to uninstall SEP throughout your environment.
In my case:
msiexec.exe /x /passive
Worked very well. “/x” switch is to signal uninstall, while the “/passive” switch allows for no user interaction.

Be careful using the passive switch as it may unexpectedly reboot your users’ computers

Moving VM’s from VMware Server to ESXi/vCenter Pt. 2

0

Hello again!

This is a continuation of the article “Moving VM’s from VMware Server to ESXi/vCenter Pt. 1″ which can be found here.

In this post we are going to start right where we left off in the last one. I assume that you have copied all of the necessary files over from your old VMWare server to your external drive. Once you have completed all of the steps in the previous article, we can move on. Unplug the external storage device from your server and bring it on over to your desktop/laptop/whatever you have the vSphere client installed on. Plug it in and copy the files over to your desktop, or wherever you would like to temporarily store them.

You will then need to download VMware’s free OVF converter tool. You’ll need an account with VMware to download the software but creating an account is completely free. You can download the software here.

Once you have downloaded and installed the software simply open up a command prompt, and make sure you note where you have copied the VM files on your computer. Then run this command:

ovf C:\”Virtual Machines”/New_WWW/New_www.vmx “Virtual Machines”/ConvertedWWW

This command starts the OVF converter tool. You point it to where your VMX files from your old VM that you pulled down are stored (C:\”Virtual Machines/New_WWW/New_www.vmx.) You then put a space between that file location and where you want the newly converted VMX to OVF to be stored (“Virtual Machines”/ConvertedWWW.) Almost done!

Here’s the easiest part of the whole thing. Open up your vSphere client and logon to the server that you want to deploy your newly converted VM on. Click “File,” “Import,” and then “OVF Template.” Point the new window that opens up to where your new OVF template is stored. Continue clicking through the dialogue boxes setting things such as datastores etc. until you’re finally ready to deploy the template. Give it some time and before you know it the VM that was on your old VMware server, will now be converted and moved over to your new ESXi server!

In the next article we’ll discuss some issues that can arise from this process.
Questions? Post them here!

Moving VM’s from VMWare Server to ESXi/vCenter Pt. 1

1

I ran into an interesting situation a few days ago at work. Basically, we had a very old VMWare Server that was running on Gentoo. All of the VM’s were hosted on that server (about 5 VMs were hosted on this server.) There was only one VM that we actually needed to move from that old VMWare Server to our new ESXi/vCenter server. In the old VMWare Server, there is no export tools build in, because of this..there really isn’t a great way to retrieve your VM through the console.

The solution I chose to use was to actually log in to the Gentoo server directly. All of the Virtual Machines are stored within a folder on the server. This includes the VMDK and VMX files. If you aren’t any good with Linux, there are plenty of resources out there that will walk you through some things to help you navigate through the filesystem. If you don’t know where your VMDK files are stored, go back to your VMWare Server console and right click on the VM you want to move. Click on settings, and it will tell you the path to your virtual machine files. Once you have this path simply log in directly to the server that is hosting your VM. Change directories into where your Virtual Machines are located. For example:

cd var/www/vmware/”Virtual Machines”

Once inside the folder with your VMs, do an “ls” command, which will list all of the files and folders, which is basically all of the VMs you have on that VMWare server. Now is a good time to plug in some sort of external storage. Depending on the size of your VM you could use a Flash Drive or if it’s big, an external hard drive. Be sure that your external storage is formatted in a way that Linux will be able to mount it. Some older versions of Linux won’t recognize the NTFS filesystem, if formatting the drive on a Windows box, this is the standard choice, but I would go with FAT32, in Linux it’s known as “vfat.”

Now that you have your external storage plugged in you’re going to want to mount it so that you can copy all of the files for your VM over to the external storage. This is fairly simple to do. I usually create a “usb” folder in the “mnt” directory, and mount my external drives there. To do this, run the following command:

mkdir mnt/usb

That creates the folder we’re going to mount to.

Then, run the following command to figure out what the name of your external device is

fdisk -l

You should get some output like this:

Disk /dev/sdb: 429.4 GB, 429496729600 bytes
255 heads, 63 sectors/track, 52216 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdb1 1 52216 419425019+ 83 vfat

In this case, we’re interested in /dev/sdb1 as this is my external hard drive.
Make note that this will vary from computer to computer depending on how many devices are plugged in, how many hard drives the server has, etc.

To mount this device so that we can copy files to it, we want to run the following command.

mnt /dev/sdb1 /mnt/usb

That will mount our external device (sdb1) to the folder that we created earlier (/mnt/usb.)
Now it’s just a matter of copying the files over from whatever folder our VM is in, to our mounted device. In my case the VM I want to copy is called “WWW” which is obviously our website. As I am still in the /var/www/vmware/”Virtual Machines” folder, I just need to “cd” into the WWW folder. Now that I am in the folder that has all of the virtual machine files, I am going to run the following command:

cp * /mnt/usb

That is going to copy everything from in the directory which you are in, to the mount folder of your external device. Once that is done we can move on to Part 2. In the next part, we will convert the VMX files to VMware’s OVF format and then upload that to our ESXi server. Be sure to check back later this week for Part 2! Don’t hesitate to ask any questions if you need help with something!

-Al

Go to Top