Alexandros Manakos
2007-Nov-28 14:27 UTC
[Xen-users] IP-Address for DomUs via configuration script possible?
Hello everybody. I got the following problem: I want to assign the ip-adresses for my domUs dynamically. I mean that i can assign them while creating them so that i dont have to login to the virtual machine to assign it. I dont have any Dhcp option because then i wouldnt know how to connect to the DomUs (which ip to use to connect to them). I solved this problem with xen-tools and debian but i need a solution for Windows XP and Vista. The sytems are running but i tried to configure via the configurescript (windows-xp.hvm and vista.hvm) with: vif=[''ip=192.168.1.22''] but i couldnt connect to the virtual machine. The DomU (winxp) was configured to get its ip from dhcp cause i need to clone every machine via cp and so i can not assign the machine (in the image) a static ip... I thought that it could be possible to assign via the configuration script to assign a domu an ip and the domU gets this from xen when it tries to get a dhcp offer... any suggestions? regards Alexandros _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Marc Patino Gómez
2007-Nov-28 14:57 UTC
Re: [Xen-users] IP-Address for DomUs via configuration script possible?
Hi, I would try to put a MAC address in domU config file (XEN has his own MAC range), vif = [ ''type=ioemu, mac=00:16:3e:00:00:11, bridge=xenbr0''] and configure your DHCP server to assign a known IP address to this MAC. For example: host Windoze1{ hardware ethernet 00:16:3e:00:00:11; fixed-address 192.168.2.101; } Regards, Marc Alexandros Manakos wrote:> Hello everybody. > > I got the following problem: > I want to assign the ip-adresses for my domUs dynamically. I mean that i > can assign them while creating them so that i dont have to login to the > virtual machine to assign it. I dont have any Dhcp option because then i > wouldnt know how to connect to the DomUs (which ip to use to connect to > them). I solved this problem with xen-tools and debian but i need a > solution for Windows XP and Vista. The sytems are running but i tried to > configure via the configurescript (windows-xp.hvm and vista.hvm) with: > vif=[''ip=192.168.1.22''] but i couldnt connect to the virtual machine. > The DomU (winxp) was configured to get its ip from dhcp cause i need to > clone every machine via cp and so i can not assign the machine (in the > image) a static ip... > > I thought that it could be possible to assign via the configuration > script to assign a domu an ip and the domU gets this from xen when it > tries to get a dhcp offer... > > any suggestions? > > regards > Alexandros > > > > > _______________________________________________ > 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
Dominik Klein
2007-Nov-28 14:58 UTC
Re: [Xen-users] IP-Address for DomUs via configuration script possible?
> vif=[''ip=192.168.1.22'']afaik, this is a linux-specific option. Suggest you give a fixed mac-address to the domU and make your dhcp server assign a fixed ip-address to that mac address. Regards Dominik _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Alexandros Manakos
2007-Nov-28 15:10 UTC
Re: [Xen-users] IP-Address for DomUs via configuration script possible?
Hello again and thanks for the fast answer. But i think u misunderstood me. I do not have access to the DHCP. I give you the scenario: i want my clients to have the possibility to create DomUs (windows-xp-machines) via a php-script. They click: "create" and the new xp-machine gets created. BUT they need access to this machine via Remote Desktop and so this new just created machine needs a IP. So the possibility you told me needs a lot of configuration. I need to set up a DHCP on the dom0 and create dynamically new mac-addresses for the domus (thier config-file) and also edit the configurationfile from the dhcp of the dom0. BUT i dont want to set a dhcp on the dom0. I want to have the possibility to assign the ip-address via a script or sth. like that... regards Alexandros Marc Patino Gómez schrieb:> Hi, > > I would try to put a MAC address in domU config file (XEN has his own > MAC range), > > vif = [ ''type=ioemu, mac=00:16:3e:00:00:11, bridge=xenbr0''] > > and configure your DHCP server to assign a known IP address to this > MAC. For example: > > host Windoze1{ > hardware ethernet 00:16:3e:00:00:11; > fixed-address 192.168.2.101; > } > > > Regards, > > Marc > > Alexandros Manakos wrote: >> Hello everybody. >> >> I got the following problem: >> I want to assign the ip-adresses for my domUs dynamically. I mean that i >> can assign them while creating them so that i dont have to login to the >> virtual machine to assign it. I dont have any Dhcp option because then i >> wouldnt know how to connect to the DomUs (which ip to use to connect to >> them). I solved this problem with xen-tools and debian but i need a >> solution for Windows XP and Vista. The sytems are running but i tried to >> configure via the configurescript (windows-xp.hvm and vista.hvm) with: >> vif=[''ip=192.168.1.22''] but i couldnt connect to the virtual machine. >> The DomU (winxp) was configured to get its ip from dhcp cause i need to >> clone every machine via cp and so i can not assign the machine (in the >> image) a static ip... >> >> I thought that it could be possible to assign via the configuration >> script to assign a domu an ip and the domU gets this from xen when it >> tries to get a dhcp offer... >> >> any suggestions? >> >> regards >> Alexandros >> >> >> >> >> _______________________________________________ >> 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 >-- ------------------------------------------------------------------------ BSc. Alexandros Manakos University of applied science - Hagenberg Sichere Informationssysteme E-Mail: alexandros[AT]manakos.de ------------------------------------------------------------------------ _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Marc Patino Gómez
2007-Nov-28 15:23 UTC
Re: [Xen-users] IP-Address for DomUs via configuration script possible?
Hi, Alexandros Manakos wrote:> Hello again and thanks for the fast answer. But i think u misunderstood > me. I do not have access to the DHCP. I give you the scenario: > > i want my clients to have the possibility to create DomUs > (windows-xp-machines) via a php-script. They click: "create" and the new > xp-machine gets created. BUT they need access to this machine via Remote > Desktop and so this new just created machine needs a IP. So the > possibility you told me needs a lot of configuration. I need to set up a >Using scripting is not to much work ;)> DHCP on the dom0 and create dynamically new mac-addresses for the domus > (thier config-file) and also edit the configurationfile from the dhcp of > the dom0. BUT i dont want to set a dhcp on the dom0. I want to have the > possibility to assign the ip-address via a script or sth. like that... >You can create a linux domU and install a dhcp server on it. Sorry but I don''t know other way to do it Regards, Marc> regards > Alexandros > > Marc Patino Gómez schrieb: > >> Hi, >> >> I would try to put a MAC address in domU config file (XEN has his own >> MAC range), >> >> vif = [ ''type=ioemu, mac=00:16:3e:00:00:11, bridge=xenbr0''] >> >> and configure your DHCP server to assign a known IP address to this >> MAC. For example: >> >> host Windoze1{ >> hardware ethernet 00:16:3e:00:00:11; >> fixed-address 192.168.2.101; >> } >> >> >> Regards, >> >> Marc >> >> Alexandros Manakos wrote: >> >>> Hello everybody. >>> >>> I got the following problem: >>> I want to assign the ip-adresses for my domUs dynamically. I mean that i >>> can assign them while creating them so that i dont have to login to the >>> virtual machine to assign it. I dont have any Dhcp option because then i >>> wouldnt know how to connect to the DomUs (which ip to use to connect to >>> them). I solved this problem with xen-tools and debian but i need a >>> solution for Windows XP and Vista. The sytems are running but i tried to >>> configure via the configurescript (windows-xp.hvm and vista.hvm) with: >>> vif=[''ip=192.168.1.22''] but i couldnt connect to the virtual machine. >>> The DomU (winxp) was configured to get its ip from dhcp cause i need to >>> clone every machine via cp and so i can not assign the machine (in the >>> image) a static ip... >>> >>> I thought that it could be possible to assign via the configuration >>> script to assign a domu an ip and the domU gets this from xen when it >>> tries to get a dhcp offer... >>> >>> any suggestions? >>> >>> regards >>> Alexandros >>> >>> >>> >>> >>> _______________________________________________ >>> 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 >> >> > > >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Stefan de Konink
2007-Nov-28 15:48 UTC
Re: [Xen-users] IP-Address for DomUs via configuration script possible?
Why is DHCP not an option for you? As long as you assign the mac address everything will work as planned? Stefan _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Alexandros Manakos
2007-Nov-28 16:32 UTC
Re: [Xen-users] IP-Address for DomUs via configuration script possible?
Because i dont want to install any dhcp-servers on the dom0. I want to keep the dom0 for everybody that will use the phpscript to create a domU as simple as possible. Dont want anybody to read the install-instructions and have there 30 steps of things to do to get the script running. There might be a way i thought just about. IF there were another DHCP (outside of the dom0) the clients could request a IP. The problem is that the user that created via the phpscript the domU doesn´t know about the ip the domU just got. To solve this i might need a script (perl or sth. like that) that monitors the dhcp-offers from any machine on the dom0 (listen on the bridge) and stores the answers from the outside dhcp in a database or txtfile and gives this to the phpscript back so that the user gets the IP to connect to. Greetings Alexandros Stefan de Konink schrieb:> Why is DHCP not an option for you? As long as you assign the mac address > everything will work as planned? > > > Stefan > > > _______________________________________________ > 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
richard.d.simpson@comcast.net
2007-Nov-28 17:35 UTC
Re: [Xen-users] IP-Address for DomUs via configuration script possible?
-------------- Original message ---------------------- From: Alexandros Manakos <alexandros@manakos.de>> Because i dont want to install any dhcp-servers on the dom0. I want to > keep the dom0 for everybody that will use the phpscript to create a domU > as simple as possible. Dont want anybody to read the > install-instructions and have there 30 steps of things to do to get the > script running. There might be a way i thought just about. IF there were > another DHCP (outside of the dom0) the clients could request a IP. The > problem is that the user that created via the phpscript the domU doesn´t > know about the ip the domU just got. To solve this i might need a script > (perl or sth. like that) that monitors the dhcp-offers from any machine > on the dom0 (listen on the bridge) and stores the answers from the > outside dhcp in a database or txtfile and gives this to the phpscript > back so that the user gets the IP to connect to. >Are your users connecting from within a private LAN? Don''t re-invent the wheel, use DNS. Just have your users pick a host name when they create their domU. Dnsmasq (http://www.thekelleys.org.uk/dnsmasq/doc.html) is a lightweight app that provides both DHCP and DNS services all in one package. This can easily run in dom0, or a domU specifically set up for the purpose. regards, Richard. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users