Tag Archives: VirtualBox

Access your Virtualbox Guest from your Host OS

As a developer you want to ping and access the webserver on your virtual machine. This is a very simple solution to enable the bridge to the guest VM.

Requirements

  • VirtualBox (latest version)
  • A guest operation system (e.g. Ubuntu)

Setup

  • Shut down all running VM’s
  • Right click on the VM > Change… > Network
  • Open Tab: Adapter 1
  • Enable the Adapter and select “NAT”

The next step is importand to make it work:

  • Open Tab: Adapter 2
  • Enable the adapter and select: “Host-only Adapter”
  • Select Name: “VirtualBox Host-only Ethernet Adapter”
  • Click at “Extended”
  • Select the adapter: “Intel PRO/1000 MT Desktop…”
  • Select the modus: “Allow all and host”
  • Click on “Ok” to save all settings.

Yes, you have to enable two adapters at the same time to make it work. Realy. You need a “NAT” and a “Host-only Adapter”.

  • Start the VM
  • Open the terminal (with Ctrl+Alt+T)
  • Enter: ifconfig
  • Now you should see a local IP addresse like: 192.168.56.104
  • The IP address is dynamic an can be different on your VM

Test

  • Go back into your host machine
  • Open the command line: cmd
  • Ping the guest VM with the command: ping 192.168.56.104
  • You should see the ping response
  • If you have a webserver installed on the guest VM then open http://192.168.56.104 in your browser to the hosted website.

https://gist.github.com/odan/48fc744434ec6566ca9f7a993f4a7ffb

How to Convert VirtualBox VM to VMware VM

  1. Make sure you do not have any snapshots on your virtual machine; if you do, delete them.
  2. Open cmd
  3. Cd C:\Program Files\Oracle\VirtualBox
  4. vboxmanage clonehd “C:\Users\guy.naftaly \.VirtualBox\HardDisks\HAProxy2.vdi” VMHAProxy2.vmdk -format VMDK -variant standard -type normal –remember
  5. When the command finishes, you will have your new VMware hard disk on the same location as your original Virtualbox hard disk.

Attaching New VMware Hard Disk to New Virtual Machine

  1. Upload the vmdk file to your destination data store.
  2. Open VMware Vsphare client and connect to your destination ESXI server.
  3. Create new VM and chose existing HD and add the vmdk that you created.

How to Convert a VirtualBox VM into a VMware VM.