Hi Everyone, Is there any way to make the xm create command read a config file via a pipe or "<" ? My idea would be to generate the config file dynamically from a database via a php scripts, and somehow pipe the output to xm create Any help would be appreciated Cheers _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
> Hi Everyone, > > Is there any way to make the xm create command read a config file viaa> pipe or "<" ? > > My idea would be to generate the config file dynamically from adatabase> via a php scripts, and somehow pipe the output to xm create > > Any help would be appreciated >Aren''t the domu config files in /etc/xen just python source fragments? James _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Paulo Henrique Lopes Ribeiro
2011-Apr-19 11:30 UTC
Re: [Xen-users] Xen Config Files from Database
Hi Jonathan. I do not know a answer for your question. But i can show you another way to do this. Have u heard about libvirt? It is a virtualization toolkit writed in C. But it have bindings for php. Maybe you should try. Cheers 2011/4/19 James Harper <james.harper@bendigoit.com.au>> > Hi Everyone, > > > > Is there any way to make the xm create command read a config file via > a > > pipe or "<" ? > > > > My idea would be to generate the config file dynamically from a > database > > via a php scripts, and somehow pipe the output to xm create > > > > Any help would be appreciated > > > > Aren''t the domu config files in /etc/xen just python source fragments? > > James > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users >-- ----------------------------------------------------- Paulo Henrique Lopes Ribeiro Graduando em Ciência da Computação pela UNIFEI. Web Developer - Ruby on Rails, PHP, HTML, CSS, MYSQL, SEO. Linux - Debian Lenny/Squeeze amd64(XEN) - Centos 5.5 x86_64 _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
You can launch domUs without config file. In your case, you can read domU
configuration parameters from database and them generate "xm create"
command
dynamically
Example.
xm create /dev/null ramdisk=initrd.img \
kernel=/boot/vmlinuz-2.6.12.6-xenU \
name=ramdisk vif='''' vcpus=1 \
memory=64 root=/dev/ram0
2011/4/19 James Harper <james.harper@bendigoit.com.au>
> > Hi Everyone,
> >
> > Is there any way to make the xm create command read a config file via
> a
> > pipe or "<" ?
> >
> > My idea would be to generate the config file dynamically from a
> database
> > via a php scripts, and somehow pipe the output to xm create
> >
> > Any help would be appreciated
> >
>
> Aren''t the domu config files in /etc/xen just python source
fragments?
>
> James
>
> _______________________________________________
> 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
Excellent Carlos! This is exactly what I was looking for! So literally I just do: xm create <Text from config file> Cheers! On 19/04/2011 12:31, Carlos wrote:> You can launch domUs without config file. In your case, you can read > domU configuration parameters from database and them generate "xm > create" command dynamically > > Example. > xm create /dev/null ramdisk=initrd.img \ > kernel=/boot/vmlinuz-2.6.12.6-xenU \ > name=ramdisk vif='''' vcpus=1 \ > memory=64 root=/dev/ram0 > > > > > 2011/4/19 James Harper <james.harper@bendigoit.com.au > <mailto:james.harper@bendigoit.com.au>> > > > Hi Everyone, > > > > Is there any way to make the xm create command read a config > file via > a > > pipe or "<" ? > > > > My idea would be to generate the config file dynamically from a > database > > via a php scripts, and somehow pipe the output to xm create > > > > Any help would be appreciated > > > > Aren''t the domu config files in /etc/xen just python source fragments? > > James > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com <mailto: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