I did an 'apt-get dist-upgrade' and there was a kernel upgrade, so I rebooted. When the system came back there was no functional networking. Everything looked fine, I couldn't reach anything besides loopback.
On a hunch, I commented out br0 interface from /etc/network/interfaces and bounced networking (/etc/init.d/network restart) and all OK.
Then for grins I added br0 interface back and bounced networking again and, huh, all now seemed OK.
So I tried rebooted and all was still OK.
Chalking it up to a mystery for now unless problem returns.
My ongoing experiences with Ubuntu, and later Mythbuntu, as a media center with MythTV. I'm also using the system for a virtual machine server, a mediawiki server and a general all around home infrastructure base.
Showing posts with label networking. Show all posts
Showing posts with label networking. Show all posts
Thursday, July 30, 2009
Saturday, June 6, 2009
Making a SSH connection to a NAT'ed Virtualbox VM
I found myself wanting to SSH to a NAT'ed virtualbox VM. I discovered this post which nicely described how to use VBoxManage to accomplish this. The only change I had to make on my Ubuntu box was to use 'pcnet' instead of 'e1000'.
Sunday, January 25, 2009
Cloning a Ubuntu VM
I haven't yet found a good set of directions on the net for cloning a Ubuntu VM. These directions are for cloning a 8.04 Ubuntu server VM (it happens to also be running in a Ubuntu server, but these should work for any linux server).
These directions assume your VMs use static IP addresses and you want to clone an existing VM called "myvm" to a new VM called "mynewvm" with its own IP address.
Make sure "myvm" has no snapshots, as this method won't work on a VM with snapshots (the disk rename step will fail).
Also make sure you close the original VM in VMWare-Server or you may get file-locking problems.
Ok, first change to the directory where the original VM is stored and copy the directory (this will take a few minutes):
Now rename the disk:
Now rename the configuration file and change the name of the VM in the file:
Now in VM-Ware server, select "File" then "Open" and "Browse". Select the "mynewvm" directory and the "mynewvm.vmx" file in that directory. The new VM should appear in the Inventory list.
Select the new VM and boot it. At this point it won't appear on the network. You'll need to log into the console as root and do the following:
At this point, you could reboot the VM and it will come back up with original IP and hostname, which will cause a conflict if the original VM is also on the network, so you might just want to go ahead and do the following while you're hear:
Change the hostname by editing /etc/hostname.
Then edit /etc/network/interfaces and change the 'address' line to reflect the new IP address you want the VM to have.
Finally, etc /etc/hosts, change the line for '127.0.1.1' to reflect the new hostname and add (probably at the end of the file, but really where ever you want) a new line for the new hostname, e.g/:
That should do it. Now just reboot the VM and it should come back up with the new IP and hostname.
These directions assume your VMs use static IP addresses and you want to clone an existing VM called "myvm" to a new VM called "mynewvm" with its own IP address.
Make sure "myvm" has no snapshots, as this method won't work on a VM with snapshots (the disk rename step will fail).
Also make sure you close the original VM in VMWare-Server or you may get file-locking problems.
Ok, first change to the directory where the original VM is stored and copy the directory (this will take a few minutes):
cd /usr/lib/Virtual Machines cp -ax myvm mynewvm
Now rename the disk:
cd mynewvm /usr/bin/vmware-vdiskmanager -n myvm.vmdk mynewvm.vmdk
Now rename the configuration file and change the name of the VM in the file:
mv myvm.vmx mynewvm.vmx sed -i "s/myvm/mynewvm/" mynewvm.vmx
Now in VM-Ware server, select "File" then "Open" and "Browse". Select the "mynewvm" directory and the "mynewvm.vmx" file in that directory. The new VM should appear in the Inventory list.
Select the new VM and boot it. At this point it won't appear on the network. You'll need to log into the console as root and do the following:
rm /etc/udev/rules.d/70-persistent-net.rules
At this point, you could reboot the VM and it will come back up with original IP and hostname, which will cause a conflict if the original VM is also on the network, so you might just want to go ahead and do the following while you're hear:
Change the hostname by editing /etc/hostname.
Then edit /etc/network/interfaces and change the 'address' line to reflect the new IP address you want the VM to have.
Finally, etc /etc/hosts, change the line for '127.0.1.1' to reflect the new hostname and add (probably at the end of the file, but really where ever you want) a new line for the new hostname, e.g/:
192.168.1.50 mynewvm
That should do it. Now just reboot the VM and it should come back up with the new IP and hostname.
Sunday, November 2, 2008
Upgrading my laptop to Ubuntu 8.10 - network manager applet woes!
After upgrading my Ubuntu servers to 8.10, I turned my attention to my Ubuntu laptop running Ubuntu desktop. I used the Network Upgrade for Ubuntu Desktops.
The upgrade went smoothly, though it took a few hours (much longer than the server upgrades) and seemed to go in spurts (perhaps because of apt-cacher?). I did get one pop-up message I noted for later:
I installed new versions of:
Files I kept:
55 obsolete packages were removed.
Afterwards, I rebooted and the fun began as the system couldn't connect to my wireless network. First thing I noticed was the following message in /var/log/messages:
Following the directions pointed to by the log message I ran the following command which installed new wireless drivers.
I rebooted and the driver message disappeared, but didn't fix the original problem and I still wasn't getting on the network.
So, next I connected to my wired network. Or at least I tried. Evening after plugging into my cat5 ethernet, I still wasn't getting a network connection. Very weird.
After poking around some I realized that the system was actually connecting to the wireless network, it's just that it wasn't getting an IP addresss via DHCP correctly. If I ran 'dhclient' manually, I got on the network just fine. Only problem was every few minutes the network manager tried to reconnect me, so I had to kill it ('killall nm-applet') to stay connected.
Next I tried upgrading to the latest network manager (as I did previously). I added the following lines to /etc/apt/sources.list. Note these are the same lines I had before that the upgrade commented out, but with "hardy" changed to "intrepid".
And upgraded via apt-get:
Which installed new versions of libnm-glib0, libnm-util0, and network-manager. And then I rebooted... and my network came back up!
Ok, lesson learned is apparently I need to be prepared to keep up to date with the network manager applet separately.
Update: One annoyance still remaining, my firefox is all messed up. Google toolbar and all my other extension buttons are gone. To get them back I had to disable the "Ubuntu Firefox Modifications" and then I was able to restore everything.
The upgrade went smoothly, though it took a few hours (much longer than the server upgrades) and seemed to go in spurts (perhaps because of apt-cacher?). I did get one pop-up message I noted for later:
Third party sources disabled
Some third party entries in your sources.list were disabled. You can re-enable them after the upgrade with the 'software-properties' tool or your package manager.
I installed new versions of:
- /etc/init.d/mountdevsubfs.sh
Files I kept:
- /etc/services
55 obsolete packages were removed.
Afterwards, I rebooted and the fun began as the system couldn't connect to my wireless network. First thing I noticed was the following message in /var/log/messages:
Nov 1 16:31:32 von-laptop kernel: [ 470.051333] input: b43-phy0 as /devices/virtual/input/input14
Nov 1 16:31:32 von-laptop kernel: [ 470.256065] b43-phy0: Loading firmware version 351.126 (2006-07-29 05:54:02)
Nov 1 16:31:32 von-laptop kernel: [ 470.256080] b43-phy0 warning: You are using an old firmware image. Support for old firmware will be removed in July 2008.
Nov 1 16:31:32 von-laptop kernel: [ 470.256085] b43-phy0 warning: You must go to http://linuxwireless.org/en/users/Drivers/b43#devicefirmware and download the latest firmware (version 4).
Following the directions pointed to by the log message I ran the following command which installed new wireless drivers.
# /usr/share/b43-fwcutter/install_bcm43xx_firmware.sh
I rebooted and the driver message disappeared, but didn't fix the original problem and I still wasn't getting on the network.
So, next I connected to my wired network. Or at least I tried. Evening after plugging into my cat5 ethernet, I still wasn't getting a network connection. Very weird.
After poking around some I realized that the system was actually connecting to the wireless network, it's just that it wasn't getting an IP addresss via DHCP correctly. If I ran 'dhclient' manually, I got on the network just fine. Only problem was every few minutes the network manager tried to reconnect me, so I had to kill it ('killall nm-applet') to stay connected.
Next I tried upgrading to the latest network manager (as I did previously). I added the following lines to /etc/apt/sources.list. Note these are the same lines I had before that the upgrade commented out, but with "hardy" changed to "intrepid".
deb http://ppa.launchpad.net/network-manager/ubuntu intrepid main
deb-src http://ppa.launchpad.net/network-manager/ubuntu intrepid main
And upgraded via apt-get:
# apt-get update
# apt-get upgrade
Which installed new versions of libnm-glib0, libnm-util0, and network-manager. And then I rebooted... and my network came back up!
Ok, lesson learned is apparently I need to be prepared to keep up to date with the network manager applet separately.
Update: One annoyance still remaining, my firefox is all messed up. Google toolbar and all my other extension buttons are gone. To get them back I had to disable the "Ubuntu Firefox Modifications" and then I was able to restore everything.
Subscribe to:
Posts (Atom)