VMware Auto Deploy already registered / RuleEngine

I had this weird plugin error the other day which bothered me on Friday. I decided to go fixing it. So after poking around in the vCenter installed software list. I couldn’t find the Auto Deploy in the list, so I figured due to my recent vCenter reinstallation while keeping the database, I forgot to reinstall Auto Deploy. I went ahead and started the Auto Deploy setup from the DVD again, until I received this weird looking error. Apparently the setup thought (and decided correctly) that Auto Deploy was already installed in my vCenter. ...

September 3, 2017 · 2 min · 249 words · christian

PowerCLI: Delete all snapshots by name

I have the issue that we use a cloud automation software, which for whatever reason failed to delete the hypervisor snapshots. Now I was looking into a quick way to delete all those 520 snapshots with PowerCLI, and I found something pretty quick. Based on that, I came up with my own quick PowerCLI one-liner, that’ll list all VMs and their snapshots: 1 Get-VM | Get-Snapshot | Where { $_.Name -like "201502*" } | Format-Table -Property VM, Name, Created, Description, SizeMB -AutoSize Now, I could use another one-liner to delete all snapshots, that’ll look like this: ...

February 23, 2015 · 2 min · 231 words · christian

Quick-Add a bunch of Virtual Machine Port-Groups from CSV

Well, I’m currently migrating between different cluster layouts, and I had to create the new PortGroups on the old hosts, in order for me to switch between old and new hosts. 1 2 3 4 5 6 7 $vmhosts = Get-Cluster "UCSCL01-02" | Get-VMHost foreach ($vmhost in $vmhosts) { import-csv -Delimiter ";" .\pg.csv | foreach { $vmhost | Get-VirtualSwitch -Name "vSwitch3" | New-VirtualPortGroup ` -Name $_.portgroup -VLanId $_.vlanid } } And the corresponding CSV would look like this: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 portgroup;vlanid 1700_routers;1700 1701_routers;1701 1702_routers;1702 1703_routers;1703 1704_routers;1704 1705_routers;1705 1706_routers;1706 1707_routers;1707 1708_routers;1708 1709_routers;1709 1710_routers;1710 1711_routers;1711 1712_routers;1712 1713_routers;1713 1714_routers;1714 1715_routers;1715 1716_routers;1716 1717_routers;1717 1718_routers;1718 1719_routers;1719 2000_virtual-machines;2000 2001_virtual-machines;2001 2002_virtual-machines;2002 2003_virtual-machines;2003 2004_virtual-machines;2004 2005_virtual-machines;2005 2006_virtual-machines;2006 2007_virtual-machines;2007 2008_virtual-machines;2008 2009_virtual-machines;2009 2010_virtual-machines;2010 2011_virtual-machines;2011 2012_virtual-machines;2012 2013_virtual-machines;2013 2014_virtual-machines;2014 2015_virtual-machines;2015 2016_virtual-machines;2016 2017_virtual-machines;2017 2018_virtual-machines;2018 2019_virtual-machines;2019

January 3, 2015 · 1 min · 160 words · christian

VMware: New VirtualCenter 2-5 Update 4

As many people on the VM-Planet already blogged about this, I ain’t gonna write just about it. Let’s turn the clock back a few months, to January 2008. As the institution I work for, is part of the DFN we took the opportunity to be a part of the " I want you to run our RA"-gang. In January 2008 we thought about changing the vCenter certificate. Now, apparently there’s a slight difference between the DFN-PCA and what VMware considers common practice. ...

August 8, 2014 · 2 min · 242 words · christian

VMware templates: post-processing for SUSE Linux Enterprise Server and openSUSE

Well, I’ve been fiddling around with SLES and openSUSE VMware templates. I know it’s a stupid idea when you have a PXE server from which you could install this in a matter of minutes (seriously the SLES PXE installation takes about 5 minutes). However, when dealing with DMZ’s (yeah, they exist!) you usually don’t have any PXE servers there. So I decided to go with simple VMware templates (like we do with Windows already), but had to iron out a few kinks. ...

November 21, 2013 · 3 min · 433 words · christian

vmware-config-tools-pl finished with Could not find Parent Node

Well, today I encountered a old problem (or so I thought). Basically a specific udevadm version causes the vmware-config-tools.pl script to error out like this: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 The vmblock enables dragging or copying files between host and guest in a Fusion or Workstation virtual environment. Do you wish to enable this feature? [no] !!! [EXPERIMENTAL] !!! VMware automatic kernel modules enables automatic building and installation of VMware kernel modules at boot that are not already present. By selecting yes, you will be enabling this experimental feature. You can always disable this feature by re-running vmware-config-tools.pl. Would you like to enable VMware automatic kernel modules? [no] No X install found. Could not find Parent Node... I’ve had encountered this before in the past, and before there was some explanation on the VMware forums, which I couldn’t locate. Lucky me, the VMware Tools updater keeps modified versions of vmware-tools-config.pl around. So I ended up creating this short diff, so that I may find it in the future - if I still need it: ...

September 9, 2013 · 2 min · 247 words · christian

VMware ESXi - Free memory limits corrected

Well, a coworker of mine asked me about this. Since I didn’t know (yeah, I don’t know everything) I went to my trusted friend - Google - and searched for it. There seems to be a lot of confusion about this, so I thought I’d clarify this. I ended up putting a license to one of my hosts in vCenter. Yeah well, the host has a bit more memory than the allowed 32GB vRAM per Socket (the host has two sockets) - thus you’re allowed to have 64GB RAM if your host has two sockets.

April 28, 2013 · 1 min · 95 words · christian

Installserver: Publish a VMware ESX ISO - register-vmware

Here’s an old script, that also uses the magic provided by pxe-menu-generation (the script I posted before), but for VMware ESX/ESXi. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 #!/bin/bash TFTP_DIR=/srv/tftp INSTSRC_DIR=/srv/instsrc if [ -z $@ ] ; then echo "Usage: register-vmware <path to iso-file> labelname" exit 1 fi #set -x ISO_FILE=$1 mkdir /mnt/loop mount -o loop $ISO_FILE /mnt/loop if [ -f /mnt/loop/packages.xml ] ; then # Determine ISO information OS_LABEL="$( grep "<name>" /mnt/loop/packages.xml | sed -e "s,<name>,," -e "s,</name>,," )" OS_NAME="$( grep "<ProductLineId>" /mnt/loop/packages.xml | sed -e "s,<ProductLineId>,," -e "s,</ProductLineId>,," )" OS_RELEASE="$( grep "<version>" /mnt/loop/packages.xml | sed -e "s,<version>,," -e "s,</version>,," )" OS_BUILD="$( grep "<release>" /mnt/loop/packages.xml | sed -e "s,<release>,," -e "s,</release>,," )" shopt -s extglob OS_LABEL=${OS_LABEL##*( )} OS_NAME=${OS_NAME##*( )} OS_RELEASE=${OS_RELEASE##*( )} OS_BUILD=${OS_BUILD##*( )} elif [ -f /mnt/loop/README.txt ] ; then OS_LABEL="" OS_NAME="" OS_RELEASE="" OS_BUILD="" fi # Create directories mkdir -p $TFTP_DIR/boot/$OS_NAME/$OS_RELEASE-$OS_BUILD mkdir -p $TFTP_DIR/pxelinux.cfg/$OS_NAME mkdir -p $INSTSRC_DIR/$OS_NAME/$OS_RELEASE-$OS_BUILD #set +x # Copy CD/DVD content rsync -av /mnt/loop/* $INSTSRC_DIR/$OS_NAME/$OS_RELEASE-$OS_BUILD # Copy the PXE boot file (initrd/kernel) cp $INSTSRC_DIR/$OS_NAME/$OS_RELEASE-$OS_BUILD/isolinux/initrd.img $TFTP_DIR/boot/$OS_NAME/$OS_RELEASE-$OS_BUILD/initrd.img cp $INSTSRC_DIR/$OS_NAME/$OS_RELEASE-$OS_BUILD/isolinux/vmlinuz $TFTP_DIR/boot/$OS_NAME/$OS_RELEASE-$OS_BUILD/vmlinuz # Create the PXE boot menu cat > $TFTP_DIR/pxelinux.cfg/$OS_NAME/$OS_NAME-$OS_RELEASE-$OS_BUILD.menu << EOF #LABEL $OS_LABEL $OS_RELEASE - build $OS_BUILD #OSNAME $OS_NAME #OSARCH x86_64 MENU TITLE VMware Installservice MENU BACKGROUND addons/background-vmware.png MENU COLOR screen 37;40 #80ffffff #00000000 MENU COLOR border 0 #ffffffff #ee000000 std MENU COLOR title 0 #ffffffff #ee000000 std MENU COLOR unsel 0 #ffffffff #ee000000 std MENU COLOR sel 0 #ffffffff #85000000 std MENU COLOR scrollbar 30;44 #40000000 #00000000 MENU COLOR tabmsg 0 #ee000000 #ffffffff std MENU COLOR cmdmark 0 #ff00ff00 #00000000 std MENU COLOR cmdline 0 #ee000000 #ffffffff std MENU COLOR timeout_msg 0 #ee000000 #ffffffff std MENU COLOR timeout 0 #ee000000 #ffffffff std MENU COLOR disabled 0 #ffffffff #ee000000 std MENU COLOR pwdheader 0 #ff000000 #99ffffff rev MENU COLOR pwdborder 0 #ff000000 #99ffffff rev MENU COLOR pwdentry 0 #ff000000 #99ffffff rev MENU COLOR hotkey 0 #ff00ff00 #ee000000 std MENU COLOR hotsel 0 #ffffffff #85000000 std LABEL DESC MENU LABEL $OS_LABEL $OS_RELEASE MENU DISABLE MENU SEPARATOR LABEL kickstart MENU LABEL ^Kickstart Installation KERNEL boot/$OS_NAME/$OS_RELEASE-$OS_BUILD/vmlinuz APPEND initrd=boot/$OS_NAME/$OS_RELEASE-$OS_BUILD/initrd.img vmkopts=debugLogToSerial:1 mem=512M ks=http://install.home.barfoo.org/kickstart/$OS_NAME-$OS_RELEASE-$OS_BUILD.cfg HOSTNAME= IAPPEND 1 TEXT HELP Es ist zu beachten, das mit TAB der Hostname angepasst werden muss! ENDTEXT LABEL netinst MENU LABEL ^Netzwerkbasierte Installation KERNEL boot/$OS_NAME/$OS_RELEASE-$OS_BUILD/vmlinuz APPEND initrd=boot/$OS_NAME/$OS_RELEASE-$OS_BUILD/initrd.img vmkopts=debugLogToSerial:1 mem=512M url=http://install.home.barfoo.org/instsrc/$OS_NAME/$OS_RELEASE-$OS_BUILD IAPPEND 1 MENU SEPARATOR LABEL back MENU LABEL <-- ^Vorherige Ansicht KERNEL addons/vesamenu.c32 APPEND pxelinux.cfg/$OS_NAME.menu EOF umount /mnt/loop rmdir /mnt/loop

July 24, 2012 · 3 min · 494 words · christian

Reoccurring memory limits in vCenter

We recently had, after we migrated from vSphere 4 to vSphere 5, a memory limit in size of the configured memory on each and every VM. Since memory limits on VM level pretty much destroy performance, I went ahead an wrote this simple script to remove all memory limits on all VMs that don’t have “Unlimited” configured: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 param( [string] $vCenter ) # Add the VI-Snapin if it isn't loaded already if ( (Get-PSSnapin -Name "VMware.VimAutomation.Core" -ErrorAction SilentlyContinue) -eq $null ) { Add-PSSnapin -Name "VMware.VimAutomation.Core" } If ( !($vCenter) ) { Write-Host Write-Host "cluster-remove-mem-limits: <vcenter-server>" Write-Host Write-Host " <vcenter-server> - DNS name of your vCenter server." Write-Host exit 1 } Connect-VIServer -Server $vCenter Get-VM | Get-VMResourceConfiguration | Where-Object { $_.memlimitmb -ne '-1' } |` Set-VMResourceConfiguration -memlimitmb $null Disconnect-VIServer -server $vCenter -Confirm:$false This script is basically what the guy over at get-admin.com did, just only for memory limits.

January 13, 2012 · 1 min · 170 words · christian

PowerCLI undamp; Windows jump list for recent items set to zero

Today I had to install PowerCLI on my workstation. When I tried launching it for the first time, it simply opened and closed again instantly. After browsing the VMware community for this error and not finding a useful solution, I ended up googling the error. As it turns out, this only happens when you did set the " Number of recent items to display in jump lists" to something less than 4. ...

July 5, 2011 · 1 min · 89 words · christian