As the doctor gone rogue

February 9, 2017

Get a new IP address for a running VirtualBox Ubuntu Machine

Filed under: SysAdmin, ubuntu, Virtual Machine — Tags: , , , — hypotheses @ 9:09 am

Situation

You have started up a virtual machine in VirtualBox. In this case, I ran Ubuntu 16.10. You then realized that the IP address of your VM is not accessible from your local network. Although you can connect from the Host to your Guest VM (Ubuntu).

Therefore, you would like to change the type of network from “NAT” to “Bridge”. You did this through the GUI menu (Machine > Setting > Network > Adapter 1 –> Change to “Bridged Adapter”

OK, now what. You IP addresses is still the same.

You can check your current IP and network device with

ubuntu:~$ ifconfig

(more…)

Advertisements

April 14, 2016

How to reset a root password?

Filed under: miscellaneous, ubuntu, Virtual Machine — Tags: , , — hypotheses @ 5:52 am

What do you do when you forget the “root” account password?
Install new OS is not always a good idea. As long as you still have physical access to the computer, it is somewhat possible to try the followings. Depending on whether you are working with Mac or Linux. See the detail and additional reference through the links below.
OsX:
  1. Restart the Mac while holding down the Option key, and double-click the icon for the Recovery partition. …
  2. Choose Utilities > Terminal.
  3. In Terminal, type resetpassword .
Ubuntu:
  1. Reboot your computer.
  2. Hold Shift during boot to start GRUB menu.
  3. Highlight your image and press E to edit.
  4. Find the line starting with “linux” and append rw init=/bin/bash at the end of that line.
  5. Press Ctrl + X to boot.
  6. Type in passwd username.
  7. Set your password.

October 8, 2015

apt-get through proxy server

Filed under: bash, miscellaneous, Virtual Machine — hypotheses @ 3:51 am

Again working behind firewall through proxy server is sometimes troublesome.

normally, you can export “http_proxy” to set a proxy for most process. However, to install software with apt-get, if the previous method doesn’t work.

From this page, you can try adding the configuration in a folder /etc/apt/apt.conf.d/  95proxies (more…)

February 6, 2014

Converting virtual machine raw image .img to vmdk

Filed under: bash, Virtual Machine — Tags: , — hypotheses @ 11:26 am

OK, you got “.img” virtual machine image. Now what?
Diving in VMWare, Oracle Virutal Machine, etc, etc, there is not a shadow of the option to choose “new virutal machine” from .img image.

What should I do?

1. Download Qemu (ported version for OSX) http://www.kju-app.org/

2. After installing it on Mac (works fine for me on Maverick),

cd /Application/Q.app/Contents/MacOS/qemu-img
./qemu-img convert -f raw -O vmdk /Volumes/xxx/rawdisk200gb.img /Volumes/xxx/vdisk200gb.vmdk

3. Next, open up vmware to create a new virtual machine.
4. Choose continue without disk > choose an existing virtual disk
5. Follow the instruction to start up your new machine 🙂

Thanks to http://www.igorkromin.net/?x=entry:entry130909-170324 for written up the solution for mac.

Blog at WordPress.com.