To retrieve the settings for reservation of both memory and CPU run the following PS script
## retrieve the values for MemReservationMB for the given VMs
Get-Cluster "myCluster" | Get-VM | Get-VMResourceConfiguration | select VM,MemReservationMB
## retrieve the values for CPUReservationMhz for the given VMs
Get-Cluster "myCluster" | Get-VM | Get-VMResourceConfiguration | select VM,CPUReservationMhz
If you want to go through a set all VM memroyCPU reservations to "0" run the following
## set the MemReservationMB to 0 for given VMs
Get-Cluster "myCluster" | Get-VM | Get-VMResourceConfiguration | Set-VMResourceConfiguration -MemReservationMB 0 -Confirm:$false
## set the CPUReservationMhz to 0 for given VMs
Get-Cluster "myCluster" | Get-VM | Get-VMResourceConfiguration | Set-VMResourceConfiguration -CPUReservationMhz 0 -Confirm:$false
Showing posts with label ESX4. Show all posts
Showing posts with label ESX4. Show all posts
Tuesday, 25 October 2011
Wednesday, 11 May 2011
ESXTOP logging to Windows File share
1. Create a share on a windows server.
2. Create a local user on the same server and give them full access to the share you just created.
3. On your ESX server enable SMB client (ports tcp:137-139,445) on your ESX firewall so that you can reach your windows share.
4. Logon your console or Putty with root user and create a new folder to store your .csv results.
mkdir /mnt/logging
5. To create the Windows mount point
mount -t cifs //Servername/ESXLogging /mnt/logging -o username=ESXLogging,password=L0gging
6. After you have setup the above you now need to run ESXTOP and point it to the mount point.
esxtop -b -d 10 -n 77760 >/mnt/logging/ESXSERVER_DATE.csv
A good online reference for this is http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=242.
2. Create a local user on the same server and give them full access to the share you just created.
3. On your ESX server enable SMB client (ports tcp:137-139,445) on your ESX firewall so that you can reach your windows share.
4. Logon your console or Putty with root user and create a new folder to store your .csv results.
mkdir /mnt/logging
5. To create the Windows mount point
mount -t cifs //Servername/ESXLogging /mnt/logging -o username=ESXLogging,password=L0gging
6. After you have setup the above you now need to run ESXTOP and point it to the mount point.
esxtop -b -d 10 -n 77760 >/mnt/logging/ESXSERVER_DATE.csv
A good online reference for this is http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=242.
Thursday, 10 March 2011
Helpful LINUX Commands
This is just some LINUX commands that i have been using on both ESX and XenServer
Control + R - Use this command if you cannot remember commands you have previously run on a host.
history | tail -n40 - Display the last 40 commands you have typed.
ls -lrt | grep "Mar 8" - List all file modified a certain date.
pwd - Shows current working directory.
df -h - displays size usage
Control + R - Use this command if you cannot remember commands you have previously run on a host.
history | tail -n40 - Display the last 40 commands you have typed.
ls -lrt | grep "Mar 8" - List all file modified a certain date.
pwd - Shows current working directory.
df -h - displays size usage
Thursday, 28 January 2010
ESX 4.0 and ESXi 4.0 shutdown and reboot commands
Please check out www.kaztechsolutions.co.uk for more of my technical posts, alternately please call us on 01932 268289.
When virtual machines are running, ESX might not clear the RAID controller's cache if you shut down or reboot ESX host by using the following commands on the service console:
Solution
You can shut down or reboot ESX 4.0 or ESXi 4.0 hosts using any of the following methods:
ESX 4.0
Log in to the ESX service console and perform one of the following steps from the service console to shutdown or reboot ESX 4.0 hosts.
Run the shutdown –r now command to reboot the system.
Note: This command shuts down the virtual machines running on the ESX 4.0 hosts.
Run the reboot command to reboot the system.
Run the poweroff command to shut down ESX. After the shutdown, a message indicates that it is safe to power off your system. Press the power button until the machine powers off. You can then manually reboot the system.
ESXi 4.0
In the console screen of the ESXi 4.0 host, press Ctrl+Alt+F2 to see the Direct Console User Interface (DCUI) screen.
In the DCUI screen, press F12 to view the shutdown related options for the ESXi host.
Press F2 to shut down.
Press F11 to reboot.
ESX 4.0 or ESXi 4.0
From vSphere Client
Before shutting down or rebooting the ESX 4.0 or the ESXi 4.0 hosts, ensure that the hosts are put in maintenance mode. Powering off a managed host disconnects it from vCenter Server, but does not remove it from the inventory.
Shut down or VMotion all virtual machines running on ESX 4.0 or ESXi 4.0 hosts.
Put the ESX 4.0 or ESXi 4.0 hosts in the maintenance mode.
Select the ESX 4.0 or the ESXi 4.0 host you want to shut down.
Right-click the ESX 4.0 or the ESXi 4.0 host that you want to shut down, and select Reboot or Shut Down.
If you select Reboot, the ESX 4.0 or the ESXi 4.0 host shuts down and reboots.
If you select Shut Down, the ESX 4.0 or the ESXi 4.0 host shuts down. You must manually power the system back.
Provide a reason for the shut down or reboot. This information is added to the log.
From vCLI or vMA
To put ESX 4.0 or ESXi 4.0 hosts in the maintenance mode, run the following command from vMA (vSphere Management Assistant) or vCLI (vSphere Command-Line Interface) console screen:
/usr/lib/vmware-vicli/apps/host/hostops.pl --target_host --operation enter_maintenance --url https:///sdk/vimService.wsdl
To reboot ESX 4.0 or ESXi 4.0 hosts, run the following command from vMA or vCLI console screen:
/usr/lib/vmware-vicli/apps/host/hostops.pl --target_host --operation reboot --url https:///sdk/vimService.wsdl
To shut down ESX 4.0 or ESXi 4.0 hosts, run the following command from vMA or vCLI console screen:
/usr/lib/vmware-vicli/apps/host/hostops.pl --target_host --operation shutdown --url https:///sdk/vimService.wsdl
When virtual machines are running, ESX might not clear the RAID controller's cache if you shut down or reboot ESX host by using the following commands on the service console:
- reboot -f
- halt
- shutdown
Solution
You can shut down or reboot ESX 4.0 or ESXi 4.0 hosts using any of the following methods:
ESX 4.0
Log in to the ESX service console and perform one of the following steps from the service console to shutdown or reboot ESX 4.0 hosts.
Run the shutdown –r now command to reboot the system.
Note: This command shuts down the virtual machines running on the ESX 4.0 hosts.
Run the reboot command to reboot the system.
Run the poweroff command to shut down ESX. After the shutdown, a message indicates that it is safe to power off your system. Press the power button until the machine powers off. You can then manually reboot the system.
ESXi 4.0
In the console screen of the ESXi 4.0 host, press Ctrl+Alt+F2 to see the Direct Console User Interface (DCUI) screen.
In the DCUI screen, press F12 to view the shutdown related options for the ESXi host.
Press F2 to shut down.
Press F11 to reboot.
ESX 4.0 or ESXi 4.0
From vSphere Client
Before shutting down or rebooting the ESX 4.0 or the ESXi 4.0 hosts, ensure that the hosts are put in maintenance mode. Powering off a managed host disconnects it from vCenter Server, but does not remove it from the inventory.
Shut down or VMotion all virtual machines running on ESX 4.0 or ESXi 4.0 hosts.
Put the ESX 4.0 or ESXi 4.0 hosts in the maintenance mode.
Select the ESX 4.0 or the ESXi 4.0 host you want to shut down.
Right-click the ESX 4.0 or the ESXi 4.0 host that you want to shut down, and select Reboot or Shut Down.
If you select Reboot, the ESX 4.0 or the ESXi 4.0 host shuts down and reboots.
If you select Shut Down, the ESX 4.0 or the ESXi 4.0 host shuts down. You must manually power the system back.
Provide a reason for the shut down or reboot. This information is added to the log.
From vCLI or vMA
To put ESX 4.0 or ESXi 4.0 hosts in the maintenance mode, run the following command from vMA (vSphere Management Assistant) or vCLI (vSphere Command-Line Interface) console screen:
/usr/lib/vmware-vicli/apps/host/hostops.pl --target_host
To reboot ESX 4.0 or ESXi 4.0 hosts, run the following command from vMA or vCLI console screen:
/usr/lib/vmware-vicli/apps/host/hostops.pl --target_host
To shut down ESX 4.0 or ESXi 4.0 hosts, run the following command from vMA or vCLI console screen:
/usr/lib/vmware-vicli/apps/host/hostops.pl --target_host
Subscribe to:
Posts (Atom)