Configuring Text Boot on Ubuntu 12.04

I spent a lot of time trying to figure out how to disable plymouth and get a clean text boot on Ubuntu 12.04. Hence thought of documenting it in case I forget how I did it :-) .

Edit /etc/default/grub and make the following changes:

  1. Modify the GRUB_CMDLINE_LINUX variable and set it as shown below.
    GRUB_CMDLINE_LINUX="init=/sbin/init -v noplymouth INIT_VERBOSE=yes"
    
  2. Uncomment the GRUB_TERMINAL variable. It should be set to as shown below:
    GRUB_TERMINAL=console
  3. Add a new line below the GRUB_TERMINAL variable declaration as shown below:
    GRUB_GFXPAYLOAD_LINUX=text
  4. Save the file /etc/default/grub
  5. Update the grub configuration and reboot.
    update-grub
    reboot
    

Thats it. You should get a clean text boot with Ubuntu now!!!

Posted in Linux | Tagged | 2 Comments

VMDirectPath with vSphere

VMDirectPath allows for passthrough of installed PCI devices to the guest operating systems. To be able to use VMDirectPath, the host processor (and the motherboard) needs to support IOMMU (I/O memory management unit). Intel calls this feature as VT-d (i believe AMD calls it as AMD IOMMU).

Its pretty simple to configure with VMware ESXi, enable the feature in BIOS of physical host and then via vSphere client,

  1. In tree view select your ‘Host’–>Select ‘Configuration’ tab
  2. Under ‘Hardware’ Pane–>Select ‘Advanced Settings’
  3. Via the ‘Configure Passthrough’ link, enable the PCI devices which you want to use as passthrough devices.
  4. After enabling the PCI devices for passthrough, go ahead and add a PCI device to VM hardware.

Important points to remember:

  1. To disable PCI device passthrough, after disabling an ESXi host has to be rebooted.
  2. Once a PCI device passthrough to a VM has been configured then that device cannot be used by the ESXi host.

Usecases for VMDirectPath (Directed-IO):

  1. Allowing use of physical PCI devices which are supported by the guest operating system but not supported by VMware ESXi for virtualization.
    E.g. Physical NIC cards, Fax/GSM (PCI/USB) Modems, FC-HBA
  2. VMware ESXi does not provide a 10 gigabit emulated interface, hence PCI passthrough is a good option when you want to provide a 10 gigabit interface within a guest OS. Especially useful if you have not installed VMware tools or cannot use the VMXNET3 para-virtual adapters.

Limitations:

  1. A maximun of upto two passthrough devices per VM.
  2. Generally, passthrough devices cannot be shared between multiple VMs. Some PCI devices may support advanced sharing features (via IOMMU) which may allow for sharing of such devices with multiple VMs on the same host.
  3. To support PCI passthrough devices, VM hardware version has to at least 7 (not sure need to verify this). So I guess it is only supported with ESXi 4.x and above.
  4. Enabling PCI passthrough would also VMs to be configured with a full memory reservation.
  5. A VM enabled with PCI passthrough device cannot vMotion (migrate across hosts).

Gotcha:
Out of box, ESXi (4.1 and above) should do DMA & device interupt re-mapping. Sometimes (again dependent on processor and bios/firmware versions of M/B and physical PCI devices) the interrupt mapping does not behave good with the hypervisor. And this can cause an unresponsive/slow VM or hypervisor. You can try the things noted in this VMware KB#1030265 article.

Some additional reading: Configuration Examples and Troubleshooting for VMDirectPath.

Instead of doing a passthrough of a FC-HBA, a virtual HBA (FC) could also be generated and added to a VM. This is possible only if the physical FC-HBA providing the fabric connectivity supports NPIV. You can generate a WWN for your VM by editing the VM setting and going to the options tab and selecting ‘Fibre Channel NPIV’. I have never used this, however I guess one should be able to do LUN masking / zoning using the generated virtual WWN assigned to the VM.

Posted in Virtualization | Tagged , , | Leave a comment

Fault Tolerance

