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

Saturday, March 2, 2019

Oracle Licensing and Virtualization Restrictions

Disclaimer

The information here represents my personal findings using published documents from Oracle. It doesn't represent my legal opinion. I am not a lawyer. Take this information and fight for your right as a consumer/customer and demand an official response from Oracle by email, not verbal.

Introduction

I've had numerous encounters with customers citing Oracle sales people stating that virtualizing Oracle DB on VMware is not supported, and that the licensing of the entire physical host's cores, or even the entire cluster's cores is mandatory, and in a nut shell: this is NOT entirely true and can be circumvented.

The information below is based on Oracle's legal documents and licensing documents and guidelines. Check the references for the links and details.

References are denoted with numbers. When you see #1 it means see reference number 1 at the end of this post.

Executive Summary (TL;DR)

The Oracle partitioning guide is not a contractual document and Oracle strictly states it's for educational purposes only. Therefore it cannot use it to impose how customers should partition their environments or systems.

Excerpt from Oracle's "Oracle Partitioning Policy" document

Details and Resources

The only contractually obligating documents from Oracle are:

  • Technical Support Policy document
  • Processor Core Factor table
  • Oracle License and Service Agreement (OLSA)  / Oracle Master Agreement(OMA)


Terminology and Concepts

Alright, let's get into details, and one step at a time to provide a full picture. First things first:

License Types

Oracle DB is licensed in different ways, depending on its edition:

  • By number of users using the connected application or whose data are saved in the DB
  • By number of CPU sockets. A socket is a full physical processor, regardless of the number of cores inside it.
  • By number of CPU cores. This is the case for the Enterprise edition of the DB. Cores refer to the number of physical cores in every CPU socket installed in the server. Threads are considered logical cores, and you do not license those; only the physical cores.

Audit Compliance

Before moving forward, let's discuss audit compliance. Oracle audit team can request to audit your environment. You have the choice of not allowing them, but they might come back later with government officials to enforce it, or if you open a support ticket, they'd do an inspection anyway to see whether you're eligible for support or not.

If/When you do allow Oracle's audit team to run an audit, it's essential to agree on a scope and limited time to do the activity: i.e., clusters 1, 2 and 3 and the activity is to not exceed 2 weeks maximum. This is to be stated in the legal document you'll be signing prior to them starting the audit activity.

Oracle will ask you extract virtual machine (VM) activity logs, where they've been and where they've moved for X number for months. It's also important to limit the period: 1-3 months should be sufficient for any audit activity.

If you do not impose such limits, Oracle can keep asking for extended periods to run their scripts, and try to find at least 1 case of deviation to impose penalties on you.

Some sales people will scare you that you're violating Oracle terms and will be subject to penalties of millions of USD.
As long as you're complying with the rules below, and have done the settings properly and have full log of all VM activity (in vCenter) to prove that the VMs haven't moved beyond the licensed hosts and cores, no one can penalize you.

If they continue to harass you, ask them to send you an official email, and once you receive it, send it to Oracle's USA legal team. You'll receive a note from them acknowledging that you're in full compliance.

Feel free to reach out to me and I'll help you reach the right people within Oracle. For planning and designing help with your setup to make sure you're compliant prior to deploying the Oracle workloads, I can offer this within Kuwait only. If you're outside of Kuwait or the Arabian Gulf region, I suggest you contact a vendor selling x86, another selling IBM POWER and let both give you 5-year Total Cost of Ownership (TCO) studies including Oracle software license costing.

License Core Factor

