Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 1st August 2008, 17:45
satimis satimis is offline
Senior Member
 
Join Date: Oct 2006
Posts: 533
Thanks: 4
Thanked 2 Times in 2 Posts
Default How to connect usb enclosure to guest

Hi folks,


Ubuntu 8.04 server amd64 - host
Ubuntu 6.06 server amd64 - guest
KVM 1:62+dfsq
UBS enclosure


Please advise how to mount the USB enclosure to guest. It can be mounted on host. Pointer would be appreciated. TIA


B.R.
satimis
Reply With Quote
Sponsored Links
  #2  
Old 2nd August 2008, 13:38
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

What do you mean with USB enclosure? An external USB dribe? You could do this through NFS.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 2nd August 2008, 18:19
satimis satimis is offline
Senior Member
 
Join Date: Oct 2006
Posts: 533
Thanks: 4
Thanked 2 Times in 2 Posts
Default

Quote:
Originally Posted by falko View Post
What do you mean with USB enclosure? An external USB dribe? You could do this through NFS.
Hi falko,


Yes, it is similar to external HD, an ATA HD installed on the USB enclosure.



I found following guide
https://help.ubuntu.com/community/SettingUpNFSHowTo


which I suppose may help me out. But I haven't figured out how to setup static IP on guest OS. It is now working on dynamic IP.



Host;

$ cat /etc/network/interfaces
Code:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback


auto eth0
iface eth0 inet manual


# The primary network interface
auto br0
iface br0 inet static
        address 192.168.0.110
        netmask 255.255.255.0
        network 192.168.0.0
        broadcast 192.168.0.255
        gateway 192.168.0.1
        bridge_ports eth0
        bridge_fd 9
        bridge_hello 2
        bridge_maxage 12
        bridge_stp off

Guest;

$ cat /etc/network/interfaces
Code:
auto lo
iface lo inet loopbak

# The primary network interface
auto eth0
iface eth0 inet dhcp

$ ifconfig
Code:
...
inet addr:10.0.2.15  Bcast:10.0.2.255  Mask:255.255.255.0
....


Host;

$ cat /etc/libvirt/qemn/networks/default.xml
Code:
<network>
  <name>default</name>
  <uuid></uuid>
  <bridge name="virbr%d" />
  <forward/>
  <ip address="192.168.122.1" netmask="255.255.255.0">
    <dhcp>
      <range start="192.168.122.2" end="192.168.122.254" />
    </dhcp>
  </ip>
</network>

Please shed me some light. TIA


B.R.
satimis
Reply With Quote
  #4  
Old 3rd August 2008, 13:41
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

Try this:

Code:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet static
        address 10.0.2.15
        netmask 255.255.255.0
        network 10.0.2.0
        broadcast 10.0.2.255
        gateway 10.0.2.1
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #5  
Old 3rd August 2008, 18:10
satimis satimis is offline
Senior Member
 
Join Date: Oct 2006
Posts: 533
Thanks: 4
Thanked 2 Times in 2 Posts
Default

Quote:
Originally Posted by falko View Post
Try this:

Code:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet static
        address 10.0.2.15
        netmask 255.255.255.0
        network 10.0.2.0
        broadcast 10.0.2.255
        gateway 10.0.2.1
Hi falko,


Before testing your advice. I found following problem;


Ubuntu 6.06 server amd64 - guest
Ubuntu 8.04 server amd64 - host
KVM


Guest can run "apt-get update/upgrade" but unable to ping Internet/gateway/host, 100% package loss


$ telnet localhost 25
Code:
Trying 127.0.0.1....
telnet: Unable to connect to remote host: Connection refused.

Guest;

$ cat /etc/network/interfaces
Code:
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp

$ ifconfig
Code:
eth0	  Link encap:Ethernet  HWaddr 52:54:00:12:34:56
	  inet addr:10.0.2.15  Bcast:10.0.2.255  Mask:255.255.255.0
	  inet6 addr: fe80::5054:ff:fe12:3456/64 Scope:Link
	  UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
	  RX packets:175 errors:0 dropped:0 overruns:0 frame:0
	  TX packets:249 errors:0 dropped:0 overruns:0 carrier:0
	  collisions:0 txqueuelen:1000
	  RX bytes:31829 (31.0 KiB)  TX bytes:31819 (31.0 KiB)
	  Interrupt:11 Base address:0x6000

lo	  Link encap:Local Loopback
	  inet addr:127.0.0.1  Mask:255.0.0.0
	  inet6 addr: ::1/128 Scope:Host
	  UP LOOPBACK RUNNING  MTU:16436  Metric:1
	  RX packets:41 errors:0 dropped:0 overruns:0 frame:0
	  TX packets:41 errors:0 dropped:0 overruns:0 carrier:0
	  collisions:0 txqueuelen:0
	  RX bytes:3156 (3.0 KiB)  TX bytes:3156 (3.0 KiB)

Host;

$ cat /etc/network/interfaces
Code:
auto lo
iface lo inet loopback


auto eth0
iface eth0 inet manual