Fault Tolerance (FT) is a feature of vSphere HA cluster. Hence to be able to use FT you need to configure an HA cluster first. FT is enabled on those VMs which need a higher level of protection. On enabling FT on the selected VM, a selected VM becomes primary and a new secondary VM is created on one of the hosts in the HA cluster.

Requirements for enabling FT on VMs:

  • Configure a VMKernel portgroup enabled for FT Logging on all ESXi hosts which would host FT VMs
  • Virtual disks on FT VMs have to be “Thick Provisioned Eager Zeroed”
  • ISO/Floppy images have to be stored on Shared Storage
  • Hosts in cluster Should meet vMotion requirements, (again I don’t think this is requirement per se but would be very beneficial)

FAQs on FT VMs:

Q. Does FT support vSMP on VMs?
A. No. VMs with vSMP cannot be enabled for FT. i.e. VMs with more than 1 vCPU cannot be protected with FT.

Q. Is FT supported on AMD processors.
A. Yes, both Intel & AMD processors are supported for FT. The VMware’s KB#1008027 article lists what processors and guest operating systems are supported for FT.

Q. How many FT VMs can be hosted on a single ESXi host?
A. Maximum 4 FT VMs supported per ESXi host (either Primaries or Secondaries).

Q. What is a primary VM?
A. Primary VM is a VM which is serving the user requests. The access to this VM is always read-write.

Q. What is a secondary VM?
A. Secondary is a backup VM, which is promoted to primary in case of (original) Primary VM failure. When it is a Secondary VM, the access to this VM is always read-only.

Posted in Virtualization | Tagged , , | Leave a comment

Comparison between VMFS3 & VMFS5

Comparison between VMFS3 & VMFS5

VMFS3

VMFS5

  • Single Largest extent of 2TB less 512bytes
  • Uses MSDOS partition table
  • Supports 64TB Spanned Volume (32 extents x 2TB)
  • Different block size based on the datastore size
    (1MB/2MB/4MB/8MB)
  • Max size of RDM in virtual compatibility mode would be 2TB less 512bytes.
  • Max size of RDM in physical compatibility mode would be 2TB less 512bytes.
  • Single largest extent of 64TB
  • Uses GPT partition table
  • Supports 64TB Spanned Volume (32 extents with any size combination)
  • Unified 1MB Block Size
  • Performance improvements in comparison with VMFS3
  • Max size of RDM in virtual compatibility mode would be 2TB less 512bytes.
  • Max size of RDM in physical compatibility mode would be 64TB.
  • You will use VMFS3 if you have a vSphere environment which is mix of vSphere 4.x (also 3.x) & 5.x hosts. Presently VMFS5 datastores cannot be accessible to hosts running an ESXi version less than vSphere 5.0
  • You can upgrade from VMFS3 to VMFS5 but cannot downgrade.
  • On upgrading a VMFS3 datastore, the datastore starts to use GPT partition format only after the datastore has been extended (within the extent) beyond 2TB (less 512bytes). Not sure if the behaviour is similar for a spanned volume as well, but I believe that is how it should behave.
  • Storage vMotion (migration across datastores) between a VMFS3 and VMFS5 volume is supported if you are using a vSphere 5.x host.
  • vMotion (migration across hosts) in vSphere 5.x is supported in either cases when shared storage is VMFS3 or VMFS5.

For additional information refer vSphere 5.0 configuration maximums guide.

Posted in Virtualization | Tagged , , , | Leave a comment

Jumbo frames and vSphere

What are Jumbo frames?

When I do vSphere training sessions, many times the attendees are not clear about the concept of Jumbo frames and there seems to be some confusion about it. So today’s article focuses on just that. We will be starting with understanding jumbo frames and later exploring how to enable it in a vSphere infrastructure.

Typically data is exchanged between a client and server using TCP/IP. When a sender (client or server) sends an IP datagram which is larger than the MTU (maximum transmission unit)size, the datagram is broken up into smaller chunks (fragments) of data. The process of breaking up the IP datagram into smaller fragments is known as fragmentation.  At the receiver end the IP fragments need to be re-assembled as they are received.

The MTU is responsible for specifying how large each IP fragment can be. Smaller the MTU more fragments would be created, thus increasing the time taken for fragmentation and re-assembly. A smaller MTU would thus, also reduce the available effective bandwidth (pipe size) over a given network (point-to-point) connection.

