Showing posts with label vmware. Show all posts
Showing posts with label vmware. Show all posts

Monday, July 1, 2013

Excessive snapshot size but Snapshot Manager shows no snapshots?

Okay, so we got the alarm about excessive snapshot size and deleted snapshots.

It came back a while later and said "Unable to access file <unspecified filename> since it is locked"

Looking a little more closely, the snapshot was from commvault and it hadn't "Released disk lease" yet.

The end result is we still have a snapshot, which you can tell from the files in the VM's folder in the datastore, but snapshot manager shows no snapshots.

FIX:
Take a snapshot manually.

It will take a minute or so extra, but in the end it shows not only the one you created, but also the "Consolidate Helper- 0" snapshot


Friday, June 28, 2013

OVF

So, I rarely have to work with OVF files and they're a big pain every time I do and there are probably better ways to do this, but here's what I got to work:

C:\Program Files\VMware\VMware OVF Tool>ovftool --network="<network you want to connect the VM to>" -ds=<datastore name> "<full path to appliance>" vi://<user>:<password>@<vcenter fqdn>/?ip=<ip of the host you want to initiate the copy to>

One additional thing I had to overcome was that the appliance was set to be hardware level 9 and I needed this in a v4.1 environment ... and the .mf file has checksums on the .ovf and the .vmdk

Special thanks to me already having a XUBUNTU instance going and to Jon Giffard's Blog for the instruction:

"openssl sha1  <filename>
This will give you the sha1 checksum.  Now edit the MF file and replace the old value with your new one.
vSphere will now deploy your appliance without complaining of a checksum error"

Friday, May 10, 2013

So yes, you can install Windoes8/Server12 in a VMware 4.x environment using the bios.400.rom trick.

That has worked well enough, but I learned a couple somethings over the last week.

Long story, but I'm moving my VMs to new datastores.

I could not get a Server12 VM to move. It is a heftier than normal VM, weighing in at 800GB and the move would go for hours and fail with:

A general system error occurred: Source detected that destination failed to resume.

Frustrating.

Eventually I asked the server owner if I could take it down for a day and get the move done, which went well until I went to power the VM back up.

Could not open bios.440.rom (No such file or directory).

I looked and no, the bios.440.rom file had not been moved. I re-uploaded it and the server booted fine.

Thursday, November 29, 2012

VMware View Third-Party Certificates (Pre 5.0.1)

I always have to go back and do the searches again to find these when I need them.

For pre-View 5.0.1, doing the cert with keytool... These are the resources you need:

Familiarize yourself with both of them before proceeding. The TcpDump one is particularly good, buit it omits making a 2048-bit request.

TcpDump

VMware KB 1008705

Friday, October 12, 2012

FIX - VMware Windows 7 VM with no Audio [ESXi]

I have a template we make some persistent VMs from and they haven't been getting audio. For some reason it took me a little bit to track this one down.

Device Manager, add Legacy Hardware, Have Disk

C:\Program Files\Common Files\VMware\Drivers\vmwvaudio\vmwvaudio.inf

No reboot needed.

[If you don't have this directory you'll need to copy it from a system with working audio.]


Tuesday, August 28, 2012

TIP: vMotion VLAN or Else

The impact of not following the 'best practice' of putting my vMotion and Management traffic on a dedicated VLAN seems to have finally showed itself.

I've been on a persistent VM for 3+ years now. It's been great, except for occasionally I'd get 'Session Lost!' on my zero client. It didn't happen often enough to concern me ... until it did. It was around this time that we started noticing several of us were being kicked off simultaneously. Those of us on 100Mb had issues, but not those of us on 1000Mb.

Thanks to having Riverbed Cascade we could see that the smaller ports were being flooded and overwhelmed by broadcasts from a vMotion port. Two days after establishing the VLAN and I have seen zero sessions lost.

http://communities.vmware.com/message/1736018

Thursday, August 9, 2012

Drivers and Patches via CLI


Host ESX/ESXi Patches via CLI:

I've had to re-look this up a few times and there's a rather good (and similar) write-up here but these are my notes.
...

First things first, you need to be sure of know what you have now.

Patches:

For Build Numbers, if 'vmware -v' doesn't do it, try 'rpm -qa |grep -i vmware-esx-vmx', otherwise check KB 1012514.

Search for the version of vSphere you want to update and download the zip to your HD.


Drivers and Driver Updates:

If you're getting drivers and they're in an ISO you'll need to extract the .zip from the offline-bundle folder.
You'll also want to check what version you're running before install and after final reboot.

