VMware Communities > VMTN > VMware Infrastructure™ > VI: ESXi 3.5 > Discussions

This Question is Answered

2 "helpful" answers available (6 pts)
10 Replies Last post: Jun 21, 2009 6:41 PM by Aaron1Oregon
Reply

How do I kill Ghetto script once running?

Jun 20, 2009 8:37 PM

Click to view Aaron1Oregon's profile Novice Aaron1Oregon 9 posts since
Jun 20, 2009

I accidently ran the wrong script and now I do not know how to cancel the script. Since it takes many hours to run the back up, I also think it important to be able to cancel it.

I tried these commands to see if it would show as a process in action that I could kill but could not figure it out.

Commands: ps -aef and Ps auxww

Any help will be greatly appreciated. I would also like to know where to look to start learning the basics commands,

it seems like that is what matters most is ability to call commands in putty.

Thanks

Aaron

Reply Re: How do I kill Ghetto script once running? Jun 20, 2009 8:49 PM
Click to view norregaard's profile Expert norregaard 236 posts since
Nov 26, 2007

Hi. You're on the right track. Use the 'ps' command to identify the proces and then kill the process with the 'kill' command.

ps -auxwww | grep <name of process>

kill -9 <process id>

the link below provides a bit more detail:

http://www.vi-tips.com/2009/04/howto-power-off-or-kill-vm-that-is.html

Reply Re: How do I kill Ghetto script once running? Jun 20, 2009 10:06 PM
Click to view @m!t's profile Enthusiast @m!t 53 posts since
Apr 8, 2008
VMware

In ESX 3.5 classic ,all the linux command will work..


Reply Re: How do I kill Ghetto script once running? Jun 21, 2009 8:44 AM
Click to view DSTAVERT's profile Virtuoso DSTAVERT 2,180 posts since
Nov 30, 2003
I would be very careful killing any script. The Ghetto script uses other vmware tools and you may leave those tools in an incomplete state.
.
Reply Re: How do I kill Ghetto script once running? Jun 21, 2009 9:15 AM
in response to: DSTAVERT
Click to view Aaron1Oregon's profile Novice Aaron1Oregon 9 posts since
Jun 20, 2009

Hello All - thank you for responding....

I am a total rookie. I know nothing about Linux by I am quickly realizing it is great to work with.

My problems are this - when I use this command :

Ps auxww

I cannot identify what process is the ghetto script running.

Backing up 4 machines is taking 4-6 hours and I feel once I have more machines, it will be important to be able to kill the process.

I also still get this error every time it starts the back up of the next guest OS:

Disklib_Check() failed for source disk the system cannot find the file specified(25)

Can anyone give general advise and specifics as well?

Reply Re: How do I kill Ghetto script once running? Jun 21, 2009 9:52 AM
in response to: Aaron1Oregon
Click to view DSTAVERT's profile Virtuoso DSTAVERT 2,180 posts since
Nov 30, 2003
Don't use KILL to cure management issues. If you have overly long processes, change the processes. Run the script multiple times, 1 for each VM if you need to. Killing a script or any process should be a last resort "I am in great danger if I don't" situation. Let the script complete. Make this a learning time. You can easily leave the host machine in an unstable condition. The script itself launches other tools to create snapshots, copy files etc. If you kill the script there are other things that won't get cleaned up. Snapshots for instance, partial copies.
Reply Re: How do I kill Ghetto script once running? Jun 21, 2009 10:01 AM
in response to: DSTAVERT
Click to view Aaron1Oregon's profile Novice Aaron1Oregon 9 posts since
Jun 20, 2009
Sound advice, I will break up the back ups to run one a time scheduled.

How long should a back up take running to a NAS drive ?
Running ghetto script for a 55GIG Guest OS is taking 110 minutes,
Sound ok?

Does anyone know what I might need to do to get rid of this error?
Disklib_Check() failed for source disk the system cannot find the file specified(25)

Cloning: Would this be a better option if I would want to be able to switch to a clone if original server starts having problems ? I have 3 Hosts, it sounds like cloning to another host may be better option for providing back up to jump to quickly if I have problems with original guest or host.

Thanks for the help
Aaron
Reply Re: How do I kill Ghetto script once running? Jun 21, 2009 10:46 AM
in response to: Aaron1Oregon
Click to view DSTAVERT's profile Virtuoso DSTAVERT 2,180 posts since
Nov 30, 2003
For the Disklib_Check() error you probably need to provide a little more information. Running in debug mode and testing only. Version of the script etc. Might want to post that question to the ghetto documents area so that lamw can comment.

The speed of the copy looks to be close to 30GB per hour. Not too bad.

You will need to decide what your disaster plan is. How long can your organization be without access to vital information and processes. I wouldn't want to be dependent on a single ESXi host. A second machine as a standby and testing. Having the NFS store attached to both your production host and the standby host would give you the opportunity to test your backup process.

Ghetto creates a copy of the disk files and a copy of the vmx file. That is enough to run the virtual machine but not a true point in time copy. A clone of a machine would also have additional files like memory, bios, etc. and depending on the process and tools used may also not be a true point in time copy.
Reply Re: How do I kill Ghetto script once running? Jun 21, 2009 11:31 AM
in response to: DSTAVERT
Click to view Aaron1Oregon's profile Novice Aaron1Oregon 9 posts since
Jun 20, 2009
Thank you for your response, very good info.

We have set up 3 physical hosts all Dell 2950's with 6 drives per host. I also have datastore on each pointing to same NAS drive with 4 terabytes of storage to use for backups.

I am keeping naming of datastores and set up hosts standard so switching a guest from one to the other will be simple.
Sounds like Cloning is the only way to go to reduce potential downtime.

What do you suggest for cloning? I am using free ESX 3i version.
Ghetto also has a clone script through perl, what do you think of that?

Goal is to avoid any downtime for our customers so certain machines are very critical to a good customer experience.

Thank you for all your help
Reply Re: How do I kill Ghetto script once running? Jun 21, 2009 1:45 PM
in response to: DSTAVERT
Click to view DSTAVERT's profile Virtuoso DSTAVERT 2,180 posts since
Nov 30, 2003
It really depends on the individual VM. The ghetto copy could be all you need. If you have databases then a copy occasionally and traditional sql backups inside the VM could be the answer. Web servers are less critical but you want to capture site updates and maybe logs. Domain controllers have other issues. You can't bring them back on line from a clone without doing AD repair.
You really should look at the recovery process more than anything. Once you have a copy it can be added to inventory and started. Think about each vm individually and what might be the approach to satisfy your disaster requirements. And practice, practice.
Reply Re: How do I kill Ghetto script once running? Jun 21, 2009 6:41 PM
in response to: DSTAVERT
Click to view Aaron1Oregon's profile Novice Aaron1Oregon 9 posts since
Jun 20, 2009
What process do you suggest for making a back up of all files needed for each Guest versus just what Ghetto Script copies?

I really wanted a copy that had all the files needed to just register the guest on same, or different host so I could be up and running quickly without much configuration.

Thanks
Actions