Hence, if the MTU size is large it would not only reduce the IP datagram fragmentation/re-assembly time but also would increase the available effective bandwidth. Such large MTU sizes are known as Jumbo frames. Although larger MTU sizes are possible, usually Jumbo frames are configured with 9000 MTU.

Since large MTU size improves the bandwidth available, Jumbo frames are commonly used and recommended for accessing IP based Storage devices (NFS/iSCSI).

How to enable Jumbo frames in vSphere?

It important to note that Jumbo frames are good only if your entire path is configured with jumbo frames. Even if one device in-the-path is not capable of doing Jumbo frames, the entire path with fallback to the lowest MTU size supported by any device in the network path. Also its equally important to note that if there are some network devices not capable of doing Jumbo frames while some are configured to use Jumbo frames the effective bandwidth would be sub-optimal. In fact it might be less than if configured with the lowest possible MTU in the path.

In the any setup all devices including the endpoints (sender/receiver) and in-between network devices (switches, routers) should be configured with Jumbo frames to get the benefit of improved bandwidth.

On vSphere ESXi  5.0, one can get the configured MTU size using the command

esxcli network ip interface list

OR

esxcfg-vmknic -l

One can also use the vSphere Client to get the MTU details:

In the vSphere client, select your host and select the properties for your vSwitch from
Configuration Tab–>Networking–>vSwitch Properties

vSwitch Properties

In the same way you can update the MTU value to 9000 (for Jumbo frames) either using the command line or the vSphere client. Again important to remember, that you will need to configure it not just for the VMKernel Port but also on the vSwitch. Secondly ensure that you have configured all the network devices in the network path with Jumbo frame including the storage device. Only then will will you benefit from increased bandwidth using Jumbo frames.

I believe just enabling Jumbo frames on the network interface of your storage device should be sufficient, however you may want to check with your storage vendor if any additional configuration is required to enable Jumbo frames.

On vSphere you would not need to do any additional configurations for VMs.

That’s it folks.

Posted in Virtualization | Tagged , , , , , | 2 Comments

Permissions and Access control with vSphere ESXi 5.0

Today, on my standalone ESXi host; I needed a local user who could Shutdown the ESXi host. The requirement was other than shutdown or reboot, the user should not be able to do anything else. To achieve this you will need a local ESXi user assigned with a custom role.

Here’s how we do it:

  1. Add a local ESXi user:
    - Select your ESXi host in the left hand side “Tree View”
    - Select “Local Users & Groups” tab from right hand side “Tab View”
    - Right Click and select “Add …”Add User Window
  2. Go to the roles panes using the shortcut “Ctrl + Shift + R”
  3. From menu select ‘Administration’ –> ‘Role’ –> ‘Add …’Add A New Role
  4. Give a name to the new role say: ‘ESX Maintenance’
  5. In ‘Edit Role …’ windows, select the following permissions:
    ‘Host’ –> Configuration –> ‘Maintenance’
    What Priviledges to select for Shutdown permission
  6. And select OK.
  7. Now assign this role to user on the ESXi Host:
    - Select your ESXi host in the left hand side “Tree View”
    - Select “Permissions” tab from right hand side “Tab View”
    - Right Click and select Add Permission …”Assign Permissions
  8. In the “Assign Permissions” window, select Add button
    - In the “Select Users & Groups” windows, select your local ESXi user
    - And click Add

    Select Users & Groups

  9. Now verify the user has got assigned the correct role:
    - Go to the roles panes using the shortcut “Ctrl + Shift + R”
    - Select your role and verify it has been assigned on the “ha-root-folder”

    Role Map

  10. That’s it. Verify you can login and shutdown your ESXi host.
Posted in Virtualization | Tagged , | Leave a comment

Building a vSphere 5.0 Home Lab – Part 2

In the previous post we discussed about hardware requirements. Based on earlier discussions, from time to time I have been evaluating, the best and cheapest options for building a home lab. In this post we are going to discuss the hardware that will allow us to build a vSphere lab. Here are some of my recommendations:

