Archive for the ‘Virtualization’ Category

To migrate the virtual machine and SQL Server to a different datastore:

Note: The ESX host must be able to see the source and target datastores.
1.Close all vSphere Client connections to vCenter Server.
2.Connect vSphere Client directly to the ESX host where vCenter Server and SQL Server virtual machines are running.
3.Shutdown the vCenter Server virtual machine.
4.Shutdown the SQL Server virtual machine.
5.Right-click the vCenter Server and SQL Server virtual machines in the inventory and choose Remove.
6.Using Datastore Browser, create the destination folders, right-click the virtual machine files, and copy them.

Note: Alternatively, you can also run this command to clone the vmdk files:

vmkfstools -i

7.In vSphere Client, browse the new datastore and add the copied virtual machines to inventory.

To add the copied virtual machines:

a.Locate the .vmx file.
b.Right-click and choose Add to Inventory.

8.In vSphere Client, start the SQL Server virtual machine and verify that SQL Server is up and running.
9.In vSphere Client, start the vCenter Server virtual machine.
10.Close all vSphere Client connections to ESX.
11.Open a vSphere Client connection to vCenter Server.
12.Remove any orphaned virtual machines from inventory.

Esxi 4.1 Command Line

Posted: June 24, 2011 in Virtualization

Get list of all VM’s
# vim-cmd vmsvc/getallvms

# get power stat
vim-cmd vmsvc/power.getstat 10

# turn off
vim-cmd vmsvc/power.off 10
# turn on
vim-cmd vmsvc/power.on 10