Monday, September 26, 2016

Ubuntu On Windows


Enable Hyper V
Start  - Control Panel - Programs - Turn Windows Features On - enable all - Reboot



Enable Networking
Open up Hyper-V Manager.
Right-click on the name of the Hyper-V host and select Virtual Switch Manager...
Under ‘Virtual Switches’, select New virtual network switch.
Under ‘What type of virtual switch do you want to create?’, select External.
Select the Create Virtual Switch button.


Under ‘Virtual Switch Properties’, give the new switch a name such as VM Virtual Switch.
Under ‘Connection Type’, ensure that External Network has been selected.
Select the physical network card to be paired with the new virtual switch. This is the network card that is physically connected to the network. I use my wireless to prevent disruptions in my work.



Create a New VM
New Virtual Machine





























(click Do Not Show This Page Again if you see the Before You Begin splash)
Name your Vm and change the default location to your D: drive I keep all my disk images in the same sandbox folder



Use a Gen 2 VM unless told otherwise by the disk image source
Determine your free memory with your normal applications open
$>  (Get-Counter -Counter "\Memory\Available MBytes" ).CounterSamples[0].CookedValue
Allocate free RAM






















Create Virtual HDD



Install Options


Follow the instructions from the vendor are found here
NOTE: The memory settings for this are set to 3 GB. Adjust based on your machine resources.



Disable Secure boot in VM properties






Install OS

Add an alias for the VM
  1.  
  2. Open C:\Windows\System32\drivers\etc\hosts
  3. Add the line
192.168.56.101  sandbox.hortonworks.com

WARNING: Do not save this file with a .txt extension

Starting the VM
Start the VM service


Start the VM



The status should change to Running


Debugging Steps

Network Debugging

Enable virtual switch for both Ethernet and Wireless Adapters
Control Panel\Network and Internet\Network Connections
OR
Device Manager > Your PC > Network adapters





Performance Debugging
  1. If you are having a lot of IO contention, maximize the disk transfer rate.
Ensure that you are not compressing the contents.


Do not disable Write Cache on the drive


  1. If you cannot find the disk image during the import or see the logon failure error (below), bounce the Hyper V service.


  1. If you get a memory error, as below, change the memory settings based on your system (start with 3072 MB and go to 2560 then 2048 if you have issues)

  1. Am I Running?
    1. From a command line ping the hostname
ping -n 1 sandbox.hortonworks.com

Pinging sandbox.hortonworks.com [192.168.56.101] with 32 bytes of data:
Reply from 192.168.56.101: bytes=32 time<1ms TTL=64

Ping statistics for 192.168.56.101:
    Packets: Sent = 1, Received = 1, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum = 0ms, Average = 0ms

This is a typical performance profile during a boot sequence. Note that the VM is IO bound (E: has the virtual disk)

No comments:

Post a Comment