Posts tagged VM

Increasing the size of a virtual disk

0

In ESX 4.1, you can extend and add virtual disks to a virtual machine when it is powered on (after installing VMware Tools).

1. Open VMware Infrastructure (VI) Client and connect to VirtualCenter or the ESX host.

2. Right-click the virtual machine.

3. Click Edit Settings.

4. Select the virtual disk you want to increase

5. Increase the size of the disk.

Note: If this option is greyed out then the disk may be running on snapshots or the disk may be at the maximum allowed size depending on the block size of the datastore

6. Follow the steps Increasing the size of a disk partition (1004071) so the guest operating system is aware of the change in disk size.

Note: If you´re using Windows Server 2008 R2 you only have to open Computer Management > Storage > Disk Management and eventually press F5 to refresh the view, right-click on your drive you want to increase, choose Extend Volume… and to follow the instructions given in the wizard.

Source:http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1004047

Start and Stop Windows services via PowerShell

0

Since the Windows Update service is deactivated in the VMware View environment we have to ‘activate’ and start the service to update the VM.

Here you find some PowerShell?scripts which are starting and stopping this service and you´ll be able to update your VM.

Start Service:

Clear-Host
$srvName = 'wuauserv'
$servicePrior = Get-Service $srvName
'$srvName is now ' + $servicePrior.status
Set-Service $srvName -startuptype manual
Start-Service $srvName
$serviceAfter = Get-Service $srvName
'$srvName is now ' + $serviceAfter.status

Stop Service:

Clear-Host
$srvName = 'wuauserv'
$servicePrior = Get-Service $srvName
'$srvName is now ' + $servicePrior.status
Stop-Service $srvName
$serviceAfter = Get-Service $srvName
Set-Service $srvName -startuptype disabled
'$srvName is now ' + $serviceAfter.status
Go to Top