Search This Blog

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

2013-11-25

Network Serial Ports In VMware (Licensing Issues)

As per 5.1 Documentation it says you should be able to connect to a guest serial port by attaching a virtual serial port and using the "Use Network" option as of 5.x.

What they do not mention is that this feature only works in VMware Enterprise licenses.

I spent hours trying to figure out why my serial port would never maintain its "Connected" checkbox as shown below:


It would consistently revert and I had already confirmed that firewall was not blocking the ports:
~ # esxcli network firewall ruleset list -r remoteSerialPort
Name              Enabled
----------------  -------
remoteSerialPort     true


I have also verified that the esxi server is accepting connections to 3008 on the host:

telnet RPC-D8-03VM 3008   
Trying 10.129.36.2...                                
Connected to RPC-D8-03VM.phaedrus.sandvine.com.      
Escape character is '^]'.                            
                                                     
                                                     
test                                                 
                                                     
                                                     
testing                                              


~ # nc -l 3008


test


testing

But nothing seemed to work. Even new version of virtual hardware/different OS.

lspci wasn't showing anything even being connected to the guest.

After contacting VMware support they looked through some logs and noticed the following line stating this feature wasn't licensed:
2013-11-25T17:53:07.636Z| vmx| I120: Msg_Post: Error
2013-11-25T17:53:07.636Z| vmx| I120: [msg.serial.uri.nolicense.basic] The currently available license does not permit the use of remote serial ports.

Due to this licensing issue the VM will not even attempt to add the virtual serial port and you will not be able to telnet to your serial port or use a virtual serial port concentrator without an Enterprise license.

For future reference the log that told us that this was not a licensed feature was:
/vmfs/volumes/path/to/vmx/vmware.log

The fact that the GUI does not give any kind of notification of this functionality not working is a bit disappointing, but not more so than the functionality being licensed and not being usable.

References to others having this issue: http://community.spiceworks.com/topic/247096-virtual-serial-ports-in-vsphere-esxi-5

2012-02-11

Customizing an VMware ESXi5 installation disc for unattended install

This explains the workflow of creating a customized ESXi5 installation disc using a Windows PC. VMware has documentation on this workflow using a linux machine here.

1) Download the ESXi iso.
2) Extract the iso using your favourite iso extractor to c:\esxi. I used 7zip.
3) Create a KS.CFG file in c:\esxi with your Kickstart config. Documentation of ESXi5 kickstart commands is here.
4) Modify c:\esxi\ISOLINUX.CFG. Append "ks=cdrom:/KS.CFG" to APPEND. Your LABEL install should look like this:
LABEL install
KERNEL mboot.c32
APPEND -c boot.cfg ks=cdrom:/KS.CFG
MENU LABEL ESXi-5.0.0-20111104001-custom ^Installer

You can also add multiple LABEL install blocks to specify different KS.CFG files or no kickstart at all.
**When ESXi mounts the CD during setup, all files are capitalized. So even if your kickstart cfg file is ks.cfg you have to put KS.CFG.

Now you have to burn your customized setup onto a disc.
1) Download and extract cdrtools for windows from here.
2) Run this command to create the iso (case senstive):
mkisofs.exe -relaxed-filenames -J -R -o custom_esxi.iso -b ISOLINUX.BIN -c c:\esxi\boot.cfg -no-emul-boot -boot-load-size 4 -boot-info-table c:\esxi
3) Burn custom_esxi.iso to disc with any utility. I used the Windows 7 built-in iso burner.


Common Errors:
Not specifying boot.cfg in mkisofs
kernel= must be set in /boot.cfg
Fatal error: 32 (Syntax)
Using imgburn
“No DEFAULT or UI configuration directive found”
OR
ata-pata.v00 not found

ks.cfg was not capitalized in isolinux.cfg
cannot find kickstart file on cd-rom with path -- /ks.cfg

2010-12-20

Patching ESXi single host

For ESXi 4.0 and below, patching can be done with vSphere Host Update Utility.

For ESXi 4.1, vSphere Host Update Utility is no longer supported. Patch using command line:

1) Download patch bundles from VMware's support website: www.vmware.com/patch/download/

2) Upload the patch bundles to your datastore. (You can use vSphere client to do this.)

3) Put the ESXi host into maintenance mode.

4) SSH into the ESXi box. This blog shows how to enable SSH on ESXi 4.1.

5) CD to the datastore and use esxupdate --bundle to patch ESXi:
cd /vmfs/volumes/datastore0/patches
esxupdate --bundle ./ESXi410-201011001.zip update