Archive | VMware

Commands to manually remove VMWare Fusion from my mac

This is documented somewhere, but I can never find the cut and paste commands.

I am putting them here:


sudo rm -rf /Library/Application\ Support/VMware/
sudo rm -rf /Library/Application\ Support/VMware Fusion
sudo rm -rf /Library/Preferences/VMware\ Fusion

rm -rf ~/Library/Application\ Support/VMware Fusion
rm -rf ~/Library/Caches/com.vmware.fusion
rm -rf ~/Library/Preferences/VMware\ Fusion
rm -rf ~/Library/Preferences/com.vmware.fusion.LSSharedFileList.plist
rm -rf ~/Library/Preferences/com.vmware.fusion.LSSharedFileList.plist.lockfile
rm -rf ~/Library/Preferences/com.vmware.fusion.plist
rm -rf ~/Library/Preferences/com.vmware.fusion.plist.lockfile
rm -rf ~/Library/Preferences/com.vmware.fusionDaemon.plist
rm -rf ~/Library/Preferences/com.vmware.fusionDaemon.plist.lockfile
rm -rf ~/Library/Preferences/com.vmware.fusionStartMenu.plist
rm -rf ~/Library/Preferences/com.vmware.fusionStartMenu.plist.lockfile

Install OpenManage Server Administrator on ESXi5 via PowerCLI

Dell has changed how you install OpenManage Server Administrator on ESXi5. To do this via PowerCLI, use the following steps.

  1. Download the new vib file: OM-SrvAdmin-Dell-Web-6.5.0-542907.VIB-ESX50i_A02.zip (most recent can be found here)
  2. Extract it and upload the folder via the vSphere client (browse datastore and upload the extracted folder)
  3. Put the ESXi5 box into maintenance mode.
  4. From PowerShell with the PowerCLI installed:
    1. Connect- VIServer -Server x.x.x.x
    2. Install-VMHostPatch -HostPath /vmfs/volumes/datastore1/OM-SrvAdmin-Dell-Web-6.5.0-542907.VIB-ESX50i_A02/metadata.zip (or where ever you uploaded it)

Note: You can no longer connect directly to that web interface on port 1311 of the ESXi5 box. Now, you now have to go to a different OpenManage Server Administrator install (log out if you are auto logged in) and select “Manage remote node”. That is a pain.

VMware Fusion 4 – Did they move vmrun?

Did they move vmrun in VMware Fusion 4?

In version 4, I find it here: “/Applications/VMware Fusion.app/Contents/Library/”

But this documentation says that the command should be in “/Library/Application Support/VMware Fusion”, but I found it here”/Applications/VMware\ Fusion.app/Contents/Library/vmrun”

I don’t see anything in the release notes.

Anyone?

 

VMware ESX suspended machine won’t resume because of missing hardware

We recently had some downtime to physically move a rack for our server room expansion. One of the servers we were shutting down was a VMware ESX host. When I tried to resume the machine, I received an error saying “Module DevicePowerOn power on failed. Unable to open the SCSI device . . .”

We had removed a daisy chained tape device, and I forgot! I wanted to remove it from the hardware profile, but I couldn’t because the machine was suspended.

So  . . . , I can’t power on, I can’t power down, and I can’t edit the hardware profile because the machine is suspended. Crap.

I sshed into the ESX box and tried: vmware-cmd stop hard. I received the error : “The attempted operation cannot be performed in the current state . . .”.

Crap.

The only way I could get the machine powered on, was to comment out the missing scsi device in the VM’s vmx file. After that, I could power on the machine no problem. Hope that may help someone!

Install VMware ESX4.1 via PXE

We recently received 2 new servers that I needed to install the newest ESX on. I downloaded the IOSs, but I did not want to have to burn them. So I decided to try and install ESX via PXE. I did not have an answer file (kickstart), so I wanted to run an interactive install from PXE.

I already had a PXE/TFTP server configured, so I just needed to add a new instance to the pxelinux.cfg file.

LABEL VMWARE-ESX
KERNEL images/vmware/esx/vmlinuz
APPEND initrd=images/vmware/esx/initrd.img vmkopts=debugLogToSerial:1 mem=512M url=http://server.name.local/vmware

The different options for “APPEND” can be found here. Works like a charm.

CentOS, NTPD, VMware and sleeping.

I have a MacPro at home, and I am running VMware Fusion on it. At night, I sleep the machine to save electricity. I have a CentOS guest running and the time is always out of sync. After the VM is restored from sleep, the NTP service is no longer running and my time really drifts.

I finally sat down and tried to figure out my time sync issues on CentOS and VMware. This document explains it all. At the bottom they say you should turn off VMware tools time sync and use NTPD.

