Tuesday, 1 April 2014

Cannot Create Hyper-V Virtual Machine within VMware Workstation VM

Cannot Create Hyper-V Virtual Machine within VMware Workstation VM

When virtual machine is created inside VMware workstation, under normal conditions, it can be used to install 32-bit version of the operating systems. In case you want to install 64-bit version of the operating systems, your physical computer (host computer) must have Hardware Accelerated Virtualization integrated in it.

When talking about Hyper-V, it is the role of Windows Server 2008 and Windows Server 2012 and is only available in the 64-bit versions of these network operating systems (NOS). Since Hyper-V is the feature using which administrators can create multiple virtual machines within a single host Windows Server 2008 or Windows Server 2012 OS, the process of installing either of these operating systems within the VMware Workstation, and creating and using virtual machines within these operating systems using Hyper-V can be referred to as nested virtualization.

If your computer has Hardware Accelerated Virtualization present in it, 64-bit Windows operating systems can be installed easily on the virtual machines within the VMware Workstation. However to install Hyper-V and then to install and use the virtual machines within a virtual machine in the VMware Workstation, you must create your VMware Workstation virtual machine and modify its .VMX file accordingly.

Below is the process using which you can create VMware Workstation virtual machine and modify its .VMX file so that the VM can be used to install Hyper-V and can allow you to create a nested virtualization setup:


  1. Log on to the computer with the user account on which the virtual machine is to be customized for Hyper-V.
  2. If already not created, create a new virtual machine in the VMware Workstation selecting the Microsoft platform with Windows Server 2008 x64 operating system in the Select a Guest Operating System window during the VM creation process.
  3. Once the virtual machine is successively created, on the VMware Workstation console, click to select the target virtual machine tab.
  4. Once selected, click the Edit virtual machine settings option from the right pane of the VMware Workstation interface.

  5. On the Virtual Machine Settings box that appears, make sure that the Hardware tab is selected.
  6. In the left pane, click to select Processors option.
  7. In the right pane, from the Preferred mode drop-down list under the Virtualization engine section, choose the Intel VT-x/EPT or AMD-V/RVI option.
  8. Also, check the Virtualize Intel VT-x/EPT or AMD-V/RVI checkbox from the same interface.

  9. Finally click OK button to save the changes.
  10. Once the entire process is complete, exit the VMware Workstation application.
  11. Using the Windows Explorer, locate the corresponding .VMX file of the virtual machine.
  12. Open the located file in the Notepad application.
  13. Add the hypervisor.cpuid.v0 = “FALSE” perimeter at the end of the file.

  14. Save the file, and start the VMware Workstation application.
  15. Run the target virtual machine, install Windows Server 2008 64-Bit operating system on the VM, and install the Hyper-V or role to configure the nested virtualization network setup.

Add secondary Hard Disk in Linux/RHEL/CentOS

Add secondary Hard Disk in Linux/RHEL/CentOS

Step I
Make use you are under root mode.
  1. # su -  
Step II
Check your hard disk list

  1. [root@localhost ~]# fdisk -l  
  2. Disk /dev/sda: 500.1 GB, 500107862016 bytes  
  3. 255 heads, 63 sectors/track, 60801 cylinders  
  4. Units = cylinders of 16065 * 512 = 8225280 bytes  
  5. Device Boot      Start         End      Blocks   Id  System  
  6. /dev/sda1               1           7       56196   de  Dell Utility  
  7. /dev/sda2   *           8        7187    57671680    7  HPFS/NTFS  
  8. /dev/sda3            7187       32684   204800000    7  HPFS/NTFS  
  9. /dev/sda4           32685       60801   225849802+   5  Extended  
  10. /dev/sda5           32685       39058    51199123+  83  Linux  
  11. /dev/sda6           39059       39319     2096451   82  Linux swap / Solaris  
  12. /dev/sda7           39320       60801   172554133+  83  Linux  
  13. Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes  
  14. 255 heads, 63 sectors/track, 121601 cylinders  
  15. Units = cylinders of 16065 * 512 = 8225280 bytes  
  16. Disk /dev/sdb doesn't contain a valid partition table  
Step 3
Initialize the hard disk.
    [root@]# fdisk /dev/sdb
    Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
    Building a new DOS disklabel. Changes will remain in memory only,
    until you decide to write them. After that, of course, the previous
    content won't be recoverable.
    
    
    The number of cylinders for this disk is set to 30515.
    There is nothing wrong with that, but this is larger than 1024,
    and could in certain setups cause problems with:
    1) software that runs at boot time (e.g., old versions of LILO)
    2) booting and partitioning software from other OSs
       (e.g., DOS FDISK, OS/2 FDISK)
    Command (m for help): m
    Command action
       a   toggle a bootable flag
       b   edit bsd disklabel
       c   toggle the dos compatibility flag
       d   delete a partition
       l   list known partition types
       m   print this menu
       n   add a new partition
       o   create a new empty DOS partition table
       p   print the partition table
       q   quit without saving changes
       s   create a new empty Sun disklabel
       t   change a partition's system id
       u   change display/entry units
       v   verify the partition table
       w   write table to disk and exit
       x   extra functionality (experts only)
    
    Command (m for help): n
    Command action
       e   extended
       p   primary partition (1-4)
    p
    Partition number (1-4): 1
    First cylinder (1-30515, default 1): <enter>
    Using default value 1
    Last cylinder or +size or +sizeM or +sizeK (1-30515, default 30515): <enter>
    Using default value 30515
    
    Command (m for help):
You may set your disk as your wish, please press "m" to get help.

Now that we’ve created the partition scheme we’d like, we need to write the changes to the disk partition table.
    Command (m for help): w
    The partition table has been altered!
    
    Calling ioctl() to re-read partition table.
    Syncing disks.
    [root@quetzalcoatl ~]#
Step 4
Format the new partition

[root@localhost ~]# mkfs -t ext3 /dev/sdb1  
Step 5
Create mount point and set up automatic mount when system start up.
  1. [root@localhost ~]# mkdir /newdisk  
Add the following line into fstab.
    1. #vim /etc/fstab
      /dev/sdb1   /newdisk   ext3   default 
      0   1