Archive

Archive for September, 2014

Running Bitnami LAMP stack in HyperV

September 21, 2014 1 comment

Bitnami has several nice prebuilt linux machines that is very useful for quick deploy.

 

In order to make it easier, you just need to setup a base image for the Bitnami LAMP stack VM

 

Download these first

Bitnami LAMP Stack: Goto https://bitnami.com/stack/lamp and grab the vmware virtual machine image

Microsoft Virtual Machine Converter Solution Accelerator 2.0: Goto http://www.microsoft.com/en-sg/download/details.aspx?id=42497 and grab the msi file

 

Convert VMDK to VHD

Run an administrative powershell instance and run the following 2 commands

# Import the MVMC cmdlets
Import-Module ‘C:\Program Files\Microsoft Virtual Machine Converter\MvmcCmdlet.psd1’

 

#Convert the VMDK to VHDX

ConvertTo-MvmcVirtualHardDisk -SourceLiteralPath bitnami-lampstack-5.4.32-0-ubuntu-14.04.vmdk -DestinationLiteralPath bitnami-lampstack-5.4.32-0-ubuntu-14.04.vhdx -VhdType DynamicHardDisk -VhdFormat Vhdx

 

Once the conversion is complete, use the HyperV –> Edit Disk function to compact the VHDX to save space

Create HyperV VM

Once done, just create a normal VM, there is no need to restrict yourself to the legacy network adapters, the new one works fine

 

image

 

Setting up your bitnami VM

Follow the guide found at http://wiki.bitnami.com/Virtual_Appliances_Quick_Start_Guide

 

You can also refer to https://jefferytay.wordpress.com/2014/09/20/common-setup-commands-for-ubuntu-12-x-onwards/ for some of the more administrative functions

 

Updating Integration Services

Issue the following command: sudo pico /etc/initramfs-tools/modules

 

Add these 4 items to the end of the file

hv_vmbus
hv_storvsc
hv_blkvsc
hv_netvsc

image

Now rebuild the boot image

sudo update-initramfs –u

image

The guest OS needs to be rebooted:

sudo shutdown -r now

After the virtual machine reboots, run the following command to check if the modules are enabled:

lsmod

image

Categories: HyperV

Common Setup Commands for Ubuntu 12.x onwards

September 20, 2014 1 comment

To change the hostname of the machine
sudo nano /etc/hostname

sudo nano /etc/hosts

To change the IP Address of the machine

sudo vi /etc/network/interfaces

auto eth0
iface eth0 inet static
        address 192.168.1.100
        netmask 255.255.255.0
        network 192.168.1.0
        broadcast 192.168.1.255
        gateway 192.168.1.1
        dns-nameservers 8.8.8.8 8.8.4.4

sudo /etc/init.d/networking restart

To change the account password

passwd

To shutdown the machine

sudo shutdown –h 0

 

To install and enable openssh

sudo apt-get update
sudo apt-get install openssh-server
sudo ufw allow 22

 

sudo nano /etc/ssh/sshd_config
# line 28: uncomment and change ‘no’
# default setting "without-password" means that root login is permited but require keys authentication
PermitRootLogin no

 

sudo initctl restart ssh

Categories: Ubuntu