Oracle applies different ratios of licenses needed for each core depending on the processor/CPU being used in the servers [#1]. This is called Core Ratio, and usually for Intel mid-range processors (Intel E5-2400, E5-2600, Xeon Silver and Xeon Gold), the core factor is 0.5.

For Oracle's own SPARC CPU, the core facor for M5, M6, M7 and M8 CPUs is 0.5. This is in bid to push for its own hardware and provide a full solution.

For higher-end processors (Intel E7-4800, E7-8800, Xeon Platinum, and IBM POWER), the core factor is 1.0.

Processor Choices and License Calculation

If your application vendor says they need 10 cores, you have to ask them to specify which processor and model have they benchmarked their database workload on.
It's unfortunate that many software vendors benchmark their workload once (say 2012 for example), and then keep using the same hardware requirements on newer systems, which means customers (you) end up with an extremely over-sized solution.

Why? Because 10 Intel Xeon E5 cores in 2012 are equal to about 6 Intel Xeon Gold cores now (rough estimate). The same applies to any processor brand, such as IBM POWER and Oracle/Sun/Fujitsu SPARC. The enhancements vary, but the idea is the same: do not believe the software vendor's requirements unless they tell you which hardware was used to do the benchmark.

If the application vendor says you need 10 cores on Intel Xeon Gold, then you need to purchase 10 (cores) x 0.5 (Xeon Gold core factor) = 5 Oracle Enterprise DB core licenses.

If the application vendor says you need 10 cores on IBM POWER9, then you need to purchase 10 (cores) x 1.0 (IBM P9 core factor) = 10 Oracle Enterprise DB core licenses.

The above does NOT mean that POWER core factor is more expensive than Intel, because the performance of 10 cores on Intel is less than 10 cores on POWER. That's why Oracle assigned POWER processors a higher core factor. However, I will NOT discuss which processor to choose in this post, to not derail from the topic of licensing.

The advice I give all my clients is: Choose the platform that gives you the best Return on Investment (most cost effective) and reliability. Make sure to always factor in cost of software and hardware for 5 years for your solutions, including maintenance, support and subscription costs.

Virtualization/Partitioning Types

Virtualization allows you to simultaneously run multiple virtual machines (VMs), each with its own operating system (OS), on the same physical server.

Oracle treats hypervisors (virtualization engines/software) differently, mainly as a sales tactic (politics) and not for technical differentiating factors (though some technical factors exist, but the main drive remains to push sales into their direction).

Oracle's list of supported virtualization and partitioning technologies, VMware's vSphere is not listed, for political reasons, but it's fully technically functional and support is provided as follows:

  • If the problem is already known, Oracle will provide support.
  • If the problem is unknown, Oracle require you to reproduce the issue on a physical server.
  • Some of my customers said they've had tickets open on supported platforms for months, while Oracle support engineers threw the blame on Microsoft Windows, and Windows support engineers threw the blame on Oracle. So you can imagine how this might turn on an unsupported platform.
  • VMware openly states that it will provide full support for Oracle software running on VMware's platform, so you contact VMware and they'll use their in-house Oracle certified support engineers. See the links in references for details on what VMware covers. [#4]
  • Oracle sales people might tell you you'll never get support, but that's a lie. Ask them to email you their claim, and then you can escalate that. 99.99% they won't dare email you since it's illegal to make such claims.

Licensing types based on virtualization: Oracle licensing states that you need to license every CPU core that's used by the database. That's easy to do on Unix platforms, but requires additional configurations on x86 (AMD/Intel) platforms.

x86 (AMD/Intel) systems

As x86 systems are considered commodity servers, they don't offer a function to isolate specific cores for specific workloads/VMs. However, with VMware vSphere or Microsoft Hyper-V hypervisors, you can assign specific processor cores to always be used by a specific VM. Hyper-V calls it CPU Pinning. vSphere calls it CPU Affinity.

Keep in mind, you need to also restrict which hosts are able to run these virtual machines, in addition to the CPU core affinity. On VMware vSphere, when enabling High Availability, a VM will restart on a different host if the original host lost power, therefore you need to set cluster policies to have the VMs run on specific hosts only, even in cases of host failures.

Remember the audit section above? This is why you need to setup such restrictions here.

Example: You have a VMware cluster of 4 hosts, each host has 2x 14-core Intel processors (28 total). You have/need Oracle Enterprise Edition DB effective licenses for 8 cores = 16 Intel cores licensed (0.5 core factor license for Intel mid-range CPUs).
You want to run 2 instances of Oracle DB as virtual machines, each with 8 cores (4 effective core licenses).

You can easily create a Host Affinity rule in VMware's Distributed Resource Scheduler to restrict the DB VMs to specific 2 hosts in the cluster, and edit the VM settings to specify 8 cores in each host as part of the CPU Affinity settings. This way you lock the 2 VMs to 2 specific hosts in the cluster, and each VM to specific CPU cores.

There is no need to buy dedicated servers for Oracle with the CPU cores matching the license. You do need to license any host cores that will run Oracle instances (2 hosts to have high availability -- if one VM goes offline, the other is still functional. Do not power on the other one.

If you need to do maintenance on one physical server: power off one of the 2 VMs, and carry on your maintenance, then power it on when the host is ready.

Unix (POWER/SPARC) systems

Such systems allow cores to be pooled/grouped and specific workloads can be restricted to certain cores. This is known as Hard Partitioning.

I am not very familiar with SPARC systems, so my example(s) will be for POWER: if you have a machine with 2 CPUs, 10 cores each, for a total of 20 cores, you can create a Shared Processor Pool of 6 cores and restrict all Oracle DB VMs/LPARs to run on that pool only. This allows you to license only 6 cores, and the VMs will share those 6 cores.

It's often that customers buy dedicated core licenses for each DB they create, however, in many times when we did utilization analysis of those VMs and DBs, the CPU utilization was much lower than the assigned values, however the customer had a huge number of total cores licensed for Oracle DB!

A better approach is to create a pool for the DBs, and let the VMs use the cores from that pool. Additionally, on POWER, it's possible to allow a VM to have 2 cores, but increase number of cores if needed, then scale back. In such a scenario, it will never exceed the restriction impose by the pool, so you always remain within the license boundries.

The above setup helps with one part of the audit, but when it comes to moving VMs/LPARs around different physical hosts, the same rules apply: you have to license the physical cores where the VMs run. So, if you have 2 physical hosts for High Availability, there are few ways to do the setup:

License Options

Licensing One VM only

Oracle licenses per installed instance. If you create a VM with an OS and install Oracle DB on it, you have to license it, even if it's offline/powered off.

To license one VM only in HA setup, you have to use storage replication, or connect both hosts to the same storage, such that at any time, only one VM instance exists on the servers. When you need to failover to your 2nd site or host, you do the job manually and import/power on the VM on the 2nd host, as long as it's powered off and removed from the 1st host.

Additionally, you have to disable Live Partition Mobility, vMotion or any function that allows VMs to move between hosts in the same cluster.

This is true for both x86 and Unix.

Licensing Multiple VMs

If you wish to use Oracle DataGuard or Real Active Cluster (RAC) to guarantee data consistency using application/DB-level replication, then you need to license at least 2 instances and setup the replication scheme on the DB level.

Additionally, you have to disable Live Partition Mobility, vMotion or any function that allows VMs to move between hosts in the same cluster. You license cores on physical hosts that have the VMs running. If you do want the VMs to move to other hosts, you'll need to license all hosts permissible for movement.

This is true for both x86 and Unix.

As you can see, these legal restrictions are not technical limitations, but only to enforce customers to pay more licenses and/or enforce Oracle's own ecosystem onto the customer to further leverage more purchases in the future.

Pitfalls

As you can see above, when using x86 systems, there's some added overhead on the operations team to make sure the VMs always remain in compliance when doing daily operations and maintenance jobs. It's easier to do things when having Unix systems and maintain compliance, but then you need operations people with Unix skills.

A mistake of 1 person in operations could put you out of compliance. If you run a small company, you may be better off with buying dedicated physical servers for Oracle workloads (but end up with many physical boxes). If you're an enterprise with many Oracle workloads, I suggest moving away from them if possible, and if not, go with a Unix environment that gives you flexibility and is able to reduce your overall cost on software licenses.

References

  1. Oracle Processor Core Factor Table
  2. Oracle Partitioning Policy
  3. Supported Virtualization and Partitioning Technologies for Oracle DB and RAC
  4. VMware Support for Oracle on vSphere
  5. Understanding Oracle Certification, Support and Licensing on VMware Products
  6. Oracle Misinformation on VMware

Wednesday, August 15, 2018

Hyperthreading Mitigation Security Warnings

13 hours ago VMware issued critical security patches for VMware vCenter, ESXi, Fusion and Workstation products as part of advisory VMSA-2018-0020 to fix the new CPU vulnerabilities Intel disclosed as well.

After applying the patches (Aug 14, 2018), a warning message showed on patched ESXi hosts: esx.problem.hyperthreading.unmitigated

host summary showing hyperthreading unmitigated error

According to the release notes, VMware introduced a new Advanced Configuration on the hosts to mitigate the new hyperthreading attacks, however, it states there's a performance hit that cannot be ignored.

After applying the patches, you have to manually enable the Hyperthreading mitigation setting in the advanced functions to enable the security fix, otherwise the exclamation mark on the host and the warning above will persist. It's set to manual modification due to the performance impact.

hyperthreading mitigation advanced setting

Change the value of "VMKernel.Boot.hyperthreadingMitigation" to true, then reboot the host for changes to take effect.

Update 1: Aug 15, 2018 - 14:29 UTC+3

After enabling hyperthreading mitigation, some virtual machines that were running HTTPS/443 services weren't accessible anymore. The VM is accessible, but not services on port 443 TCP. After undoing the configuration and rebooting the host, the services functioned again.

Approach this setting and the security vulnerability with caution and do proper testing for every service you have deployed.

Monday, February 29, 2016

Freeing Disk from VMware Virtual Flash Read Cache (vFRC)

I was toying with vFRC in my lab and when I was done, I deleted the volume from the vSphere web client, but the local flash disk had retained its GPT partition format and was still claimed as a VMFS volume. I was unable to use that disk for other applications.

Try deleting using the web client:
 
Select the host then go to Manage tab then select Storage option and from there choose the Storage Devices entry. Select the disk, then click on the gear icon and choose Erase Partitions. Make sure you selected the right disk because this will wipe everything.


Via CLI: To delete the disk partition, first enable SSH on the host, then login and list all disks:
 ls -l /vmfs/devices/disks/

Sample output:
ls -l /vmfs/devices/disks/
total 495867432
-rw-------    1 root     root     8004304896 Feb 29 08:45 mpx.vmhba32:C0:T0:L0
-rw-------    1 root     root       4161536 Feb 29 08:45 mpx.vmhba32:C0:T0:L0:1
-rw-------    1 root     root     262127616 Feb 29 08:45 mpx.vmhba32:C0:T0:L0:5
-rw-------    1 root     root     262127616 Feb 29 08:45 mpx.vmhba32:C0:T0:L0:6
-rw-------    1 root     root     115326976 Feb 29 08:45 mpx.vmhba32:C0:T0:L0:7
-rw-------    1 root     root     299876352 Feb 29 08:45 mpx.vmhba32:C0:T0:L0:8
-rw-------    1 root     root     2684354560 Feb 29 08:45 mpx.vmhba32:C0:T0:L0:9
-rw-------    1 root     root     128035676160 Feb 29 08:45 t10.ATA_____ADATA_SP600_____________________________7F1820011415________
-rw-------    1 root     root     128033579008 Feb 29 08:45 t10.ATA_____ADATA_SP600_____________________________7F1820011415________:1
-rw-------    1 root     root     120034123776 Feb 29 08:45 t10.ATA_____KINGSTON_SV300S37A120G__________________50026B7255068D61____
-rw-------    1 root     root     120032591872 Feb 29 08:45 t10.ATA_____KINGSTON_SV300S37A120G__________________50026B7255068D61____:1
lrwxrwxrwx    1 root     root            20 Feb 29 08:45 vml.0000000000766d68626133323a303a30 -> mpx.vmhba32:C0:T0:L0
lrwxrwxrwx    1 root     root            22 Feb 29 08:45 vml.0000000000766d68626133323a303a30:1 -> mpx.vmhba32:C0:T0:L0:1
lrwxrwxrwx    1 root     root            22 Feb 29 08:45 vml.0000000000766d68626133323a303a30:5 -> mpx.vmhba32:C0:T0:L0:5
lrwxrwxrwx    1 root     root            22 Feb 29 08:45 vml.0000000000766d68626133323a303a30:6 -> mpx.vmhba32:C0:T0:L0:6
lrwxrwxrwx    1 root     root            22 Feb 29 08:45 vml.0000000000766d68626133323a303a30:7 -> mpx.vmhba32:C0:T0:L0:7
lrwxrwxrwx    1 root     root            22 Feb 29 08:45 vml.0000000000766d68626133323a303a30:8 -> mpx.vmhba32:C0:T0:L0:8
lrwxrwxrwx    1 root     root            22 Feb 29 08:45 vml.0000000000766d68626133323a303a30:9 -> mpx.vmhba32:C0:T0:L0:9
lrwxrwxrwx    1 root     root            72 Feb 29 08:45 vml.010000000035303032364237323535303638443631202020204b494e475354 -> t10.ATA_____KINGSTON_SV300S37A120G______________                                   ____50026B7255068D61____
lrwxrwxrwx    1 root     root            74 Feb 29 08:45 vml.010000000035303032364237323535303638443631202020204b494e475354:1 -> t10.ATA_____KINGSTON_SV300S37A120G____________                                   ______50026B7255068D61____:1
lrwxrwxrwx    1 root     root            72 Feb 29 08:45 vml.01000000003746313832303031313431352020202020202020414441544120 -> t10.ATA_____ADATA_SP600_________________________                                   ____7F1820011415________
lrwxrwxrwx    1 root     root            74 Feb 29 08:45 vml.01000000003746313832303031313431352020202020202020414441544120:1 -> t10.ATA_____ADATA_SP600_______________________                                   ______7F1820011415________:1



Find your disk there, and then list its partitions:
partedUtil getptbl /vmfs/devices/disks/

Sample output:
 partedUtil getptbl /vmfs/devices/disks/vml.010000000035303032364237323535303638443631202020204b494e475354
gpt
14593 255 63 234441648
1 2048 234440703 AA31E02A400F11DB9590000C2911D1B8 vmfs 0


You can see above that there's one partition labeled as "vmfs" which we need to get rid of. The leading number (in blue) is the partition number.

To delete the partition:
partedUtil delete /vmfs/devices/disks/

Sample output:
partedUtil delete /vmfs/devices/disks/vml.010000000035303032364237323535303638443631202020204b494e475354 1

Done. Look in vSphere web client and it should now report 0 primary partitions on that disk and you're free to use it for something else.

Check the partition table:
partedUtil getptbl /vmfs/devices/disks/vml.010000000035303032364237323535303638443631202020204b494e475354
gpt
14593 255 63 234441648

Saturday, December 10, 2011

Virtualization Workshop

Greetings humans and bots!

I'll be presenting and showcasing a VMware vSphere5 virtualization workshop at Kuwait IT Society in Rouda area on Wednesday at 7 PM.


What is virtualization? What does it have to do with cloud computing? What features does it offer? Is it worth the hype & the investment?
All of that & more plus a live demo of a VMware infrastructure in the session. No cats will be hurt during the demo.

Note: I'll briefly mention the differences between offerings from Citrix, RedHat, Microsoft, VMware & IBM, but most of the focus will be on VMware as it's my area of expertise.

The event is free for all to attend so feel free to invite others.

Tuesday, March 29, 2011

PXE Installation of VMware ESXi 4.1

Introduction

Installing ESXi on multiple hosts at the same time over the network is achieved through PXE booting. Unfortunately many of the guides I found online take a long route to setup PXE booting on Linux and install multiple programs, each with its own config file which complicates the matter.

I chose to use DNSmasq because it provides DHCP, DNS, PXE & TFTP services all in one program. In addition, thanks to Simon, he added a feature where you could assign IPs sequentially rather than based on the Mac address. Read here for details.

This mini-guide assumes the use of Linux. If you're a Windows user, I suggest you use 3C Daemon tool from 3Com which offers DHCP, FTP, TFTP & PXE services for Windows.

I have setup a virtual machine dedicated to PXE booting & installation to make it portable & share it with others. Feel free to run your tests on a VM or a physical box.

Requirements

  • Linux OS. My choice was Debian.
  • VMware ESXi Hypervisor ISO file.
  • Internet connection.
  • pxelinux.0 file from syslinux version 3.
  • Chocolate chip cookies. mmmmm.

Installation & Configuration

0] Install the operating system (Debian) and setup a static IP on the NIC.
1] Edit the file: /etc/network/interfaces -- My editor of choice is nano.
auto lo
iface lo inet loopback

allow-hotplug eth0
iface eth0 inet static
   address 10.172.0.250
   netmask 255.255.255.0
   gateway 10.172.0.254

2] Run the command: service networking restart
Note: In the initial setup, put the IP above to match your network to be able to download then change it once you're done with this guide to the above to avoid conflicts with any network.

