Tuesday, September 29, 2009

Shiny Heartgold Pokemon

OneLiner 1: Virtual Machines running on a Cluster


sure I'm not the only manager to VMware at some point has been a partner with one of the most innocent questions that we can do:
    "How many and what virtual machines are running on the cluster? "
  • . As you can guess, the task is not to be particularly complicated, but if the number of the above is high, a simple task, we turn to a tedious task. Precisely this has been the question I have done today ... so I decided to pull powershell, or to be more accurate PowerCLI
, and make not a script (which seemed too cumbersome for a simple list) but a oneline
(ie, a script that deals one line). Well, here I leave a oneliner that is responsible for obtaining the list of all virtual machines running on a particular cluster:
    (Get-View $ (Get-Cluster cluster
  • ). Id). Host that are running under the control of your virtual center, the oneliner would:

(Get-VMHost any tool that fully satisfies my needs, so I pulled scripting (masters, what I do when I find a tool that meets my needs). The result of those hours of programming has been mDiff
, a small script that takes as POSH single input parameter, a list of files or directories to compare (platform independent they are in the local disk or published in a shared folder ) and calculates the MD5 signature of each of the elements to compare, presenting a report in HTML with the result of the comparisons. The script you can download as usual from my dropbox: http://dl.getdropbox.com/u/1039818/Blog/Windows/mdiff.ps1 To run you will need the v2 POSH )

Wednesday, September 23, 2009

Why Do My Breasts Suddenly Hurt And Veins

Despiste 4: Compare the contents of multiple directories

Hello everyone. As promised, I hope to bring some things to this blog. At the moment I start to have some time to make some tutorials on network security and wireless. Talk about VPN, EoIP, PPPoE, WEP, WPA (WEP2), WPA2, etc.


A greeting and I hope to see you soon around here.

Tuesday, September 22, 2009

Inexpensive Gm Extended Warranty



Who has not ever happened that you have to delete a file and can not because there is some other process has it open?. If you're a Unix administrator the solution is simple, you make a
fuser on the file / directory / partition in question and get the PID of the process that you are doing the Passover. If we talk about is a Windows system (for version 2000), things change a bit, since there is no tool in the very system that allows us to obtain the desired PID. But one thing is that the system does not have a tool that will solve the problem and quite another is that there is no tool to provide us the desired solution. In this case the saving tool suite is part of the sysinternals tools, handle. This command, which takes as one of its parameters, the name of the file we have blocked, reports on all handlers ( file descriptors) that has opened the system and gives us, among other things, the PID of the process that uses the file descriptor. Now only choose one of the following two options: Going to


task manager, locate the PID that interests us and stop the process (so to kill I never liked:))
handle Use the command itself with the-c
, ie
handle-c 237. If this option is the one that you like, be careful with the process that paradise will be that one big topeis system.
Here you have a list of default system processes.
This procedure is valid for all Windows since 2000. Since XP has entered the command openfiles
showing on and off the open files on the system. The main advantage of handle is also permitted to disconnect open files on remote systems.

Wednesday, September 16, 2009

Card Messages For Hens Night

Senile Other Despiste 3: Identify the processes that access a file


One of the problems I have ever met VMWare managing the farm has been unable to move or delete a virtual machine, getting the error "Could not delete the file" from the Virtual Infrastructure Client.


operations that led me to this error were:
Trying to delete the virtual machine (VM1 "for example) from the option VIClient Delete from disk. When launching this command runs successfully. However, when I reviewed the datastore for maintaining the files of the virtual hard disks (*-
flat.vmdk
) and the swap file (*. vswp

).

If I try to delete files directly from the Sevice Console (
in the directory / vmfs / volumes / ) with the command rm
Running the
command grep-ir " vm1
" *
the directory / proc / vmware / vm
displays the following output:
  1. 1382/names: VMID = 1382 pid =- 1 cfgFile = "/ vmfs/volumes/48b776c0-7387a6c0-da4e-00215aee45bc/vm1 /
  2. vm1
. vmx" uuid = "50 26 f1 98 a4 f6-f8 a8 68 3c 0f eb 2c b7 f1 71 "displayName =" " 1382/userRPC: Total vmm0: vm1

vmm1: vm1
vmm2:
    vm1
  • vmm3: vm1 1383/userRPC: Total vmm0: vm1
  • vmm1: vm1 vmm2: vm1 vmm3: vm1
1384/userRPC: Total vmm0: vm1 vmm1: vm1 vmm2: vm1 vmm3: vm1 1385/userRPC: Total vmm0:

vm1 vmm1:
vm1 vmm2: vm1 vmm3: vm1
From this output, the information we are interested in the above output is the process ID (pid, bold). You see, the pid is set to -1 , so that the solution presents vmware not effective. The problem is that the process that locks the files in that virtual machine is not running in the COS but in the VMKernel, which we access the area of \u200b\u200bexecution of this order to get the pid of interest.
The procedure to remove the block is as follows : VMID Get the virtual machine locked. Run the command
vm-support-x Locate the associated wid VMID by command cat / proc / vmware / vm / / cpu / status I have served as a reference http://communities.vmware.com/thread/151762
http://communities.vmware.com/message/948937 # 948937 http : / / communities.vmware.com/thread/150351

Thursday, September 3, 2009

Dsc Alarm Trouble Light On Alarm Beeping

forgetfulness 2: When trying to delete a virtual machine from one datastore in a SAN from the DataStore Browser displays the message "Could not delete file"

Finally, because as I promised here I leave the first of my forgetfulness. This is a PowerShell script that compiles all the privileges provided in a folder hierarchy that is passed as a parameter. The script itself is an aid to describing how to run it. http://dl.getdropbox.com/u/1039818/Blog/Windows/listACL.ps1 (v0.4)
http://dl.getdropbox.com/u/1039818/Blog/Windows/versiones% 20antiguas/listACL_v03.ps1 (v0.3) http://dl.getdropbox.com / u/1039818/Blog/Windows/versiones% 20antiguas/listACL_v02.ps1 (v0.2)
For those who use git: git: / / gist.github.com/166397.git As you can see you yourself are missing some things to improve, such as the HTML report of JavaScript responsible for getting the directory tree or draw a tree structure that represents the extent of user access to folders directory. But that in sucensivas versions:)