How to configure network in UBUNTU server VM

1

1

I have Ubuntu latest server edition installed as VM on Hyper-V.

I get the command line, but need to install GUI desktop for which i need to have network available on ubuntu.

From the Hyper-V VM console, it shows that my Virtual network is configured for the VM, but from LinuxVM cmd-line unable to ping.

I have 1 NIC with LAN and static IPs available on the Host Windows 2008 R2 Server.

My question is how to configure network (LAN or static IP) on Ubuntu VM ?

Munish Goyal

Posted 2011-01-25T07:58:10.973

Reputation: 145

Answers

1

For static IP, add to /etc/network/interfaces something like

auto eth0
iface eth0 inet static
    address 192.168.1.217
    gateway 192.168.1.1
    netmask 255.255.255.0 

Joril

Posted 2011-01-25T07:58:10.973

Reputation: 1 879

Ok cool. I tried to open this file in vi. its weird, unable to edit, or give space delete characters. its making me nuts. I am able to type all characters on cmdline, so its no probs with keyboard (was detected correctly as us) – Munish Goyal – 2011-01-25T08:25:05.907

Are you editing it as root or via sudo? Or maybe you're not familiar with vi? You should press i to enable editing – Joril – 2011-01-25T08:28:54.527

ok, i did without sudo. even after pressing 'i' cannot use SPACE key. i have some exp. with vi in past. it is looking weird here. – Munish Goyal – 2011-01-25T08:44:02.350

Try using nano or pico, they are less picky :) – Joril – 2011-01-25T08:59:06.350