Advertisement Header

Tuesday 17 August 2010

Howto: Rename a VM

There are a couple of ways to rename a Virtual Machine, but there are two in my opinion that stand out:
  1. Shutdown the VM
  2. Rename the VM in VirtualCenter
  3. Migrate the VM and move it to another Datastore
  4. done!
And from the service console:
  1. vmware-cmd -s unregister /vmfs/volumes/datastore/vm/vmold.vmx
  2. mv /vmfs/volumes/datastore/vm-old /vmfs/volumes/datastore/vm-new
  3. cd /vmfs/volumes/datastore/vm-new
  4. vmkfstools -E vm-old.vmdk vm-new.vmdk
  5. find . -name ‘*.vmx*’ -print -exec sed -e ‘s/vm-old/vm-new/g’ {} \;
  6. mv vm-old.vmx vm-new.vmx
    for every file that hasn’t been renamed (.vmsd etc.)
  7. vmware-cmd -s register /vmfs/volumes/datastore/vm-new/vm-new.vmx
  8. done!

Monday 16 August 2010

VMware Workstation Unrecoverable error VMX

If we have a issue wot Resume windows which is in suspended mode and if we get below error:


Then we need to delete respective vmss file from the folder where the VM configuration files are located.

Thursday 12 August 2010

Run Commands Remotely in Windows

rsh and rexec commands (inbuilt) and we can use PsExec.exe

RSH:
---
Runs commands on remote hosts running the RSH service.

RSH host [-l username] [-n] command

host Specifies the remote host on which to run command.
-l username Specifies the user name to use on the remote host. If
omitted, the logged on user name is used.
-n Redirects the input of RSH to NULL.
command Specifies the command to run.

Rexex:
------
Runs commands on remote hosts running the REXEC service. Rexec
authenticates the user name on the remote host before executing the
specified command.

REXEC host [-l username] [-n] command

host Specifies the remote host on which to run command.
-l username Specifies the user name on the remote host.
-n Redirects the input of REXEC to NULL.
command Specifies the command to run.