[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [XL] How hotplug scripts are called?



On 07/05/13 07:56, Choonho Son wrote:
> Hi All,
> 
> I have question how domain is built, so I looked at xl.c.
> 
> If we run "xl create vm.cfg",  
>  main_create( ) function is called like;
> 
> create_domain()
>   `---- libxl_domain_create_new( )
>           `---- do_domain_create( )
>                    `---- initiate_domain_create( )
>                            `---- lixl__domain_make( )
>                                    `---- xc_domain_create( )
> 
> following these functions, we can make one domain.
> 
> but my question is how hotplug script like vif-bridge is called? It
> seems like that  "main_networkattach( )" is called somewhere.

Scripts are called from libxl__device_{disk/nic}_add, in the call to
libxl__wait_device_connection libxl waits for the device backend to
reach state 2 and then it executes hotplug scripts.

The function device_hotplug in libxl_device.c takes care of most of the
work, aided by OS specific helpers (see libxl_linux.c and libxl_netbsd.c
for the OS specific implementation).


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.