Motherboard:  Intel Desktop Board DH67CL
We selected this motherboard because:

  • Uses the cheap 1333Mhz DDR3 RAM with support up to 32GB RAM. Additionally it comes with 4 memory DIMM slots.
  • Has out-of-box vSphere5 support for the on-board Intel SATA controller.
  • Comes with 3 PCI slots, allows easy expansion for RAID card and/or NIC card.
  • Comes with Intel NIC based on chipset 82579V. Although this is currently unusable under vSphere5 since unsupported by VMware, but I am sure VMware will support this NIC in upcoming future updates.
  • Comes with a DVI/HMDI interface so saves you some more on graphics card.

Processor: Intel Core i5-2400 Processor (6M Cache, 3.10 GHz)
The said processor supports Intel VT and comes with four cores meets all our requirements. The processor is also compatible with our selected motherboard (DH67CL).

RAM: As already discussed we want to have loads of RAM. Buy a 8GB-1333Mhz-DDR3 DIMMs of Transcend / Kingston or Strontium RAM. If you want 16GB RAM you will need to buy 2 DIMMs of 8GB each else if you can afford buy 4 DIMMs.

Network Card: The on-board NIC that comes with the Intel Motherboard DH67CL is an Intel card with chipset 82579V. However presently vSphere ESXi 5.0 does not support this chipset. Hence to be able to successfully install vSphere ESXi 5.0, you will need to install a supported NIC on the motherboard. The motherboard already comes with 3 PCI slots so install the card in anyone of these and you are good to go. I recommend using a standard Intel PRO/1000 NIC. This NIC should be available anywhere in India and is typically costing ~Rs.700/-.

Hard Disk: Any SATA2/SATA3 disks are OK for us. Pick your own brand. Ensure that you pick a 500GB disk since we will need to buy 3 disks to keep costs low. BTW if you are tight on budget a single disk will also do.

DVD Writer: Buy a SATA DVD writer again any brand would do. We will need this to install ESXi and also sometimes to burn DVDs/CDs from within the VMs.

USB Stick: Buy a 4GB USB stick something which is small. The idea is if its small it won’t protrude too much on the backside of our cabinet. I prefer the use the ” Sandisk Cruzer Fit 4 GB Pen Drive“.

Cabinet & Power Supply: When using a cabinet accessibility is the key. Also it becomes pretty hot in India and unless you have installed an AC, you would want something big, roomy and airy with good cooling, something like a Chieftec. Also I would suggest buying a good power supply, which is also silent. Personally I prefer “Antec 450W Power Supply (VP450P)“. Antec power supplies are super silent.

Gigabit Network Switch: You will need a gigabit Ethernet switch to connect your ESXi host and you laptop or desktop. Though pricey I prefer ASUS RT-N16 gigabit switch. It’s a gigabit wireless router with the ability to install a custom firmware such as “Tomato USB” on it. Installing a custom firmware will allow you to test out tagged VLAN related scenarios within your home lab. Again if you are on a budget you may buy a cheaper unmanaged switch.

All the above is available with Flipkart. However for RAM I would suggest you try your local vendor. Flipkart does not stock 8GB DDR3 DIMMs from Transcend or Kingston :-) .

Setting up the Home Lab:

  1. Before we begin, power-on your box and go to the BIOS settings. Ensure you can see all the installed RAM. Also verify that “Intel VT” has been enabled. I believe the “Intel VT” option would be somewhere under the Security options in the BIOS settings.
  2. Once you have assembled the box, download the “vSphere ESXi 5.0″ ISO from VMware site. Register for a free hypervisor license.
  3. Plug-in the USB in your brand new server and install ESXi on the USB stick. Configure it with an appropriate IP address.
  4. After install is complete, reboot the box and go back to BIOS, this time configure you box to boot from the USB. Verify the USB boots successfully.
  5. Now download the vSphere Client from VMware website and install in on your desktop or laptop.
  6. Connect to your ESXi using the vSphere Client. Once you have reached this level everything else can be done using the GUI.
  7. You may also need to download are VMware vCenter Server Appliance.
Posted in Virtualization | Tagged | 5 Comments