Hans Vos
2011-Apr-01 09:30 UTC
[Xen-users] Debian dom0 Centos domU network xenbr0 and VNC problems
Hello, I''m new to this list and a first time user of Xen. I''ve been playing around with Xen now for about two weeks and ran into some problems. Sorry for the long post, please bear with me. First I tried running a dom0 environment from CentOS. I followed this tutorial (http://goo.gl/toOE0) and got a CentOS domU running. I also tried following this tutorial (http://goo.gl/K9wj7) but I could not connect to the VNC server. I found out that Debian 6 had the latest version of Xen as a package. As I''m more familiar with Debian I figured I would rather have a Debian dom0 environment. So I read the following page (http://wiki.debian.org/Xen) and some links to get myself familiar with the Debian method. I successfully installed the dom0 kernel and it seems to be working. I got two Dell PE860 servers at home with HVM support for testing. On the first one I still have my CentOS dom0, on the second one I now have the Debian dom0. I gave each VPS its own logical volume on the LVM. I created the following partition layout on a 160 GB hard disk drive. * /boot (256 MB) * LVM ** swap (4 GB) ** / (16 GB) ** vps1 (32 GB) I want to have a CentOS domU on my Debian dom0 server. First off I could not find a HVM example in "/etc/xen" so I grabbed the one from my CentOS dom0 and used that one. When I tried to boot up I got an error and looked in to the logfile "/var/log/xen/qemu-dm-vps1.log". This had the following (http://pastebin.com/cdTEKdut) contents. I looked up the error and found some references to it on several sites. It seems that the "/etc/xen/xend-config.sxp" did not have this line in it: "(network-script network-bridge)". Also the networking bridge script did not start out of itself after a reboot. So I ran "/etc/xen/scripts/network-bridge start". I compared both Xen configuration files from my CentOS dom0 and Debian dom0 and put line back in the configuration file. When I now do "ifconfig -a" I get the following output (http://pastebin.com/VHYswjhH) on my Debian dom0 and this (http://pastebin.com/ktWZ6QZA) on my CentOS dom0. So xenbr0 is not present on my Debian dom0. I searched some more I found that eth0 should now be my virtual network adapter. Is this correct? Also is this the recommended method of fixing this problem? I also read something about using native Debian network bridging. Should I switch to that? Now on the VNC problem. I finally got my CentOS domU started up. Here you can find the configuration file which I used (http://pastebin.com/v7rCWX2E). I''m trying to boot a CentOS network installation using VNC. The server is in my LAN and I basically used the tutorial from the Virtuatopia website. I verified VNC was running by entering this command "ps -ef | grep vnc" and got the following output (http://pastebin.com/QcS0J6c3). There are a few errors in the log file (http://pastebin.com/DdPXrFQ4) but I''m not sure if they related to the VNC problem. Then I tried connecting to 192.168.0.220 and 192.168.0.220:5900 from my workstation over the LAN using TightVNC Viewer but I could not connect. Could someone help me troubleshoot this? Thank you for your help. -- With kind regards, Hans Vos _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Fajar A. Nugraha
2011-Apr-01 09:40 UTC
Re: [Xen-users] Debian dom0 Centos domU network xenbr0 and VNC problems
On Fri, Apr 1, 2011 at 4:30 PM, Hans Vos <hans@laissezfaire.nl> wrote:> First I tried running a dom0 environment from CentOS. I followed this > tutorial (http://goo.gl/toOE0) and got a CentOS domU running.It works, right? There''s also virt-manager which you can use.> I also tried > following this tutorial (http://goo.gl/K9wj7) but I could not connect to the > VNC server.Tutorials for Xen is somewhat hit-and-miss. If your environment is not exactly the same, you usually need some changes (like what the network bridge name is).> I found out that Debian 6 had the latest version of Xen as a > package. As I''m more familiar with Debian I figured I would rather have a > Debian dom0 environment.Ouch. You just deliberately make stuff much harder for yourself. Debian is great, but it''s not exactly suitable for a "newbie" to use as dom0. It doesn''t work out the box like Centos does (for example, the default bridge is not set up until you edit some files).> I also read something about using native > Debian network bridging. Should I switch to that?Definitely, create your own bridge by creating your own entry on /etc/network/interfaces. If you don''t know what I''m talking about, better stick to Centos dom0 and it''s stock Xen. Really. Then you can try compiling your own version of Xen and dom0 kernel. After that, you can pretty much use any distro you want as base. -- Fajar _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Hans Vos
2011-Apr-01 10:05 UTC
Re: [Xen-users] Debian dom0 Centos domU network xenbr0 and VNC problems
On 1-4-2011 11:40, Fajar A. Nugraha wrote:> It works, right? There''s also virt-manager which you can use.Well, that specific tutorial worked, yes. But that is a different method than the one described on Virtuatopia. The CentOS domU tutorial uses specialized files (vmlinuz-xen-install and initrd-xen-install). When I launch the VPS using that tutorial I get a very basic console from which I can do the installation. This doesn''t work when I try to use the net install for Debian. I figure that is why I need to connect to the VNC server it has launched to continue the installation.> Tutorials for Xen is somewhat hit-and-miss. If your environment is not > exactly the same, you usually need some changes (like what the network > bridge name is).As I mentioned in my post I already did some reading about the network problems with Debian. The "(network-script network-bridge)" line was not in the "/etc/xen/xend-config.sxp" file which I added. I can switch to the Debian network bridging method but I would like to know if I solved the problem for the time being using the fix I mention in my start post. First I just want to get an installation going using VNC.> Ouch. You just deliberately make stuff much harder for yourself. > Debian is great, but it''s not exactly suitable for a "newbie" to use > as dom0. It doesn''t work out the box like Centos does (for example, > the default bridge is not set up until you edit some files).I can edit some files ;).> Definitely, create your own bridge by creating your own entry on > /etc/network/interfaces.I will do some reading on this topic and try to get it working. I read somewhere in the archives of this mailing list that Xen will be switching to native Debian network bridging in the future.> If you don''t know what I''m talking about, better stick to Centos dom0 > and it''s stock Xen. Really. > Then you can try compiling your own version of Xen and dom0 kernel. > After that, you can pretty much use any distro you want as base.I prefer Debian and have been using it for a couple of years for other purposes. I have some spare time at the moment (lost my job) so I''m willing and ready to learn. But I can give CentOS another try. However, please note that I could also not connect to the VNC server using CentOS as dom0. I will test it again today. -- With kind regards, Hans Vos _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Fajar A. Nugraha
2011-Apr-01 12:05 UTC
Re: [Xen-users] Debian dom0 Centos domU network xenbr0 and VNC problems
On Fri, Apr 1, 2011 at 5:05 PM, Hans Vos <hans@laissezfaire.nl> wrote:> I prefer Debian and have been using it for a couple of years for other > purposes. I have some spare time at the moment (lost my job) so I''m willing > and ready to learn. But I can give CentOS another try. However, please note > that I could also not connect to the VNC server using CentOS as dom0. I will > test it again today.When you do the test: - use Centos bundled Xen (do NOT compile anything yourself or install third-party xen packages at this point) - use a client capable of X forwarding (using most linux distros should work, but when you use Windows get a client that supports ssh X forwarding, like putty + Xming) - install Centos domU with virt-manager. Forget all other tutorials, just follow the point-and-click interface of virt-manager. You''d get a working Centos domU, with vfb (graphic) console accessible either using virt-manager/virt-viewer or normal vnc client. Once you get THAT working, get the resulting config file (/etc/xen/*) and start playing from there. FWIW, this generic config file SHOULD allow you to install PV domU on any dom0 distro, with vnc access (it will use first available port, provided you know enough to alter environment-specific settings (like the name of the bridge) #==========================memory = "1000" vif = [ ''mac=00:16:3E:BD:96:42, bridge=br0, vifname=u-e0'' ] disk = [ ''tap:aio:/vm/ubuntu/xvda,xvda,w'', ] vcpus=1 kernel = "/vm/install/ubuntu/vmlinuz" ramdisk = "/vm/install/ubuntu/initrd.gz" #bootloader = "/usr/bin/pygrub" vfb=[ "type=vnc,vncunused=1,vnclisten=0.0.0.0" ] #========================== Also note that AFAIK Debian''s bundled Xen is "broken" (i.e. it doesn''t support tap:aio by default, so you''re stuck with file:/ or recompile your own Xen/dom0 kernel) -- Fajar _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Hans Vos
2011-Apr-01 13:57 UTC
Re: [Xen-users] Debian dom0 Centos domU network xenbr0 and VNC problems
On 1-4-2011 14:05, Fajar A. Nugraha wrote:> When you do the test: > - use Centos bundled Xen (do NOT compile anything yourself or install > third-party xen packages at this point) > - use a client capable of X forwarding (using most linux distros > should work, but when you use Windows get a client that supports ssh X > forwarding, like putty + Xming) > - install Centos domU with virt-manager. Forget all other tutorials, > just follow the point-and-click interface of virt-manager. > > You''d get a working Centos domU, with vfb (graphic) console accessible > either using virt-manager/virt-viewer or normal vnc client. Once you > get THAT working, get the resulting config file (/etc/xen/*) and start > playing from there.Thank you, I hear what you''re saying. I will give CentOS another try using virt-manager. I''m not sure yet how to achieve this on a server without any X-system. I found a bunch of different documentation, howtos and tutorials which I am reading now. On my PC I have Windows 7 with VMware workstation. I have a VM with Ubuntu Desktop installed which I use for development. Maybe it is easier to start up that VM and use some tool to connect to the VNC server or virt-manager? I don''t want to install an X-system on the server. If everything works out I want to put the servers back in the data center and move some of my personal stuff on it using both Dell PE860 servers in some sort of redundant configuration using Xen. -- With kind regards, Hans Vos _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Hans Vos
2011-Apr-04 12:52 UTC
Re: [Xen-users] Debian dom0 Centos domU network xenbr0 and VNC problems
Hello, Thank you very much for your help so far. Over the weekend I have been doing a lot of reading. I read the entire REHL Virtualization Guide and some other tutorials. I have reinstalled one of my servers with CentOS and Xen is running correctly. I am using my Ubuntu desktop environment to install a new VPS with Virtual Machine Manager over SSH. However, when creating a new VPS I cannot select the xenbr0 network interface. Using the default virbr0 does not seem to work. During the installation process of a CentOS domU I cannot get a connection for downloading the stage2.img file. I have browsed through the Virtualization Guide again but I cannot find any answers for this problem. Here are two screenshots of my settings in the Virtual Machine Manager: * http://www.laissezfaire.nl/Screenshot-192.168.0.210-Host-Details.png * http://www.laissezfaire.nl/Screenshot-New-VM.png I successfully added my LVM group to the Storage pool of the Virtual Machine Manager. I also followed the instruction in the Virtualization Guide regarding SELinux. I set the SELinux context for the underlying block device and volume group. Here is the output of "brctl show": http://pastebin.com/AffL98G0 Here is the output of "ifconfig -a": http://pastebin.com/jy6t6UDj How can I use xenbr0 with the Virtual Machine Manager? I''ve tried adding a new device in the network configuration section but then it just uses virbr1. You cannot specify a device. Thank you. -- Kind regards, Hans Vos _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users