Free
2007-May-29 06:20 UTC
[Xen-users] Does Xen 3.1 use NAT for virtual network by default?
Hi all, I installed Fedora 7 RC2 with Xen 3.1. When I created a virtual machine using Virtual Machine Manager (virt-manager-4.0), Xen 3.1 uses NAT for virtual network by default, but in Fedora 6 Xen 3.0.3 uses virtual switch by default. I checked the config file for xend: /etc/xen/xend-config.sxp. It was configured using network-bridge: (network-script network-bridge), not (network-script network-nat). Because I can get IP address from a DHCP server so it is not necessary for Xend to provide another NAT. Could you tell me how to change the virtual network from NAT to a common virtual bridge (virtual switch)? Thank you. Rui FENG 2007-5-29 _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Free
2007-May-29 06:23 UTC
[Xen-users] Does Xen 3.1 use NAT for virtual network by default?
Hi all, I installed Fedora 7 RC2 with Xen 3.1. When I created a virtual machine using Virtual Machine Manager (virt-manager-4.0), Xen 3.1 uses NAT for virtual network by default, but in Fedora 6 Xen 3.0.3 uses virtual switch by default. I checked the config file for xend: /etc/xen/xend-config.sxp. It was configured using network-bridge: (network-script network-bridge), not (network-script network-nat). Because I can get IP address from a DHCP server so it is not necessary for Xend to provide another NAT. Could you tell me how to change the virtual network from NAT to a common virtual bridge (virtual switch)? Thank you. Rui FENG 2007-5-29 _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Daniel P. Berrange
2007-May-29 11:56 UTC
Re: [Xen-users] Does Xen 3.1 use NAT for virtual network by default?
On Tue, May 29, 2007 at 02:23:20PM +0800, Free wrote:> I installed Fedora 7 RC2 with Xen 3.1. When I created a virtual machine > using Virtual Machine Manager (virt-manager-4.0), Xen 3.1 uses NAT for > virtual network by default, but in Fedora 6 Xen 3.0.3 uses virtual switch by > default.No, that is not correct. Fedora Core 6 used bridging by default. In Fedora 7 XenD is still configured to use network-bridge. Previously virt-manager would always set a new guest to use bridging. In Fedora 7 there is now an extra screen when creating a new guest: http://virt-manager.org/screenshots/install/wizard-network.png If you choose a ''Virtual network'' the guest will get NAT''d to the outside world (this is nothing todo with Xen''s network-nat script - the NAT is handled by libvirt directly), or if you choose ''Shared physical device'' the guest will be bridged to the LAN.> I checked the config file for xend: /etc/xen/xend-config.sxp. It was > configured using network-bridge: (network-script network-bridge), not > (network-script network-nat). Because I can get IP address from a DHCP > server so it is not necessary for Xend to provide another NAT. > > Could you tell me how to change the virtual network from NAT to a common > virtual bridge (virtual switch)? Thank you.It sounds like you choose a ''Virtual nework'' when creating the guest. If you re-run the new guest wizard, try picking a shared physical device instead. Regards, Dan, -- |=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=| |=- Perl modules: http://search.cpan.org/~danberr/ -=| |=- Projects: http://freshmeat.net/~danielpb/ -=| |=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=| _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Free
2007-May-29 13:03 UTC
RE: [Xen-users] Does Xen 3.1 use NAT for virtual network by default?
I have done it following your direction! Thank you so much!>From the website I know you are just the honorable developer ofvirt-manager. Could you tell me why I created a virtual machine using virt-manager, it does not create a config file of the virtual machine in /etc/xen/ as it does in Fedora 6? What should I do if I want to configure the virtual network without X-window and virt-manager? You know I can do that by directly editing the /etc/xen/xend-config.sxp and other config file of xend in Fedora 6. Thank you. Rui FENG 2007-5-29 Ph.D. Student, The Institute of Advanced Computing Technology Beihang University Beijing, P.R.China -----Original Message----- From: xen-users-bounces@lists.xensource.com [mailto:xen-users-bounces@lists.xensource.com] On Behalf Of Daniel P. Berrange Sent: Tuesday, May 29, 2007 7:56 PM To: Free Cc: xen-users@lists.xensource.com Subject: Re: [Xen-users] Does Xen 3.1 use NAT for virtual network by default? On Tue, May 29, 2007 at 02:23:20PM +0800, Free wrote:> I installed Fedora 7 RC2 with Xen 3.1. When I created a virtual machine > using Virtual Machine Manager (virt-manager-4.0), Xen 3.1 uses NAT for > virtual network by default, but in Fedora 6 Xen 3.0.3 uses virtual switchby> default.No, that is not correct. Fedora Core 6 used bridging by default. In Fedora 7 XenD is still configured to use network-bridge. Previously virt-manager would always set a new guest to use bridging. In Fedora 7 there is now an extra screen when creating a new guest: http://virt-manager.org/screenshots/install/wizard-network.png If you choose a ''Virtual network'' the guest will get NAT''d to the outside world (this is nothing todo with Xen''s network-nat script - the NAT is handled by libvirt directly), or if you choose ''Shared physical device'' the guest will be bridged to the LAN.> I checked the config file for xend: /etc/xen/xend-config.sxp. It was > configured using network-bridge: (network-script network-bridge), not > (network-script network-nat). Because I can get IP address from a DHCP > server so it is not necessary for Xend to provide another NAT. > > Could you tell me how to change the virtual network from NAT to a common > virtual bridge (virtual switch)? Thank you.It sounds like you choose a ''Virtual nework'' when creating the guest. If you re-run the new guest wizard, try picking a shared physical device instead. Regards, Dan, -- |=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=| |=- Perl modules: http://search.cpan.org/~danberr/ -=| |=- Projects: http://freshmeat.net/~danielpb/ -=| |=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=| _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Daniel P. Berrange
2007-May-29 13:19 UTC
Re: [Xen-users] Does Xen 3.1 use NAT for virtual network by default?
On Tue, May 29, 2007 at 09:03:09PM +0800, Free wrote:> I have done it following your direction! Thank you so much! > > >From the website I know you are just the honorable developer of > virt-manager. Could you tell me why I created a virtual machine using > virt-manager, it does not create a config file of the virtual machine in > /etc/xen/ as it does in Fedora 6? What should I do if I want to configure > the virtual network without X-window and virt-manager? You know I can do > that by directly editing the /etc/xen/xend-config.sxp and other config file > of xend in Fedora 6. Thank you.This is a new feature of Xen since 3.0.4 - the config files for guests are managed directly by XenD itself, so are no longer kept in /etc/xen . If you want a command line tool for managing guests, then virt-install can provision new guests, and virsh can be used to manage existing guests. To edit the config of an existing guest, try something like virsh dumpxml [guest name or id] > config.xml vi config.xml virsh define config.xml What you''re doing here is requesting a dump of the XML doc describing the guest, then editting it to suit your needs, and finally reloading the XML config into XenD. There''s some docs on the format http://libvirt.org/format.html For simple operations like changing memory settings and VCPU counts you can also just use the approrpriate virsh command directly. We''re also working on more virsh commands to allow addition & removal of network & disk devices without needing to edit XML. Regards, Dan. -- |=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=| |=- Perl modules: http://search.cpan.org/~danberr/ -=| |=- Projects: http://freshmeat.net/~danielpb/ -=| |=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=| _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Free
2007-May-29 13:48 UTC
RE: [Xen-users] Does Xen 3.1 use NAT for virtual network by default?
Thank you for giving me this useful information. You said in Xen 3.0.4 the config file is not in /etc/xen/ but is managed by Xend, but I cannot find the same command in "xm". For example, there is no command "xm dumpxml", but I guess there should be one. So what should I do when I want to modify the config file if there is no libvirt or virsh? Could you show me other ways to modify the config file of a virtual machine (guest) except for using command "virsh dumpxml"? Thank you. Rui FENG 2007-5-29 -----Original Message----- From: xen-users-bounces@lists.xensource.com [mailto:xen-users-bounces@lists.xensource.com] On Behalf Of Daniel P. Berrange Sent: Tuesday, May 29, 2007 9:19 PM To: Free Cc: xen-users@lists.xensource.com Subject: Re: [Xen-users] Does Xen 3.1 use NAT for virtual network by default? On Tue, May 29, 2007 at 09:03:09PM +0800, Free wrote:> I have done it following your direction! Thank you so much! > > >From the website I know you are just the honorable developer of > virt-manager. Could you tell me why I created a virtual machine using > virt-manager, it does not create a config file of the virtual machine in > /etc/xen/ as it does in Fedora 6? What should I do if I want to configure > the virtual network without X-window and virt-manager? You know I can do > that by directly editing the /etc/xen/xend-config.sxp and other configfile> of xend in Fedora 6. Thank you.This is a new feature of Xen since 3.0.4 - the config files for guests are managed directly by XenD itself, so are no longer kept in /etc/xen . If you want a command line tool for managing guests, then virt-install can provision new guests, and virsh can be used to manage existing guests. To edit the config of an existing guest, try something like virsh dumpxml [guest name or id] > config.xml vi config.xml virsh define config.xml What you''re doing here is requesting a dump of the XML doc describing the guest, then editting it to suit your needs, and finally reloading the XML config into XenD. There''s some docs on the format http://libvirt.org/format.html For simple operations like changing memory settings and VCPU counts you can also just use the approrpriate virsh command directly. We''re also working on more virsh commands to allow addition & removal of network & disk devices without needing to edit XML. Regards, Dan. -- |=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=| |=- Perl modules: http://search.cpan.org/~danberr/ -=| |=- Projects: http://freshmeat.net/~danielpb/ -=| |=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=| _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users