Code Monkey home page Code Monkey logo

ubuntu-mini-setup's Introduction

Creating VM from ISO

VirtualBox Setup

Add Second Network Adapter

  • Add host only adapter
  • Select ‘Allow All’ or ‘Allow VMs’ for Premiscuous Mode
  • Check Cable Connected

Guest Setup

Sudo setup

add user to sudo group

usermod -aG sudo dhyan

visudo

Add to the last line

dhyan ALL=(ALL) NOPASSWD: ALL

Start Second Network Card

Install net-tools

sudo apt install net-tools

Check name of the second Network card

ip link

Add Second Card in /etc/netplan/01-netcfg.yaml

network:
  version: 2
  renderer: networkd
  ethernets:
    enp0s3:
      dhcp4: yes
    enp0s8:
      dhcp4: yes

Install SSH Server

sudo apt install openssh-server
sudo systemctl enable sshd
sudo systemctl start sshd

Reboot

Add public key in host

Get IP

ifconfig

Update hosts file

Run Ansible script

ansible-playbook -i environments/dev -u dhyan addKey.yml -e "pub_user=dhyan" --ask-pass

Update ssh config

Import from VM Appliance

Import appliance from D:\VirtualBoxVms\Ubuntu Mini.ova

Select option to assign new mac address for all network adapters

Login dhyan/2105#xXf

ifconfig and make sure the enp0s8 has non-conflicting IP address

If so, reassing IP using

sudo dhclient -r enp0s8
sudo dhclient enp0s8

NOTE May have to repeat couple of times to obtain new address

Run Ansible Script

Activate Python Virtual Env

pyenv virtualenvs # list environments

pyenv activate [tff_venv_3.6] # activate environment

Run Script

ansible-playbook -i environments/dev -u dhyan --private-key=~/.ssh/id_rsa setup.yml

Post Setup

Insert Guest Additions CD Image from Virtual Box Menu

Run nautilus and open Guest Additions location in terminal

Run VBoxLinuxAdditions.run

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.