3] Install apache and dnsmasq: apt-get install apache2 dnsmasq
4] Edit: /etc/dnsmasq.conf
dhcp-range=10.172.0.1,172.10.0.100,255.255.255.0,infinite
dhcp-option=66,10.172.0.250
dhcp-option=67,"pxelinux.0"
dhcp-boot=/srv/tftp/pxelinux.0
enable-tftp
tftp-root=/srv/tftp

Note 0: The IPs above do not need to match your network.
Note 1: "infinite" is the lease time. The ESXi installer invokes a lease-release token which will cause the IP to be used by another host. I did not want that to happen because I have scripts assigning hosts their IPs sequentially.

5] Create the directory structure: mkdir -p /srv/tftp/pxelinux.cfg

6] Download syslinux v3, extract pxelinux.0 & put it in /srv/tftp: wget <URL>
7] Extract the files: tar -xf <File name>
8] Copy pxelinux.0: cp ./syslinux-3.86/core/pxelinux.0 /srv/tftp/
9] Create PXE boot file: nano /srv/tftp/pxelinux.cfg/default and edit it:
default esxi_scripted
label esxi_scripted
   kernel vmware/esxi411/mboot.c32
   append vmware/esxi411/vmkboot.gz ks=http://10.172.0.250/ks.php --- vmware/esxi411/vmkernel.gz
   --- vmware/esxi411/sys.vgz --- vmware/esxi411/cim.vgz ---
   vmware/esxi411/ienviron.vgz --- vmware/esxi411/install.vgz

