ESXi can't power on VM - Swap issue

TeeJayHoward

Limpness Supreme
Joined
Feb 8, 2005
Messages
12,271
I got the Failed to extend swap file from 0 KB to <size> KB error mentioned here this morning. The VM is located on an iSCSI datastore on a Windows Server 2012 box, in a Storage Spaces pool of drives. The datastore is 250GB in size. The "hard drive" for the VM is 40GB in size. Nothing else is on that datastore.

I've never played with iSCSI before, and I've very little experience with ESXi 5.1. Needless to say, I'm almost certain I screwed up somewhere. What troubleshooting steps I should go through to resolve the issue? For the time being, I did the memory reservation bit, and it worked. I assume that vSphere tries to put the swap file in the same location as the vmdk, right? How would I verify this? I'd also like to know how to tell how much free space is remaining on the datastore/volume, in case I somehow made a 40GB volume on my 250GB datastore.
 
Last edited:
Virtual Machine Properties from Vsphere client, Options tab, Swapfile Location under Advanced.

datastore size/free go to Configuration Tab for your host, and select Storage from the left side.
 
Last edited:
MAke sure oyu can make a new file on that datastore too - it may be that the datastore is read only or offline
 
Finally home. Here's the full error:

Code:
Failed to power on VM.
Could not power on VM : I/O error. 
Failed to extend swap file from 0 KB to 8388608 KB.
SharedArea: Unable to find 'testSharedAreaPtr' in SHARED_PER_VM_VMX area.

Swapfile Location: Use default settings (Tried all three options, all gave an error)
Memory Resource Allocation: 0MB Reserved (Will work if 100% of the memory is reserved)
iSCSI Datastore: 245.21GB free of 255.75GB. 10.54GB Used

I can create a new folder on the datastore.
I can delete the folder I created on the datastore.
 
Do, from within that datastore:

touch vmtest
dd if=/dev/urandom of=./vmtest bs=1K count=512

See if it works.
 
It got worse last night. I powered off the VMs to try and change some settings, and they wouldn't turn on regardless of what I did. Even the ones who's settings I didn't mess with. Don't recall the error, but I think it was some sort of I/O issue. I gave up, deleted the NFS shares and iSCSI shares on my Windows box, and put the ESXi box back to my Solaris install for the weekend. Might have some time Sunday to play with it. Friend of mine is deploying, and he's got a lot of liquor that needs to be eliminated.

For when I do get to it, though - I assume that I type those commands into the alt+F1 console? If so, where does ESXi mount the iSCSI share at? (AKA, How do I get to "within the datastore"?)
 
cd /vmfs/volumes/YOUR_DATASTORE_NAME
Command just hangs right here:
25_zpscf612be3.png


Waited 15 minutes or so, nothing happened.
 
Gave up on iSCSI for a little while, running off a NFS share now. Things work. Mostly. Created a Solaris 11.1 VM. Passed through the Cougar Point 6-port SATA controller on my X9SCM. The result:
PurpleScreenofDeath_zps253b5d9e.png


Looks like I'm going to have to pass through individual drives via SATA RDM mapping. I was hoping I could do things the "supported" way. Phooey.
 
Upgrade to the latest build 914609. It contains a fix to the passthrough issue.

http://kb.vmware.com/selfservice/mi...nguage=en_US&cmd=displayKC&externalId=2039030

Damn, figured when I downloaded the ISO yesterday, that I was getting the latest and greatest version.

SSH'd into the host, and did the following:
Code:
esxcli software vib update --depot=/vmfs/volumes/Applications\ on\ Banshee/VMWare\ ESXi\ 5.1.0a/ESXi510-201212001.zip

It updated three or four VIBs, removed the same, and skipped the rest. Hopefully the ones skipped were skipped because nothing changed between the install and the patch, or they weren't needed! I did find it interesting that there isn't an "update host" button on the vSphere client. Manually downloading and installing patches is something I've not done in almost a decade. Is it an option integrated into one of the other software packages?

Thanks for the heads-up on the patch! I've imported my pool into the VM with no issues. Makes me a very happy person.
 
Win_to_Solaris_zps6e3b47db.png


Solaris_to_Win_zpsd4963b21.png
Win_to_Solaris_NFS_zps90229232.png

Solaris_to_Win_NFS_zps72301fb6.png

Settings:
Code:
tim@solaris:/etc$ zfs get all pool
NAME  PROPERTY              VALUE                  SOURCE
pool  type                  filesystem             -
pool  creation              Mon Dec 17 12:55 2012  -
pool  used                  7.77T                  -
pool  available             5.51T                  -
pool  referenced            7.77T                  -
pool  compressratio         1.00x                  -
pool  mounted               yes                    -
pool  quota                 none                   default
pool  reservation           none                   default
pool  recordsize            128K                   default
pool  mountpoint            /pool                  default
pool  sharenfs              on                     local
pool  checksum              on                     default
pool  compression           off                    default
pool  atime                 on                     default
pool  devices               on                     default
pool  exec                  on                     default
pool  setuid                on                     default
pool  readonly              off                    default
pool  zoned                 off                    default
pool  snapdir               hidden                 default
pool  aclmode               discard                default
pool  aclinherit            restricted             default
pool  canmount              on                     default
pool  xattr                 on                     default
pool  copies                1                      default
pool  version               5                      -
pool  utf8only              off                    -
pool  normalization         none                   -
pool  casesensitivity       mixed                  -
pool  vscan                 off                    default
pool  nbmand                off                    default
pool  sharesmb              off                    local
pool  refquota              none                   default
pool  refreservation        none                   default
pool  primarycache          all                    default
pool  secondarycache        all                    default
pool  usedbysnapshots       0                      -
pool  usedbydataset         7.77T                  -
pool  usedbychildren        7.32M                  -
pool  usedbyrefreservation  0                      -
pool  logbias               latency                default
pool  dedup                 off                    default
pool  mlslabel              none                   -
pool  sync                  standard               local
pool  encryption            off                    -
pool  keysource             none                   default
pool  keystatus             none                   -
pool  rekeydate             -                      default
pool  rstchown              on                     default
pool  shadow                none                   -
tim@solaris:/etc$ zfs get share pool
NAME  PROPERTY  VALUE  SOURCE
pool  share     name=pool,path=/pool,prot=nfs  local

What am I missing here?
 
Last edited:
btw, the "command didn't do anything" means that datastore was, well, bustimicated :) which is why it couldn't make the swap file.
 
btw, the "command didn't do anything" means that datastore was, well, bustimicated :) which is why it couldn't make the swap file.
I figured, but still good to know. Working right now on turning the ESXi box into a fileserver I'll use for datastores on my new ESXi box. Hoping it'll work better than the Windows box did.
 
Back
Top