Dealy, Brian
2008-Nov-06 03:56 UTC
[Xen-users] Xen Networking advice - how to configure for DHCP to guests
Hello all, (sorry if this is a duplicate.) I am working on a project where I have a fedora-8 xen domain-0 which is booted and which I have a domU guest called fguest1 booted on it. virt-manager shows all is well except that I have a networking problem I didn''t expect. both machines can access the network fine, but in my xend-config.sxp file I asked for bridged networking which I assumed would allow the guest to get an address from our dhcp server... instead there is a xenbr0 bridge which appears to be handing my guest a 192.168.200.xxx address. although this arrangement allows internet access, I really wanted this guest to have a 10.11.xx.xxx address from the local dhcp server, like domain-0 has... in my config I asked it to use: (network-script '' network-bridge netdev=eth1'') using one of the examples in the config file. and (vif-script vif-bridge) also from the config file... Since I am new to the network with xen, I thought maybe there is someone who could advise on the proper networking setup to have each guest get its ip from the local dhcp server. thanks in advance. I did look in the FAQ for xen networking and it seemed to me that this should be the right setup, but now I am wondering if I misunderstand what it says. fyi, I want it this way because I am trying to get to the guest consoles remotely via vnc. thanks. Brian Brian Dealy Vice President - Technology SAIC Technology Fellow Cyber Security Solutions Operation Science Application International Corp. San Diego, CA 858-826-4457 dealyb@saic.com _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
HU wenjin
2008-Nov-06 04:23 UTC
Re: [Xen-users] Xen Networking advice - how to configure for DHCP to guests
See my comments below, hope it is helpful. On Wed, Nov 5, 2008 at 10:56 PM, Dealy, Brian <BRIAN.DEALY@saic.com> wrote:> Hello all, (sorry if this is a duplicate.) > > > > I am working on a project where I have a fedora-8 xen domain-0 which is > booted and which I have a domU guest called > > fguest1 booted on it. virt-manager shows all is well except that I have a > networking problem I didn''t expect. > > > > both machines can access the network fine, but in my xend-config.sxp file I > asked for bridged networking > > which I assumed would allow the guest to get an address from our dhcp > server… > > > > instead there is a xenbr0 bridge which appears to be handing my guest a > 192.168.200.xxx address. although this arrangement > > allows internet access, I really wanted this guest to have a 10.11.xx.xxx > address from the local dhcp > > server, like domain-0 has… > > >Can you explain your LAN network in more details? Is 192.168.200.xxx also one of your LAN subnetwork?> in my config I asked it to use: > > (network-script '' network-bridge netdev=eth1'') >If eth1 is in the subnet 10.11.xxx.xxx. Then it should be correct.> > > using one of the examples in the config file. > > > > and > > (vif-script vif-bridge) also from the config file… > > >It is no problem with this option.> Since I am new to the network with xen, I thought maybe > > there is someone who could advise on the proper > > networking setup to have each guest get its ip from > > the local dhcp server. >Once your guest is up and in bridge mode, then you can just think the guest is like a machine in your LAN and the same steps and tricks for you to get the IP from dhcp server. nothing magic there.> > > thanks in advance. I did look in the FAQ for xen networking and it > > seemed to me that this should be the right setup, but now I am wondering > > if I misunderstand what it says. > > > > fyi, I want it this way because I am trying to get to the guest consoles > > remotely via vnc. thanks. > > Brian > > > > > > > > > > Brian Dealy > > Vice President - Technology > > SAIC Technology Fellow > > Cyber Security Solutions Operation > > Science Application International Corp. > > San Diego, CA > > 858-826-4457 > > dealyb@saic.com > > > > _______________________________________________ > 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
Tim Post
2008-Nov-06 06:06 UTC
Re: [Xen-users] Xen Networking advice - how to configure for DHCP to guests
On Wed, 2008-11-05 at 19:56 -0800, Dealy, Brian wrote:> instead there is a xenbr0 bridge which appears to be handing my guest > a 192.168.200.xxx address. although this arrangement > > allows internet access, I really wanted this guest to have a > 10.11.xx.xxx address from the local dhcp > > server, like domain-0 has…You can specify the guest MAC address (it will remain consistent), which should allow you set your DHCP server configuration appropriately. vif = [''bridge=xenbr0, mac=XX:XX:XX:XX:XX:XX''] While the guests are sharing one enslaved device (in your case eth1), they will not share the same MAC. Xenbr0 inherits the mac of the device its enslaving .. but virtual interfaces start with a random MAC by default. Specifying these and keeping them persistent also helps cure issues with some routers that are slow to ARP new changes by avoiding a new MAC upon every start of the guest. Hope this helps Cheers, --Tim _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Hello, I''m looking for someone that can assist me on how to create and run a Windows guest on Xen. I''m about to make a Wiki with easy tutorials on how use the Xen. Plain and easy text that everyone should be able to follow and succeed with. I''ve already finished a working tutorial on how to setup a working Linux guest, which I plan to publish at the same time as the Windows guest tutorial. I''ve searched the internet, trying to find existing tutorials regarding Windows guests on Xen. So far, only outdated ones have turned up. Even my own attempts trying to modify those old tutorials, in order to fit the more resent versions of Linux and Xen, resulted in failure. So, I would like to get some help, guidance or even get in touch with someone that actually managed to install and run Windows as a guest, on a recent version of a Linux host. The software I intend to use in my Wiki tutorial, is: Host: Linux Ubuntu Hardy (8.04 LTS) 64 bit. Guest: Windows XP and Windows Server 2003 Best regards, Peter _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Thu, Nov 6, 2008 at 12:18 AM, Peter Privat <peter.privat@breilind.com>wrote:> Hello, > > I''m looking for someone that can assist me on how to create and run a > Windows guest on Xen. I''m about to make a Wiki with easy tutorials on > how use the Xen. Plain and easy text that everyone should be able to > follow and succeed with. > > I''ve already finished a working tutorial on how to setup a working Linux > guest, which I plan to publish at the same time as the Windows guest > tutorial. I''ve searched the internet, trying to find existing tutorials > regarding Windows guests on Xen. So far, only outdated ones have turned > up. Even my own attempts trying to modify those old tutorials, in order > to fit the more resent versions of Linux and Xen, resulted in failure. > > So, I would like to get some help, guidance or even get in touch with > someone that actually managed to install and run Windows as a guest, on > a recent version of a Linux host. > > The software I intend to use in my Wiki tutorial, is: > > Host: Linux Ubuntu Hardy (8.04 LTS) 64 bit. > Guest: Windows XP and Windows Server 2003 > > Best regards, > Peter > > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users >This might help http://www.virtuatopia.com/index.php/Virtualizing_Windows_Server_2008_with_Xen Paras. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Thu, 2008-11-06 at 09:21 -0600, Paras pradhan wrote:> > > On Thu, Nov 6, 2008 at 12:18 AM, Peter Privat > <peter.privat@breilind.com> wrote: > Hello, > > I''m looking for someone that can assist me on how to create > and run a > Windows guest on Xen. I''m about to make a Wiki with easy > tutorials on > how use the Xen. Plain and easy text that everyone should be > able to > follow and succeed with. > > I''ve already finished a working tutorial on how to setup a > working Linux > guest, which I plan to publish at the same time as the Windows > guest > tutorial. I''ve searched the internet, trying to find existing > tutorials > regarding Windows guests on Xen. So far, only outdated ones > have turned > up. Even my own attempts trying to modify those old tutorials, > in order > to fit the more resent versions of Linux and Xen, resulted in > failure. > > So, I would like to get some help, guidance or even get in > touch with > someone that actually managed to install and run Windows as a > guest, on > a recent version of a Linux host. > > The software I intend to use in my Wiki tutorial, is: > > Host: Linux Ubuntu Hardy (8.04 LTS) 64 bit. > Guest: Windows XP and Windows Server 2003 > > Best regards, > Peter > > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users > > > > This might help > > > http://www.virtuatopia.com/index.php/Virtualizing_Windows_Server_2008_with_Xen > > > > > > Paras. > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-usersHello Paras, Thank you for the link. I tried creating a guest like shown in the example, but only to receive an error message when trying to start it. =============================================================# xm create /etc/xen/domu2.cfg Using config file "/etc/xen/domu2.cfg". Error: Device 768 (vbd) could not be connected. losetup /dev/loop0 /home/xen/domains/win2k3/xenwin2k3.img failed ============================================================= It seems to the same kind of error I got from my earlier attempts, when trying to use some older examples I''ve found on the internet. Perhaps there are something wrong or missing in my Xen installation. An Ubuntu 8.04 guest seems to work fine though. The domu2.cfg file looks like this: =============================================================import os, re arch = os.uname()[4] if re.search(''64'', arch): arch_libdir = ''lib64'' else: arch_libdir = ''lib'' kernel = "/usr/lib/xen/boot/hvmloader" builder=''hvm'' memory = 1024 # Should be at least 2KB per MB of domain memory, plus a few MB per vcpu. shadow_memory = 8 name = "xenwin2k3" vif = [ ''type=ioemu, bridge=xenbr0'' ] acpi = 1 apic = 1 disk = [ ''file:/home/xen/domains/win2k3/xenwin2k3.img,hda,w'', ''file:/home/cc/iso-images/windows2k3/image.iso,hdc:cdrom,r'' ] device_model = ''/usr/'' + arch_libdir + ''/xen/bin/qemu-dm'' #----------------------------------------------------------------------------- # boot on floppy (a), hard disk (c) or CD-ROM (d) # default: hard disk, cd-rom, floppy boot="dc" sdl=0 vnc=1 vncconsole=1 vncpasswd='''' serial=''pty'' usbdevice=''tablet'' ============================================================= Any clues? /Peter _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Fri, 2008-11-07 at 11:40 +0700, Peter Privat wrote:> Any clues? > /PeterYou might try ''modprobe loop'' if its not already loaded (the lsmod command will tell you if it is) If its not, you probably want to put that in /etc/modules (or whatever is appropriate for your distro), likely you''ll want: loop max_loop=64 I believe the default value is 8, which you''ll quickly consume. It looks like loop is modular in your kernel and isn''t being inserted on boot. Cheers, --Tim _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Fri, 2008-11-07 at 13:01 +0800, Tim Post wrote:> On Fri, 2008-11-07 at 11:40 +0700, Peter Privat wrote: > > > Any clues? > > /Peter > > You might try ''modprobe loop'' if its not already loaded (the lsmod > command will tell you if it is) > > If its not, you probably want to put that in /etc/modules (or whatever > is appropriate for your distro), likely you''ll want: > > loop max_loop=64 > > I believe the default value is 8, which you''ll quickly consume. > > It looks like loop is modular in your kernel and isn''t being inserted on > boot. > > Cheers, > --Tim >Hello Tim, The "loop max_loop=64" was already stated inside the ''/etc/modules'' file. Running lsmod, gives the following result: ================================================================Module Size Used by bridge 63400 0 iptable_filter 4608 0 ip_tables 24232 1 iptable_filter x_tables 23432 1 ip_tables lp 15044 0 loop 22020 0 ipv6 313384 16 gspca 658256 0 compat_ioctl32 11136 1 gspca videodev 30720 1 gspca v4l2_common 22016 2 compat_ioctl32,videodev v4l1_compat 15492 1 videodev wmi_acer 11076 0 snd_hda_intel 380456 0 snd_pcm 89608 1 snd_hda_intel snd_timer 28168 1 snd_pcm snd_page_alloc 12560 2 snd_hda_intel,snd_pcm snd_hwdep 12296 1 snd_hda_intel button 10912 0 snd 69800 4 snd_hda_intel,snd_pcm,snd_timer,snd_hwdep shpchp 38044 0 pci_hotplug 34608 1 shpchp 8250_pnp 13568 0 8250 50248 1 8250_pnp serial_core 27904 1 8250 parport_pc 41256 1 parport 44684 2 lp,parport_pc soundcore 10400 1 snd evdev 15360 0 pcspkr 4992 0 ext3 149392 1 jbd 57256 1 ext3 mbcache 11392 1 ext3 sg 42008 0 sr_mod 20132 0 cdrom 41384 1 sr_mod sd_mod 33280 3 amd74xx 11672 0 [permanent] ide_core 139032 1 amd74xx pata_acpi 9856 0 usbhid 35808 0 hid 44864 1 usbhid ahci 33028 0 pata_amd 16772 2 ohci_hcd 32924 0 ehci_hcd 42252 0 ata_generic 9988 0 floppy 68904 0 forcedeth 55436 0 libata 176944 4 pata_acpi,ahci,pata_amd,ata_generic scsi_mod 179000 4 sg,sr_mod,sd_mod,libata ssb 37508 1 ohci_hcd usbcore 171312 5 gspca,usbhid,ohci_hcd,ehci_hcd thermal 19744 0 processor 41448 1 thermal fan 6792 0 fuse 56496 1 ================================================================ /Peter _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Thu, Nov 6, 2008 at 10:40 PM, Peter Privat <peter.privat@breilind.com>wrote:> On Thu, 2008-11-06 at 09:21 -0600, Paras pradhan wrote: > > > > > > On Thu, Nov 6, 2008 at 12:18 AM, Peter Privat > > <peter.privat@breilind.com> wrote: > > Hello, > > > > I''m looking for someone that can assist me on how to create > > and run a > > Windows guest on Xen. I''m about to make a Wiki with easy > > tutorials on > > how use the Xen. Plain and easy text that everyone should be > > able to > > follow and succeed with. > > > > I''ve already finished a working tutorial on how to setup a > > working Linux > > guest, which I plan to publish at the same time as the Windows > > guest > > tutorial. I''ve searched the internet, trying to find existing > > tutorials > > regarding Windows guests on Xen. So far, only outdated ones > > have turned > > up. Even my own attempts trying to modify those old tutorials, > > in order > > to fit the more resent versions of Linux and Xen, resulted in > > failure. > > > > So, I would like to get some help, guidance or even get in > > touch with > > someone that actually managed to install and run Windows as a > > guest, on > > a recent version of a Linux host. > > > > The software I intend to use in my Wiki tutorial, is: > > > > Host: Linux Ubuntu Hardy (8.04 LTS) 64 bit. > > Guest: Windows XP and Windows Server 2003 > > > > Best regards, > > Peter > > > > > > _______________________________________________ > > Xen-users mailing list > > Xen-users@lists.xensource.com > > http://lists.xensource.com/xen-users > > > > > > > > This might help > > > > > > > http://www.virtuatopia.com/index.php/Virtualizing_Windows_Server_2008_with_Xen > > > > > > > > > > > > Paras. > > _______________________________________________ > > Xen-users mailing list > > Xen-users@lists.xensource.com > > http://lists.xensource.com/xen-users > > > Hello Paras, > > Thank you for the link. > I tried creating a guest like shown in the example, but only to receive > an error message when trying to start it. > > =============================================================> # xm create /etc/xen/domu2.cfg > > Using config file "/etc/xen/domu2.cfg". > Error: Device 768 (vbd) could not be connected. > losetup /dev/loop0 /home/xen/domains/win2k3/xenwin2k3.img failedThis should work first .> > =============================================================> > It seems to the same kind of error I got from my earlier attempts, when > trying to use some older examples I''ve found on the internet. Perhaps > there are something wrong or missing in my Xen installation. An Ubuntu > 8.04 guest seems to work fine though. > > > The domu2.cfg file looks like this: > =============================================================> import os, re > arch = os.uname()[4] > if re.search(''64'', arch): > arch_libdir = ''lib64'' > else: > arch_libdir = ''lib'' > > kernel = "/usr/lib/xen/boot/hvmloader" > builder=''hvm'' > memory = 1024 > > # Should be at least 2KB per MB of domain memory, plus a few MB per > vcpu. > shadow_memory = 8 > name = "xenwin2k3" > vif = [ ''type=ioemu, bridge=xenbr0'' ] > acpi = 1 > apic = 1 > disk = [ ''file:/home/xen/domains/win2k3/xenwin2k3.img,hda,w'', > ''file:/home/cc/iso-images/windows2k3/image.iso,hdc:cdrom,r'' ] > > device_model = ''/usr/'' + arch_libdir + ''/xen/bin/qemu-dm'' > > > #----------------------------------------------------------------------------- > # boot on floppy (a), hard disk (c) or CD-ROM (d) > # default: hard disk, cd-rom, floppy > boot="dc" > sdl=0 > vnc=1 > vncconsole=1 > vncpasswd='''' > > serial=''pty'' > usbdevice=''tablet'' > =============================================================> > Any clues? > /Peter > >My working config file looks is: name = "windows2003" uuid = "f92d4a0c-eaaf-b319-ba32-1b40367a771f" maxmem = 512 memory = 512 vcpus = 1 builder = "hvm" kernel = "/usr/lib/xen/boot/hvmloader" boot = "c" pae = 1 acpi = 1 apic = 1 localtime = 1 on_poweroff = "destroy" on_reboot = "restart" on_crash = "restart" device_model = "/usr/lib64/xen/bin/qemu-dm" usbdevice = "tablet" sdl = 1 vnc = 1 vncunused = 0 vnclisten = "0.0.0.0" vncdisplay = "5" disk = [ "phy:/dev/drbd7,hda,w", ",hdc:cdrom,r" ] vif = [ "mac=00:16:3e:27:15:ea,bridge=virbr0,script=vif-bridge" ] serial = "pty" Paras. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users