prompt 0
timeout 10

Note: Make sure all of the append parameters are on one line. It may pan out here due to little page width.

A] Edit: /var/www/ks.php
accepteula
rootpw password
autopart --firstdisk --overwritevmfs
install url http://10.172.0.250/vmware/esxi411
network --bootproto=dhcp --device=vmnic0
reboot

The above is a kickstart script which the ESXi installer will execute. These are the defaults that are found in the PXE Guide by VMware.
Note: This will install to the first disk detected by the BIOS and will overwrite existing VMFS filesystems.

File Preparation

B] mkdir -p /srv/tftp/vmware/esxi411
C] Copy the contents of the ISO file to the directory above. You can mount an ISO by: mount -o loop /path/to/isofile /mnt. The files will be in /mnt: cp -Rv /mnt/* /srv/tftp/vmware/esxi411/
D] Link to vmware directory: ln -s /srv/tftp/vmware /var/www/vmware
E] service dnsmasq restart

By now, things should be good to go!

Caveats

  • If you set this in a VM, keep the NIC disabled by default to avoid wiping systems by mistake and broadcasting DHCP over the LAN.
  • If using a VM, the physical adapter must have a static IP not set on DHCP
  • To reset the list of leases: echo "" > /var/lib/misc/dnsmasq.leases

This shows a very basic and default setup of installing ESXi over multiple boxes. Hopefully I'll have the time to post my custom scripts that integrate into the kickstart script to auto-assign IPs, VLANs, and a few more tasks to streamline the installation.

Saturday, March 12, 2011

DNSmasq Offers Sequential IP Addressing

A few days back Simon, the developer of DNSmasq, added an option for DNSmasq to serve IPs in a sequential manner rather than based on a hash of the MAC address, upon my request.

He was kind enough to implement it, allowing me to use DNSmasq as a DNS, DHCP, PXE & TFTP daemon for my VMware ESXi automated deployments.

This feature is available in version 2.58 test 4. I tested it on a bunch of virtual machines simulating an ESXi installation and everything went smooth.

I have to note: If you're using it for ESXi deployments, you may want to set the lease expiration time to infinite because the ESXi installer sends a lease release after the installation is done, causing subsequent hosts to get the same IP.

Big thanks go to Simon!

Friday, March 4, 2011

VMware ESXi 4.1 on IBM BladeCenter with Nortel Switches

Update: We resolved the issue permanently and I understand what was going on, but have little time to post everything soon. If you're in a hurry and want help, leave a comment or email me.

One of our customers purchased two BladeCenter H Chassis for deploying VMware on them. Each chassis came with two Nortel switches providing 2 internal ports and 9 external ports. The external network ports are: 3x 10Gbit and 6x 1Gbit.

The customer has a physically isolated DMZ network, so one 1Gbit port from each switch was dedicated to a DMZ switch (VLAN1).

The client had purchased only 2x 10Gbit SFPs, so the third port was empty and won't be used in this setup.

To make use of VMware's Virtual Switch Tagging (VST) network concept, the switches which the blades have to be connected to must be configured as a trunk and allow the required VLANs to pass. Also, the Nortel switch on the BladeCenter must be configured to pass those VLANs, for both external and internal ports.

The following VLANs were created:

  • Management
  • vMotion
  • Fault Tolerance (FT)
  • Virtual Machines
After configuring the external and internal ports of the Nortel switch to be part of those VLANs, a strange problem popped up: I couldn't ping or reach any of the ESXi hosts in any way, unless I pinged my workstation from within the ESXi server first!

To make matters clear, here's how things were connected:
My workstation -> Server Farm Switch
BladeCenter -> Server Farm Switch

Ping from workstation to any ESXi host: Fails
After 1 ping from an ESXi host to my workstation: Succeeds, and all pings from my workstation to that specific ESXi host go through.

Also, even after traffic is established and I connect using vSphere Client, it disconnects me after about 15 minutes and I can no longer communicate with that host until I ping my workstation from that host again!

After poking around for hours, the solution was to take one external port (1Gbit) out of all VLANs except 1. That is, that port must not belong to any VLAN except VLAN1 (untagged). Doing so, allowed us to communicate with all servers smoothly.

I still don't understand why that worked and whether traffic is now passing through the tagged external ports or that specific untagged port. I'll be doing more investigations next week and update this post.

Monday, February 14, 2011

P2V Conversion of OEM Windows Systems

A physical to virtual conversion of a machine running an Original Equipment Manufacturer (OEM) Windows license will not be without hiccups.

Because the OEM validates the product key against the hardware itself, after the conversion process, the validation program will not find any OEM hardware thus rejecting all keys, even the standard ones. This is true for desktops, laptops and servers.

If you don't know what OEM is, it's similar to buying a Lenovo laptop with Windows preinstalled on it. In this case, all the hardware was provided by one manufacturer and the operating system (OS) will validate against the OEM hardware only.

The only solution is to obtain a Volume Licensing media of the same OS and a product key for it, then perform an OS repair (not using the recovery console).

Simply put, you boot up from the media, proceed as if you want to install, then select the partition that has been detected to have an existing OS and select Repair rather than a fresh installation.

All your settings and configurations will be preserved for your programs. You may need to reinstall certain hot fixes or a service pack.

Note: If setup cannot see the SCSI hard disk (in case of Windows XP), see this KB.

References:

Sunday, January 30, 2011

Converting Windows 2000 with VMware Converter

Converting a Windows 2000 machine has a bunch of caveats and problems when going from physical to virtual (p2v), using VMware vCenter Converter Standalone.

Requirements:
  • VMware Standalone Converter version 4.0.1 (See Additional Info at the end)
  • Update Rollup 1 for Windows 2000 SP4 (KB891861)
  • Windows 2000 Sysprep tools (Q257813)
  • A Windows or Linux LiveCD. I recommend Knoppix (6.4+ - Linux) or Hiren (Windows).
    If you need to modify registry keys, use Hiren.

Procedure:
  1. Install VMware Standalone Converter version 4.0.1
  2. Extract sysprep tools and place them in C:\Documents and Settings\All Users\Application Data\VMware\VMware vCenter Converter Standalone\sysprep\2k
    That should be on the same machine that has VMware Converter, not the Windows 2000 server.
    * On Windows 2008, the location is C:\Users\All Users\VMware\VMware vCenter Converter Standalone\sysprep\2k (Thanks Anonymous for the tip!)
    or C:\ProgramData\VMware\VMware vCenter Converter Standalone\sysprep\2k (thanks Ben!)
  3. Either apply the update rollup to the server or extract the update rollup and replace it with the file SCSIPORT.SYS in C:\WINNT\system32\drivers. Applying the update is recommended if the system is stable.
  4. If you’re using a static IP on the Windows 2000 server, see this Knowledge Base article.
  5. Run the Converter and deploy the agent. If you’re asked to restart, restart then start the VMware Converter service manually before running the Converter again, otherwise it’ll ask you to deploy the agent again.
  6. In Step 3: View / Edit Options, Click on the Devices pane and change the disk controller to BusLogic SCSI.
  7. Keep the number of processors as is, because if you change it, Windows 2000 won’t auto-detect new CPUs and you’ll need to update the Hardware Abstraction Layer (HAL) on it manually. See KB234558 and KB249694 for more details.
  8. In the Networks pane, deselect the option to connect at power on.
  9. In the Advanced Options pane, do not select the options to power off the source and select the option to power on the target (VM). Do install VMware tools.
    Do NOT select "configure guest preferences for the virtual machine"
With that, you should be set to convert that machine. After the conversion is complete, the VM will start, install VMware tools, then restart. After it comes up you should apply the proper network settings then shutdown and enable the NIC to connect at power on.

Problems and Solutions:
  • "disk read error" when starting the virtual machine.
    This happens because you have selected the Disk Controller as “Preserve Source” or “IDE” -- you must select “SCSI” -- after doing so, you’ll need to reconvert the machine.
  • “KMODE_EXCEPTION_NOT_HANDLED” Blue Screen of Death (BSOD) during boot up.
    This happens because Windows 2000 is using the old SCSI driver (SCSIPORT.SYS).
    You must boot into a LiveCD and replace the file in the location mentioned above.
    This happened to me even after I copied the SCSIPORT.SYS to the target machine before converting.
  • After installing the Converter agent, you face problems & restart the Windows 2000 server, then when running converter again, it asks you to re-deploy the agent.
    This happens because when the Windows 2000 system comes up again, the Converter agent service isn’t started again.
    Open the services console (services.msc in run) and right-click VMware Converter then choose Start. After the service is started, run VMware Converter and it should connect.
  • Unable to communicate to the agent.
    The network traffic is probably blocked by firewalls that are on the Converter machine, the Windows 2000 target machine or in between. Make sure the firewalls are disabled or port 9089 is allowed to pass through.
  • "Inaccessible boot device" Blue Screen of Death (BSOD) during boot up.
    This happens due to some misconfiguration of drivers in the registry.
    To fix this, run the Converter program again and do a machine reconfiguration only (don't reconvert). Let it install VMware Tools, select "Reconfigure destination virtual machine" and do NOT select "Configure guest preferences for the virtual machine"
    If that does not solve your problem, read this thread.

Using The Linux LiveCD:
If you’re new to Linux, then here are some steps to help you replace files on virtual machines.

  1. Boot the virtual machine from the LiveCD, by either attaching the ISO file from the data store, your machine, or burning the ISO to a CD (as an image!) and booting it from your CD drive.
  2. At the boot prompt of Knoppix, just press enter to boot into the graphical interface.
  3. Now we need to attach the VM’s disk to the Linux system: open a root shell / terminal.
  4. Type: fdisk -l
    This will list all disks in your VM. Identify your operating system hard disk (by capacity if possible). If it’s not possible, then proceed with the next steps until you find your desired partition by looking at its contents.
    You will see things like: /dev/sda, /dev/sda1, /dev/sda2, ...etc. sda is your first hard disk. sdb is your second hard disk. sda1 is the first partition in your first hard disk.
  5. Type: mkdir /mnt/os
  6. If your operating system (OS) is installed on the first hard disk, first partition, then type: mount /dev/sda1 /mnt/os
  7. You can now open a file manager in the graphical interface and go to this directory: /mnt/os -- you’ll see the contents of that partition.
    If that is not your desired partition, skip to step 10 then try mounting another partition.

    Note: Make sure you mount a partition & not a disk!
    mount /dev/sda1 is correct. mount /dev/sda is not.
  8. To copy a file over the network from a Windows share on another machine, open a file manager and in the address tab type: smb://ip
    Example: smb://192.168.0.1, where the IP is of the machine you want to access over the network to copy a file from.
  9. Right click & copy the file, then go to /mnt/os and paste it there.
  10. You’re almost done. Now you just need to unmount the partition, so close the file manager window that opens /mnt/os and then in the root shell type: umount /mnt/os
  11. Reboot the VM and unattach the CD / ISO.

Additional Info:
  • Knoppix is like any *nix system: case-sensitive when it comes to file names. So you may have to delete to the original file manually then copy the new .SYS file due to the difference in letter case.
  • The sysprep tools will be used by the VMware Converter to prepare a new copy of Windows. It’s required for the cloning process.
  • Support for Windows 2000 has been dropped in VMware Converter version 4.3.
  • VMware Converter Standalone is free. VMware requires that you register to be able to download, but their servers are slow (at least in my experience). I got my copy from 4shared, so just search for it & verify the md5 checksum.
    Windows: VMware-converter-4.0.1-161434.exe - 35f22a3b40b114d70cdbda2d5056c10f
    Linux: VMware-converter-4.0.1-161434.tar.gz - 90ce68a9f75af91aed9119d419a98b3c
  • LiveCD Selection: You can choose anything that works for you as long as it has SCSI disk drivers, otherwise you won’t be able to see the VM’s disks (which is why getting Damn Small Linux was a waste of time...) and can read & write to the NTFS filesystem.

Friday, December 28, 2007

VMware Server 1.0.4 on Slamd64

I was able to successfully install VMware Server on my Slamd64 box. I had a few problems here & there, and had a tough time gathering the pieces, so I thought I'd mention them. (I have posted on Slamd64's forum as well)

Some steps are similar to those when installing VMware workstation on Slackware, and have been copied from online pages. The links to these resources are found at the end.

First, make sure that you have the following package (or newer): gcc32-4.1.2-x86_64_slamd64-2.tgz
This is mandatory to run vmware console properly on any 64-bit Linux distro. Without that package, the VMware console will be able to connect, but will not allow you to create any VM.


Make sure you download ALL Linux packages from VMware (except the RPM): http://register.vmware.com/content/download.html

List of packages:
VMware-mui-1.0.4-56528.tar.gz
VMware-server-1.0.4-56528.tar.gz
VMware-server-linux-client-1.0.4-56528.zip (not really needed)
vmware-any-any-update115.tar.gz

You will need a serial number, so register. It's free.

You will also need the kernel source package; if you're using the stock kernel (the default), the source for it is on the installation CD, under the name "kernel-source-2.6.18.8_smp-noarch_slamd64-1" and can install it using "pkgtool", otherwise if you had compiled your own kernel, you should be OK.

Now, that you have downloaded the VMware packages & installed gcc32, proceed with these steps:

1st we need to create the init directories in a way VMware likes
cd /etc
mkdir init.d
for i in {0,1,2,3,4,5,6}; do mkdir rc$i.d; done


# Side Note
# Since VMware will run suid root, you might want to limit program execution
# to a particular group of users (I created a 'vmware' group in /etc/group and added the desired users). Refer to the reference link at the end for more info.

First, unpack the server
tar -xf VMware-server-1.0.4-56528.tar.gz


cd & start the installation -- go with the defaults
WARNING: The last step will ask you to run vmware-config.pl , choose NO!
cd vmware-server-distrib/
./vmware-install.pl


If you happen to have kernel 2.6.19 or above, you need to download this patch (or newer): http://knihovny.cvut.cz/ftp/pub/vmware/
tar -xf vmware-any-any-update115.tar.gz
cd vmware-any-any-update115
./runme.pl


# If all goes smooth, you'll see something like this
Updating /usr/bin/vmware-config.pl ... now patched
Updating /usr/bin/vmware ... No patch needed/available
Updating /usr/bin/vmnet-bridge ... No patch needed/available
Updating /usr/lib/vmware/bin/vmware-vmx ... No patch needed/available
Updating /usr/lib/vmware/bin-debug/vmware-vmx ... No patch needed/available
VMware modules in "/usr/lib/vmware/modules/source" has been updated.


Don't run the config. You need to run it with --compile
vmware-config.pl --compile


For some dumb reason, they use this path for VMs:
/var/lib/vmware/Virtual Machines

Having spaces in paths could cause you problems you don't really need, so I changed the path to
/var/lib/vmware/vms


All should be dandy now.
If you have noticed, the "VMware VmPerl Scripting API" was installed. So, no need to install it from the client package, if you needed it in the first place.

Now we untar & install the MUI package
tar -xf VMware-mui-1.0.4-56528.tar.gz
cd vmware-mui-distrib/
./vmware-install.pl


You should be able to access the web interface at https://localhost:8333 ; Use your system username & password to login. The web interface doesn't allow you to create VMs. And it doesn't work properly with Konqueror.
If you want the graphical console, run vmware.

You might want to chown the directory where you save your VMs, /var/lib/vmware/vms in my case, to your user, so you could have write access.

Happy VMing!

Reference: http://www.cs.ucr.edu/~jbyrne/vmware.htm