# The primary network interface
auto br0
iface br0 inet static
        address 192.168.0.110
        netmask 255.255.255.0
        network 192.168.0.0
        broadcast 192.168.0.255
        gateway 192.168.0.1
        bridge_ports eth0
        bridge_fd 9
        bridge_hello 2
        bridge_maxage 12
        bridge_stp off

$ ifconfig
Code:
br0       Link encap:Ethernet  HWaddr 00:0e:a6:f9:a3:5b
          inet addr:192.168.0.110  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::20e:a6ff:fef9:a35b/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:53674 errors:0 dropped:0 overruns:0 frame:0
          TX packets:85945 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:3310146 (3.1 MB)  TX bytes:19758025 (18.8 MB)

eth0      Link encap:Ethernet  HWaddr 00:0e:a6:f9:a3:5b
          inet6 addr: fe80::20e:a6ff:fef9:a35b/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:53674 errors:0 dropped:0 overruns:0 frame:0
          TX packets:85946 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:4061600 (3.8 MB)  TX bytes:20372743 (19.4 MB)
          Interrupt:249 Base address:0x2000

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:84 errors:0 dropped:0 overruns:0 frame:0
          TX packets:84 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:7462 (7.2 KB)  TX bytes:7462 (7.2 KB)

vnet0     Link encap:Ethernet  HWaddr 4a:e2:d1:69:60:1b
          inet addr:192.168.122.1  Bcast:192.168.122.255  Mask:255.255.255.0
          inet6 addr: fe80::48e2:d1ff:fe69:601b/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:468 (468.0 B)

Please advise how to fix the problem. TIA

Remark: iptables is NOT running


B.R.
satimis
Reply With Quote
  #6  
Old 4th August 2008, 10:42
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

Please add this at the end of /etc/network/interfaces in the vm:

Code:
up route add -net 10.0.2.0 netmask 255.255.255.0 gw 10.0.2.1 eth0
Restart the network afterwards.
Is 10.0.2.1 the correct gateway?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #7  
Old 4th August 2008, 15:57
satimis satimis is offline
Senior Member
 
Join Date: Oct 2006
Posts: 533
Thanks: 4
Thanked 2 Times in 2 Posts
Default

Quote:
Originally Posted by falko View Post
Please add this at the end of /etc/network/interfaces in the vm:

Code:
up route add -net 10.0.2.0 netmask 255.255.255.0 gw 10.0.2.1 eth0
Restart the network afterwards.
Hi falko,

Edit /etc/network/interfaces as advised.

$ sudo /etc/init.d/networking restart
Code:
 * Reconfiguring network interfaces ...
[ 2254.660148] br0: Dropping NETIF_F_UFO since no NETIF_HW_CSUM feature.
SIOCADDRT: No such process
Failed to bring up br0.                   [OK]

Quote:
Is 10.0.2.1 the correct gateway?
Yes, I did it according to your previous advice. But there was a problem on restarting the network.

$ sudo /etc/init.d/networking restart
Code:
 * Reconfiguring network interfaces ...
SIOCADDRT: No such process                    [OK]

Still fail to ping network.

$ ping -c3 yahoo.com
Code:
Ping yahoo.com (28=06.190.68.37) 56(84) bytes of data.
From 10.2.15 icmp_seq=1 Destination Host Unreachable
From 10.2.15 icmp_seq=2 Destination Host Unreachable
From 10.2.15 icmp_seq=3 Destination Host Unreachable
....
......... +3 errors, 100% packet loss ....

satimis
Reply With Quote
  #8  
Old 5th August 2008, 15:27
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

Did you add the line on the guest or on the host? Must be on the guest.
Have you tried to reboot the system?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #9  
Old 5th August 2008, 16:39
satimis satimis is offline
Senior Member
 
Join Date: Oct 2006
Posts: 533
Thanks: 4
Thanked 2 Times in 2 Posts
 
Default

Quote:
Originally Posted by falko View Post
Did you add the line on the guest or on the host? Must be on the guest.
Have you tried to reboot the system?
Also tried adding the line on guest plus reboot guest as well as host.


The situation was even worse unable to run "apt-get update" but "apt-get upgrade" did work.

$ ping -c3 10.0.2.15 (guest LAN IP)
worked without packet loss

$ ping -c3 10.0.2.0 (network)
Code:
Do you want to ping broadcast?  Then -b

$ ping -c3 yahoo.com
$ ping -c3 google.com
Ping unknown host ....


$ cat /etc/resolv.conf
Code:
nameserver 10.0.2.3
nameserver 202.14.67.4
nameserver 202.14.67.14
DNS of ISP


B.R.
satimis

Last edited by satimis; 6th August 2008 at 08:19.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Getting e-mail working hansoffate Installation/Configuration 29 13th August 2008 16:33
Slow connection to FC6 system post-LAMP install? cfspence Installation/Configuration 8 29th January 2008 19:09
Postfix problem: lost connection after CONNECT from unknown fernando_torrez Server Operation 5 30th November 2007 14:17
mail issue - can recieve but not send phillycode Installation/Configuration 2 24th March 2007 15:02
Perfect Xen 3.0 setup for Debian gurneyzap HOWTO-Related Questions 4 26th March 2006 11:30


All times are GMT +2. The time now is 12:20.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.