Advertisement
iarmin

Adding a new NIC to Xen 4.1

Oct 30th, 2011
431
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.80 KB | None | 0 0
  1. # Adding a NIC to Xen 4.1
  2.  
  3. # 1.
  4. ifconfig eth1 0.0.0.0
  5. ip link set dev eth1 name peth1  # renaming eth1 to peth1, because we want a free eth1
  6. brctl addbr eth1                 # create bridge from eth1
  7. brctl addif eth1 peth1           # assign peth1 to the bridge
  8. ifconfig eth1 x.x.x.20 netmask 255.255.255.0 broadcast x.x.x.255  # bring up eth1 bridge
  9. brctl show                       # check
  10.  
  11.  
  12. # 2.
  13. # Create: /etc/xen/scripts/my-bridges
  14. #!/bin/sh
  15. dir=$(dirname "$0")
  16. $dir/network-bridge $@ vifnum=0 netdev=eth0 bridge=eth0
  17. $dir/network-bridge $@ vifnum=1 netdev=eth1 bridge=eth1
  18.  
  19. # 3.
  20. # modify /etc/xen/xend-config.sxp
  21. --- (network-script network-bridge)
  22. +++ (network-script my-bridges)
  23.  
  24. # 4.
  25. # modify: vm1.conf
  26. vif        = ['ip=1.2.3.4, vifname=vifvm129.0, mac=de:ad:be:ef:ca:fe, bridge=eth1']
  27.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement