[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-users] Some questions about Networking and storage.

Jason Long <hack3rcon@xxxxxxxxx> wrote:

> For setting up a network must I edit my "eth0" file or if I use "vif=[ 
> 'bridge=mybridge' ]" in DomU configuration it is enough?

To start with, it might help if yo specify what distribution (and version) you 
are running. All my hosts run Debian (pre-Jessie and hence free of SystemD), so 
that's what I'm familiar with.
In Debian (pre-Jessie) it's a matter of (in Dom0) editing 
/etc/network/interfaces and adding a definition for a network bridge, like this 

auto xenbr0
iface xenbr0 inet static
  bridge_ports eth0
  address ...
  netmask ...
  gateway ...

You do *not* have a declaration for eth0 - just putting eth0 in the 
bridge_ports statement will configure the port as "up" so it works. Dom0 talks 
to the network via the address configured on the bridge - the bridge code takes 
care of routing packets in/out via the physical interface. If you type "brctl 
show xenbr0" it'll show the bridge with the one interface attached to it.

For your guests, you define a VIF as you show above, and what the guest is 
started, a new interface is created and connected to the bridge - brctl will 
now show an additional interface (vifn.1, where n is the id of the guest) 
connected to the bridge. The guest will behave just like a "real" computer 
connected to a "real" switch.

> For storage, If I understand, I can use my Physical partition for my Guest 
> and use a Virtual HDD also. Can you show me how can I setting up a Real 
> partition and a Virtual partition for my guest?

That's a matter of defining a virtual disk by it's path - so for a real 
partition on one of your disks you'd use something like :
disk    = [ 'phy:/dev/sdb2,xvda1,w' ]
For LVM volumes you'll normally use something like :
disk    = [ 'phy:/dev/vg0/guestroot,xvda1,w' ]
(or it can be /dev/mapper/...

> I'm a young in Xen.

We all started somewhere.

Xen-users mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.