Monday, May 25, 2015

Install Linux on Virtualbox with command line


Table of Contents

1. Install virtual box

On an Arch machine

Update arch before installing
$ pacman -Syu $ pacman -S virtualbox Install other optional dependencies for virtualbox
  • qt4: GUI support
  • vde2: Virtual Distributed Ethernet support
  • virtualbox-guest-iso: Guest Additions CD image
  • virtualbox-ext-vnc: VNC server support
  • virtualbox-sdk: Developer kit
  • virtualbox-host-dkms: Build kernel modules with DKMS
  • net-tools: Host-only or bridged networking support [installed]
Install VirtualBox extention pack
$ wget "http://download.virtualbox.org/virtualbox/4.3.26/Oracle_VM_VirtualBox_Extension_Pack-4.3.26.vbox-extpackvbox"
$ sudo VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-4.3.26.vbox-extpack

2. Download Arch Installer

Go to https://www.archlinux.org/download/ and download from one of the links
$ wget -p ~/Downloads "http://mirrors.advancedhosters.com/archlinux/iso/2015.05.01/archlinux-2015.05.01-dual.iso"

3. Arch instalation on virtualbox

3.1 List all installed vms on our virtualbox

This currently returns nothing as there are no installed vms
$ VBoxManage list vms

3.2 List ostypes recognised by virtualbox

$ VBoxManage list ostypes | grep -i -A4 arch
ID:          ArchLinux
Description: Arch Linux (32 bit)
Family ID:   Linux
Family Desc: Linux
64 bit:      false

ID:          ArchLinux_64
Description: Arch Linux (64 bit)
Family ID:   Linux
Family Desc: Linux
64 bit:      true 

3.3 Create and register a virtual machine with name 'vm-arch-home' with ostype ArchLinux_64

$ VBoxManage createvm –name 'vm-arch-home' –ostype ArchLinux64 –register
Virtual machine 'vm-arch-home' is created and registered.
UUID: 17bf6520-2c03-4542-830f-2d335669ccd4
Settings file: '/home/younus/VirtualBox VMs/vm-arch-home/vm-arch-home.vbox'

3.4 Modify vm to setup memory, cpus, bridgeadaptor, clipboard, etc..

Bridge adaptor can be optained by ifconfig command as shown bellow
$ VBoxManage modifyvm 'vm-arch-home' –memory 3048 –cpus 2 –pae on –acpi on –hpet on –ioapic on –hwvirtex on –vtxvpid on –accelerate3d off –audio none –chipset ich9 –nic1 bridged –bridgeadapter1 wlp2s0 –nictype1 82543GC –vrde on –vrdeport 5555 –clipboard bidirectional

3.5 Create a sata controller named storage for the virtual disk

$ VBoxManage storagectl 'vm-arch-home' –name storage –add sata –controller IntelAHCI –portcount 4 –hostiocache off

3.6 Create and add storage as virtual disk of size 10Gb and setup permisions

$ sudo VBoxManage createhd –filename /storage/soft/vbox/vm-arch-home/root-sda.vdi –size 10240
0%…10%…20%…30%…40%…50%…60%…70%…80%…90%…100%
Disk image created. UUID: 7ee167ba-0157-46a4-b3a2-12cd3702f81c
$sudo chmod 777 /storage/soft/vbox/vm-arch-home/root-sda.vdi Attach the hardisk to sata controller on port 1
$ VBoxManage storageattach 'vm-arch-home' –storagectl storage –port 1 –medium /storage/soft/vbox/vm-arch-home/root-sda.vdi –type hdd

3.7 Attach the arch dual boot instaler iso file to port 2 of the sata controller

$ VBoxManage storageattach 'vm-arch-home' –storagectl storage –port 2 –medium archlinux-dual.iso –type dvddrive

3.8 Set vm to boot from dvd

$ VBoxManage modifyvm 'vm-arch-home' –boot1 dvd

3.9 Boot the newly created vm

$ VBoxHeadless -s 'vm-arch-home' &

3.10 Remotely access the desktop of the vm

$ rdesktop-vrdp localhost:5555

4 Other usefull commands

4.1 Listing extention packs installed on virtualbox

$ sudo VBoxManage list extpacks

11 comments:

  1. The virtual box Meta package is not accessible on my Ubuntu15.04 cloud descriptions so I have to pay to have research paper written
    put in the repo and modernize first.

    ReplyDelete
  2. Linux is the best software in the world because we still need it to install some thing more to have allot of changes in life quality essay writing

    ReplyDelete
  3. A list of chapters, typically headed just "Substance" and abridged casually as TOC, is a rundown, generally found on a page before the begin of a composed work, of its part or area titles or brief portrayals with their starting page numbers. Nicolas Cage Leather Coat Buymoviejackets

    ReplyDelete
  4. VirtualBox accompanies a suite of charge line utilities, and you can someone to write my assignment utilize the VirtualBox order line interfaces (CLIs) to oversee VMs on a remote headless server.

    ReplyDelete
  5. VBoxManage is the command-line boundary to VirtualBox taht you canister use to absolutely organize VirtualBox from the authority line of your host working organization. Write My Essay For Me

    ReplyDelete
  6. VirtualBox goes with a suite of charge line utilities, and you Buy Dissertation Online | Dissertation Point use the VirtualBox arrange line interfaces (CLIs) to supervise VMs on a remote headless server.

    ReplyDelete
  7. Linux is the best programming on the planet since despite everything we require it to introduce something more to have apportion of changes in life Dissertation Writing Online

    ReplyDelete
  8. Windows will still be vulnerable to the same security threats even if it was installed on a virtual machine inside Linux.

    Assignment Help

    ReplyDelete
  9. Even though I assigned some stud the learning in technologies is help perfect for all need is an office program, internet browsing and email related to for assistance points use these techniques !
    Can Do my Dissertation UK For help in my University Project?

    ReplyDelete
  10. I really happy found this website eventually jason statham jacket online. Really informative and inoperative, Thanks for the post and effort! Please keep sharing more such blog. Now I saved it to my bookmarks so that I can keep me in touch with you.

    ReplyDelete