To install NTPD (with the recommended changes from the above document)

  1. yum install ntp
  2. chkconfig ntpd on
  3. sed -i 1i”tinker panic 0″ /etc/ntp.conf
  4. sed -i “s/^server\t127.127.1.0/#server\t127.127.1.0/g” /etc/ntp.conf
  5. sed -i “s/^fudge\t127.127.1.0/#fudge\t127.127.1.0/g” /etc/ntp.conf
  6. service ntpd start

The “tinker panic 0” is the most important part. Now when my VMware Fusion wakes and the CentOS guest powers on, NTP gets everything setup correctly.

VMware ESX and vmdks larger than 256gb

News to me! if you want to create a vmdk larger than 256 gb, you need to blow away the datastore and re-create it with a larger block size!

  1. Move everything off the datastore.
  2. Under the configuration tab, Right click and delete the store
  3. Click add storage and it will find the unused disk
  4. and when Creating the new datastore, change the block size to accommodate the largest vmdk you want to create:
    • 1M =256gb, 2M=512gb, 4M=1T,8M=2T

How to update ESXi 4.1 without vCenter

I wanted to update a standalone ESXi box from 4.1 to 4.1 Update 1. Here is how I went about it:

  1. Downloaded the update on a windwos box from here and unziped it
  2. Open the viClient datastore browser and upload the unzipped folder. If you put it off the root of your datastore, the path will be:
    1. /vmfs/volumes/datastore1/update/update-from-esxi4.1-4.1_update01
  3. Install the VMware vSphere PowerCLI – which is a Windows PowerShell interface to the vSphere API
  4. Add the VMware cmdlts to your PowerShell session: add-pssnapin “VMware.VimAutomation.Core”
  5. Put the ESXi server into maintenance mode.
  6. In PowerShell, connect to the ESXi server:  Connect-VIServer servername.domain.local
  7. In PowerShell: Install-VMHostPatch -HostPath /vmfs/volumes/datastore1/update-from-esxi4.1-4.1_update01/metadata.zip
  8. The result was: WARNING: The update completed successfully, but the system needs to be rebooted for the changes to be effective.
  9. Reboot!

The summary below was also returned:

Id                                              VMHostId IsIns IsApp Needs Needs
                                                         talle licab Resta Recon
                                                         d     le    rt    nect
--                                              -------- ----- ----- ----- -----
cross_oem-vmware-esx-drivers-scsi-3w-9xxx_... ...ha-host False True  True  False
cross_oem-vmware-esx-drivers-net-vxge_400.... ...ha-host False True  True  False
deb_vmware-esx-firmware_4.1.0-1.4.348481      ...ha-host False False True  False
deb_vmware-esx-tools-light_4.1.0-1.4.348481   ...ha-host True  True  False False

Dell OpenManage Server Administrator on ESX

This is how I installed Dell OpenManage Server Administrator on our VMware ESX 4.1 box

tar -xzf OM-SrvAdmin-Dell-Web-LX-6.4.0-1266_A00.4.tar.gz
cd linux/supportscripts/
./srvadmin-install.sh -x
esxcfg-firewall -o 1311,tcp,in,OpenManageRequest
./srvadmin-services.sh restart

Mostly a reminder for me, but maybe a search engine will bring someone here, and it would be helpful.

My PowerShell PowerCLI VMware guest provisioning script

This script will provision a 4GB Ram, 40 GB HD Server 2008 R2 VM, set the CD to an OSD iso, set the BootDelay to 5 seconds, and start the machine


$vmhost = Get-VMHost "server.name.local"
$ds = Get-Datastore "server:storage1"
$rp = get-resourcepool -id "ResourcePool-resgroup-22"
$nn = "NetworkName"
$gi = "windows7Server64Guest"
$iso = "[server:ISOs] Folder/OSD.iso"

####
$vmname = "VMGeust01"
New-VM -name $vmname -VMHost $vmhost -numcpu 1 -DiskMB 40960 -memoryMB 4096 -datastore $ds -guestID $gi -resourcepool $rp -cd -NetworkName $nn
Get-VM $vmname | Get-CDDrive | Set-CDDrive -IsoPath $iso -StartConnected $true -Confirm:$false

$value = "5000"
$vm = Get-VM $vmname | Get-View
$vmConfigSpec = New-Object VMware.Vim.VirtualMachineConfigSpec
$vmConfigSpec.BootOptions = New-Object VMware.Vim.VirtualMachineBootOptions
$vmConfigSpec.BootOptions.BootDelay = $value
$vm.ReconfigVM_Task($vmConfigSpec)

Start-VM -VM $vmname

Powered by WordPress. Designed by WooThemes