In the case of QLogic drivers: cat /proc/scsi/qla*/* |more

Then go and the get drivers you need.


Install:

These examples use the location c:\vmwareupdates

vicfg-hostops.pl -o enter -url https:// <hostname or IP>/sdk/webservice
Enter username: root
Enter password:
Host <hostname> entered into maintenance mode successfully.

vihostupdate.pl -i -bundle c:\vmwareupdates\<name of package.zip> -url https:// <host name or IP>/sdk/webservice
Enter username: root
Enter password:
Please wait patch installation is in progress ...
The update completed successfully, but the system needs to be rebooted for the changes to be effective.

vicfg-hostops.pl -o reboot -url https:// <hostname or IP>/sdk/webservice
Enter username: root
Enter password:
Host <hostname> rebooted successfully.

vicfg-hostops.pl -o exit -url https:// <hostname or IP>/sdk/webservice
Enter username: root
Enter password:
Host <hostname> exited from maintenance mode successfully.

Tuesday, August 7, 2012

Simple & Easy VMware Thin Client

How about a 38.4MB linux distro with View open client that is simple to set up and works great?

http://repurpose.vmwaredotg.com/tcbuilder/

Go to the build page and put in your criteria and it compiles an ISO for you.

You can burn that to CD, or put it on a thumb drive. [I used UNetbootin in Ubuntu to put it on a thumb drive.]

One gotcha is that, by default, the View client uses the time setting of the client. Since the client, in this case, is the tinycore linux distro that has minimal configuration, you get the timezone of your VM changed to UTC.

You can follow VMware KB 1006773, or edit /boot/isolinux/isolinux.cfg in the ISO or on the thumb drive to add your timezone, i.e.: append initrd=/boot/core.gz quiet cde kmap=de-latin1 cde tz=EST

It gets trickier if want to include DST, but it is doable.

If someone figures out how to get this running on a Raspberry Pi, please let me know.

Wednesday, August 1, 2012

CYA

No matter how many Single Points of Failure (SPFs), no matter how small your "Failure Domain", no matter what you do to decrease the probability, one thing that is always still a possibility in the IT world is catastrophic failure.


Like getting an "all our VMs are down" call where you eventually find that every.single.vmx.file has been corrupted and is full of nulls. It's not what you want on your first day back from vacation. Or worse yet, during vacation.

These are the days you are glad you started learning PowerCLI by tweaking scripts you found in other blog posts like:
http://andrewmorgan.ie/2011/05/16/vmware-powercli-one-liners-simple-functions/

and http://damiankarlson.com/2010/09/06/vsphere-licensing-via-powercli/

So that you can collect detailed information on your how hosts and VMs are configured, what snapshots are out there, what licenses are in use where, etc.

I built several PowerCLI scripts that, at the very least, saved a lot of frustration but efforts like RVTools are massively wonderful.  [Also note that it can be called from the command line, so you can make your data collection a scheduled task.]

At some point soon I plan to write a script that will generate a document for each VM, to make the rebuilding easier if/when needed again.


It's everything you need to put Humpty Dumpty (like the VMs that were P->Vd and have silly things like BusLogic Parallel SCSI controllers) back together again.

Having copies of the actual .vmx files isn't a bad idea either - http://communities.vmware.com/message/1674574

When you have your boss'-boss'-boss asking 'How long?', it's nice to be able to give an answer. It's even nicer when you can say that the first server will be up in 10 minutes.


Tuesday, July 31, 2012

Scripting VM creation from a template with PowerCLI

This is a quick and ugly to get some VMs built in VMware.
It only does the clone from template, so at some point in the future I'll flesh it out a bit.

---
$vh = 'esxhostname'
$nm = 'vmname'
$rp = 'resource pool name'
$lo = 'folder name'
$loc = 'cluster name everything is in'
$tm = 'name of template'
$ds = 'datastore on which to put the vms'

for ($i = 1; $i -le 9; $i++){$nm = 'THISISTHENAMEOFTHEVM-0' + $i;New-vm -vmhost $vh -Name $nm -ResourcePool (get-resourcepool $rp -location (get-cluster $loc)) -Location (get-folder $lo) -Template (get-template $tm) -Datastore (get-datastore $ds)};
for ($i = 10; $i -le 20; $i++){$nm = 'THISISTHENAMEOFTHEVM-' + $i;New-vm -vmhost $vh -Name $nm -ResourcePool (get-resourcepool $rp -location (get-cluster $loc)) -Location (get-folder $lo) -Template (get-template $tm) -Datastore (get-datastore $ds)};
---

Breaking it down:

The VMs I want to create all have the same name, with the exception of a two digit trailing number.
I was lazy and made two one-liners instead of including the zero padding.

for ($i = 1; $i -le 9; $i++){$nm = 'THISISTHENAMEOFTHEVM-0'
vs
for ($i = 10; $i -le 20; $i++){$nm = 'THISISTHENAMEOFTHEVM-'

New-vm
-vmhost $vh
-Name $nm
-ResourcePool (get-resourcepool $rp -location (get-cluster $loc))
-Location (get-folder $lo)
-Template (get-template $tm)
-Datastore (get-datastore $ds)};

I struggled with this for a while until I remembered that I needed to use objects. The next hurdle was that I had a few datacenters with resource pools of the same name, so I had to add the -location on that one.