[yocto] Proper convention for naming guest

Ken Bassford kbassford at apertussolutions.com
Wed Sep 26 06:31:34 PDT 2018


Hi Folks,

I'm rather new to Yocto so please forgive me (and please correct me) if I have some of the terminology wrong.

I am currently building a Xen dom0 with two guest domain images running under the dom0.  These directories for building each of these images are located under the meta-virtualization directory in the build environment as recipe directories (recipe-xxx).  Dom0 and each of the images work fine.

The trouble I am having is that I wanted to give each domU a unique name/hostname to make networking and management easier so I don't have to manually set them up each time one is modified.  Since each recipe only consisted of several sub-directories containing .bb files, I created a "base-files_3.0.14.bbappend" to each recipe's 'image' sub-directory (consisting of one line: hostname_pn-base-files = "<name of host>").  Now it seams that every time meta-virtualization is called bitbake "sees" the first .bbappend it comes across and tries to change the hostname regardless of which recipe I am building (i.e. If you run "bitbake -e base-files | grep ''hostname" it will always result in the same custom hostname).  Obviously this is not the proper way to set the hostname.

What is the proper way to go about this?  Can I set it on the bitbake command line for building the image?

I'd like for the hostname to be tied to the custom image recipe I am building.  If I don't specifically call one of my custom recipes, neither should automatically be changing the hostname.

Thank you in advance for your time.

Sincerely,
Ken Bassford
Apertus Solutions





More information about the yocto mailing list