Eric Brown
2005-Aug-25 20:25 UTC
[Xen-users] Is there a way for a domu to find out its name
Is there a program like ''xm'' for domu-s that will give me the domu''s name? I''d like to be able to start with the same disk-image for every domu but have it pick up its hostname by knowing the name it was assigned in its xen config file in dom0. Thanks, Eric _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Nicholas Lee
2005-Aug-25 23:09 UTC
Re: [Xen-users] Is there a way for a domu to find out its name
On 8/26/05, Eric Brown <yogieric@mac.com> wrote:> I''d like to be able to start with the same disk-image for every domu > but have it pick up its hostname by knowing the name it was assigned > in its xen config file in dom0.You could pass the system name via the boot kernel options and pick this up in the in the init scripts. I don''t have a receipe of the top of my head, but probably something easy to google. -- Nicholas Lee http://stateless.geek.nz gpg 8072 4F86 EDCD 4FC1 18EF 5BDD 07B0 9597 6D58 D70C _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Gino LV. Ledesma
2005-Aug-26 15:02 UTC
Re: [Xen-users] Is there a way for a domu to find out its name
Something like: extra="domU_name=myname" in the config would work. Then, on the domU itself, you could cat /proc/cmdline to get the list of kernel boot options. HTH, - gino ledesma On 8/25/05, Nicholas Lee <emptysands@gmail.com> wrote:> On 8/26/05, Eric Brown <yogieric@mac.com> wrote: > > I''d like to be able to start with the same disk-image for every domu > > but have it pick up its hostname by knowing the name it was assigned > > in its xen config file in dom0. > > You could pass the system name via the boot kernel options and pick > this up in the in the init scripts. > > I don''t have a receipe of the top of my head, but probably something > easy to google. > > -- > Nicholas Lee > http://stateless.geek.nz > gpg 8072 4F86 EDCD 4FC1 18EF 5BDD 07B0 9597 6D58 D70C > > _______________________________________________ > 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
Patrick O''Rourke
2005-Sep-08 14:33 UTC
Re: [Xen-users] Is there a way for a domu to find out its name
Eric Brown wrote:> I''d like to be able to start with the same disk-image for every domu > but have it pick up its hostname by knowing the name it was assigned in > its xen config file in dom0.Did you try the hostname arg (from examples/xmexample1 file)? # Set the hostname. #hostname= "vm%d" % vmid -- Patrick O''Rourke porourke@egenera.com _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users