+
    hZi  c                   s    ^ RI t ^RIHt ^RIHt ^RIHt ^RIHt ^RIH	t	 ^RI
Ht ^RIHt ^R	IHt ^R
IHt ^RIHt ^RIHt R t ! R R4      tR# )    N)
unattended)volumeupload)InstallerTreeMedia)perform_cdrom_injections)DomainOs)
DeviceDisk)Guest)OSDB)log)progress)xmlutilc                 s    \         P                  P                  R \         P                  P                  V 4      P	                  R^4      R,          4      # )z/VIRTINST-TESTSUITEZ-i)ospathZjoinbasenameZsplit)r      &5/usr/share/virt-manager/virtinst/install/installer.py_make_testsuite_pathr      s;    77<<-rww/?/?/E/K/KCQR/STV/WXX    c                   sF  a  ] tR t^t o RtR.R lt]R 4       tR tR t	R t
R tR	 tR
 tR tR tR tR tR tR tR tR tR tR tR tR tR tR t]R 4       t]R 4       tR tR t R t!R t"R t#R  t$R! t%R" t&R# t'R$ t(R% t)R& t*R' t+R( t,R) t-R* t.R+ t/R/R, lt0R-t1V t2R# )0	Installera  
Class for kicking off VM installs. The VM is set up separately in a Guest
instance. This class tracks the install media/bootdev choice, alters the
Guest XML, boots it for the install, then saves the post install XML
config. The Guest is passed in via start_install, only install media
selection is done at __init__ time

:param cdrom: Path to a cdrom device or iso. Maps to virt-install --cdrom
:param location: An install tree URI, local directory, or ISO/CDROM path.
    Largely handled by installtreemedia helper class. Maps to virt-install
    --location
:param location_kernel: URL pointing to a kernel to fetch, or a relative
    path to indicate where the kernel is stored in location
:param location_initrd: location_kernel, but pointing to an initrd
:param install_kernel: Kernel to install off of
:param install_initrd: Initrd to install off of
:param install_kernel_args: Kernel args <cmdline> to use. This overwrites
    whatever the installer might request, unlike extra_args which will
    append arguments.
:param no_install: If True, this installer specifically does not have
    an install phase. We are just using it to create the initial XML.
Nc           	     s   Wn         R V n        R V n        RV n        . V n        . V n        R V n        RV n        RV n        W@n	        Wn
        Wn        RV n        RV n        RV n        RV n        V'       d1   \         P"                  ! V P                   V4      pW n        RV n	        R# V'       g!   V'       g   V'       g   V'       g	   V'       d#   \!        V P                   VVVVVV	4      V n        R# R# )FNcdrom)conn	autostart_install_cdrom_device_added _unattended_install_cdrom_device	_tmpfiles_tmpvols_defaults_are_set_unattended_data_cloudinit_data_install_bootdev_no_install_is_reinstall_pre_reinstall_xml
_treemedia_treemedia_bootconfig_cdromr   Zvalidate_path)selfr   r   locationZinstall_bootdevZlocation_kernelZlocation_initrdZinstall_kernelZinstall_initrdZinstall_kernel_argsZ
no_installZis_reinstalls   &&&&&&&&&&&&r   __init__ZInstaller.__init__4   s     	 +0(04-!& $# /%)"&%)"&44TYYFEK$+D!O~Q_0		#DO R`r   c                s   V P                   P                   Uu. uF  q"P                  '       g   K  VNK  	  ppV F  pVP                  4       p\        P
                  ! RWTP                  4       4       \        P                  P                  V4      p VP                  \        R4      V,          R4       VP                  4       '       d    VP                  4       P                  4        M\        P                  ! V4       VP                  4        K  	  R# u upi   \         d=   p\        P
                  ! RTRR7       \        P                   ! RYg4        Rp?EK"  Rp?ii ; i)zR
Remove any disks we created as part of the install. Only ever
called by clients.
z+Removing created disk path=%s vol_object=%szRemoving disk '%s'NzFailed to remove disk '%s'T)Zexc_infozFailed to remove disk '%s': %s)devicesdiskZstorage_was_createdget_source_pathr	   debugZget_vol_objectr   r   r   start_deleteunlinkend	ExceptionZerror)guestmeterdZclean_disksr)   r   namees   &&      r   cleanup_created_disksZInstaller.cleanup_created_disksj   s    #(--"4"4N"4Q8M8Mqq"4ND'')DIICTK^K^K`a77##D)DEA23d:DA&&(('')002 IIdO		   O$  E		6tL		:DDDEs#   DDA=DE"&0EE"c                s    \        V P                  4      pVP                  Vn        VP	                  V4       VP                  4        VP                  4        V# N)r   r   DEVICE_CDROMdeviceset_source_pathsync_path_propsZvalidate)r%   r   dev   && r   _make_cdrom_deviceZInstaller._make_cdrom_device   sE    #%%
D!
r   c                sr    V P                   '       d   V P                   P                  4       # V P                  # r8   )r"   Z
cdrom_pathr$   r%   r   r   _cdrom_pathZInstaller._cdrom_path   s(    ?????--//{{r   c                s   V P                   '       d   R # \        V P                  4       4      '       g   R # RV n         V P                  '       do   VP                  P
                   Uu. uF  q"P                  4       '       g   K  VNK  	  ppV'       d+   V^ ,          pVP                  V P                  4       4       R # V P                  V P                  4       4      pV P                  '       d   VP                  V4       \        VP                  P
                  4       F:  w  rVVP                  4       '       g   K  VP                  P                  WER7        R # 	  VP                  V4       R # u upi )NT)idx)r   boolrA   r    r(   r)   is_cdromr;   r?   set_defaultsZ	enumerateZ	add_child
add_device)r%   r2   r4   Zcdromsr=   rB   r)   s   &&     r   _add_install_cdrom_deviceZ#Installer._add_install_cdrom_device   s   +++D$$&''+/(!&!3!3D!3Azz|aa!3FDQi##D$4$4$67%%d&6&6&89U# #5==#5#56IC}}'''5 7 	! Es   'E/E/c                sj   V P                   '       g   R # VP                  P                  4       '       d   R # VP                  P                   Fb  pVP                  4       '       g   K  VP                  4       V P                  4       8X  g   K@  VP                  R 4       VP                  4         R # 	  R # r8   )
r   osinfo
is_windowsr(   r)   rD   r*   rA   r;   r<   )r%   r2   r)   r>   r   _remove_install_cdrom_mediaZ%Installer._remove_install_cdrom_media   s|    ///<<""$$MM&&D}}4#7#7#9T=M=M=O#O$$T*$$&	 'r   c                sN   V P                   '       d   R # V P                  V4      pVP                  V4       VP                  V n         VP	                  V4       VP                  4        V P                  P                  4       '       d   \        V4      VP                  n
        R # R # r8   )r   r?   rE   targetrF   Zadd_virtioscsi_controllerr   in_testsuiter   ZsourceZfile)r%   r2   r&   r=      &&& r   $_add_unattended_install_cdrom_deviceZ.Installer._add_unattended_install_cdrom_device   s    000%%h/03

- 	'')99!!## 38<CJJO $r   c                s   V P                   '       g   R # VP                  P                   Uu. uF!  q"P                  V P                   8X  g   K  VNK#  	  up^ ,          pVP	                  R 4       VP                  4        R # u upi r8   )r   r(   r)   rK   r;   r<   )r%   r2   r4   r)      &&  r   '_remove_unattended_install_cdrom_deviceZ1Installer._remove_unattended_install_cdrom_device   sl    444 ==--c-aT=b=b1b-c
 	T"	 ds   BBc                s    V.pVP                   P                   F:  pVP                  VP                  8X  g   K   R pW#9  d   VP	                  V4        V# 	  V# )Zhd)r(   r)   r:   DEVICE_DISKappend)r%   r2   bootdev	bootorderr)      &&&  r   _build_boot_orderZInstaller._build_boot_order   s[    I	
 MM&&D{{d...+$$W- ' r   c                s6   VP                   P                  4       '       * ;'       do    VP                   P                  '       * ;'       dL    \        VP                  P                  4        Uu. uF  q"P                  P                  NK  	  up4      '       * # u upi r8   )r   Zis_containerkernelanyr(   Zget_allZbootZorder)r%   r2   r4   r>   r   _can_set_guest_bootorderZ"Installer._can_set_guest_bootorder   su    %%'' I IHHOO#I Iu}}/D/D/FG/F!/FGHH	
 Hs   ,Bc                s   V P                   '       g   R # V P                  w  r#pV'       dG   V P                  P                  4       ;'       d    \	        V4      ;'       g    TVP
                  n        V'       dG   V P                  P                  4       ;'       d    \	        V4      ;'       g    TVP
                  n        V'       d   WAP
                  n        R # R # r8   )	r"   r#   r   rL   r   r   rW   initrdkernel_args)r%   r2   rW   rZ   r[   s   &&   r   _alter_treemedia_bootconfigZ%Installer._alter_treemedia_bootconfig   s    &*&@&@#"ii446WW;OPV;Waa[aEHHO"ii446WW;OPV;Waa[aEHHO#.HH  r   c                s    RVn         V P                  V4       V P                  pV'       d:   V P                  V4      '       d#   V P	                  W4      VP
                  n        R# . VP
                  n        R# )z
Generate the portion of the guest xml that determines boot devices
and parameters. (typically the <os></os> block)

:param guest: Guest instance we are installing
ZdestroyN)Z	on_rebootr\   r   rY   rV   r   rT   r%   r2   rS   r>   r   _alter_bootconfigZInstaller._alter_bootconfig   sZ     $((/''t44U;;!%!7!7!GEHH!#EHHr   c                s   V P                   '       g   R# V P                   P                  W4      '       g   R# VP                  P                  V4      pT;'       g    ^ R,          pW1P                  8  dP   \        R4      RVR,          RVP                  P                  /,          p\        P                  ! V4       W1n        R# R# )z
Sets the appropriate amount of ram needed when performing a "network"
based installation

:param guest: Guest instance we are installing
Ni   zJOverriding memory to %(number)s MiB needed for %(osname)s network install.ZnumberZosname)	r"   Zrequires_internetrH   Z get_network_install_required_ramZcurrentMemoryr-   r5   r	   warning)r%   r2   r3   ZramZmsgrU   r   _alter_install_resourcesZ"Installer._alter_install_resources  s     00>>ll;;EBxxaD $$$\3$;%,,2C2CDEC KK"% %r   c                s    \         P                  ! V4      p\         P                  ! V4      pV P                  P	                  4       '       d   R# V P                  P                  4       '       d   R# W#8X  d   R# R# )z
Return True if we should upload media to the connection scratchdir.
This doesn't consider if there is any media to upload, just whether
we _should_ upload if there _is_ media.
TF)r   make_scratchdirget_system_scratchdirr   	is_remoteZis_unprivileged)r%   r2   
scratchdirsystem_scratchdirrO   r   _should_upload_mediaZInstaller._should_upload_media'  s]     (77>
.DDUK99  99$$&&*r   c                s   \         P                  ! V4      pV P                  V4      '       g4   \        P                  ! 4       '       g   \
        P                  ! R 4       V# VP                  P                  4       '       g   \
        P                  ! R4       V# \        P                  ! VP                  WBV4      w  rVV ;P                  V,          un        V# )z8Have access to preferred scratchdir so nothing to uploadzMedia upload not supported)r   rb   rf   r   rL   r	   r+   r   Zsupport_remote_url_installr   Zupload_pathsr   )r%   r2   r3   pathsre   ZnewpathsZtmpvolss   &&&&   r   _upload_mediaZInstaller._upload_media8  s    .DDUK((//8L8L8N8NIIJ Lzz4466II23L(55ejjBS\ab r   c                s   \         P                  ! V4      p. pV Fw  pVP                  4       pVP                  4       p\        P
                  ! R V4       VP                  4       p	V P                  P                  V	4       VP                  W34       Ky  	  VP                  P                  VP                  P                  4      p
\        P                  ! WV4      pVP                  V4       V P                  P                  V Uu. uF  q^ ,          NK  	  up4       \!        WT4      pV P                  P                  V4       V P#                  WV.4      ^ ,          pV P%                  W4       R# u upi )z Generated unattended cmdline: %sN)r   ra   Zget_expected_filenameZgenerate_cmdliner	   r+   Zwriter   rR   rH   Z$get_pre_installable_drivers_locationr   Zarchr   Zdownload_driversZextendr   rh   rN   )r%   r2   r3   Zscriptsrd   Z
injectionsZscriptZexpected_filenameZunattended_cmdlineZ
scriptpathZdrivers_locationZdriversZ
driverpairisos   &&&&          r   _prepare_unattended_dataZ"Installer._prepare_unattended_dataK  s+   '77>

F & < < >!'!8!8!:II8:LMJNN!!*-z=>  !<<LLUXX]][--.>ER'"wGw!}}wGH&z>c"  u5a811%= Hs   E1c                s   R pR pV P                   '       df   V P                   P                  4       '       d   V P                  pV P                   P                  W4      pV P                   P	                  W4      pRpMkVP
                  P                  4       '       g   \        P                  ! R4       \        P                  ! V P                  4      pV'       d
   V^,          MR pRp\        P                  ! WP                  W5WF4      # )NrZ   zAttempting unattended method=cdrom injection for a non-windows OS. If this doesn't work, try passing install media to --locationr   )r"   Zis_network_urlr&   Zget_os_mediaZget_os_treerH   rI   r	   r_   r   guess_os_by_isor   r   Zprepare_install_scriptsr   )r%   r2   r3   ZurlZos_treeZos_mediaZinjection_methodosguesss   &&&     r   _prepare_unattended_scriptsZ%Installer._prepare_unattended_scriptsb  s    ???--//mm33EAHoo11%?G'<<**,,:
 **4::6G%,wqz$H&11((#
 	
r   c                s    V P                   P                  WV4      w  rEpWE.pV P                  WV4      w  rEWEV3V n        R # r8   )r"   Zpreparerh   r#   )r%   r2   r3   unattended_scriptsrW   rZ   r[   rg   s   &&&&    r   _prepare_treemediaZInstaller._prepare_treemediaz  sG    &*oo&=&=eL^&_# ++E%@&,k%B"r   c                sd   \         P                  ! V4      pV P                  P                  V4      pV F%  pV P                  P                  V^ ,          4       K'  	  \        WCRR7      pV P                  P                  V4       V P                  WV.4      ^ ,          pV P                  W4       R# )r    T)Z	cloudinitN)	r   ra   r   Zcreate_filesr   rR   r   rh   rN   )r%   r2   r3   rd   Z	filepairsZfilepairri   s   &&&    r   _prepare_cloudinitZInstaller._prepare_cloudinit  s    '77>
((55jA	!HNN!!(1+. " 'yMc"  u5a811%=r   c                sf   V P                   '       d   VP                  4       V n        R pV P                  '       d   V P	                  W4      pV P
                  '       d   V P                  WV4       MV'       d   V P                  WV4       V P                  '       d   V P                  W4       R # R # r8   )
r    get_xmlr!   r   rm   r"   ro   rj   r   rp   )r%   r2   r3   rn   rM   r   _prepareZInstaller._prepare  s    &+mmoD#!   !%!A!A%!O???##E2DE))%8JK##E1  r   c                s   V P                   '       d   V P                   P                  V4       V P                   F9  p\        P                  ! R VP                  4       4       VP                  ^ 4       K;  	  . V n        V P                   F9  p\        P                  ! R\        V4      4       \        P                  ! V4       K;  	  . V n        R# )zRemoving volume '%s'zRemoving %sN)r"   Zcleanupr   r	   r+   r5   r.   r   Zstrr   r/   )r%   r2   ZvolZfrO   r   _cleanupZInstaller._cleanup  s    ???OO##E*==CII,chhj9JJqM ! AIImSV,IIaL   r   c                s   V P                   '       d#   V P                  '       d   \        P                  # V P                  '       dn   \        VP                  P                   Uu. uF!  q"P                  VP                  8X  g   K  VNK#  	  up4      '       d   \        P                  # V P                  # VP                  P                  ;'       d0    VP                  P                  ^ ,          P                  ;'       g    RpV\        P                  8X  d   \        P                  # V\        P                  8X  d   \        P                  # V\        P                  8X  d   \        P                  # \        P                  # u upi )r    N)r   r   r   ZBOOT_DEVICE_CDROMr   rX   r(   r)   r:   rQ   ZBOOT_DEVICE_HARDDISKr   r9   ZDEVICE_FLOPPYZBOOT_DEVICE_FLOPPY)r%   r2   r4   r:   rO   r   _get_postinstall_bootdevZ"Installer._get_postinstall_bootdev  s   :::$***---   u}}11O1!XX5NAA1OPP444(((##DD(:(:1(=(D(DLLZ+++000z...---z///...,,, Ps   $FFc                sV    V P                   '       d   V P                   P                  # R # r8   )r"   r&   r@   r   r   r&   ZInstaller.location  s     ?????+++ r   c                s    V P                   # r8   )r$   r@   r   r   r   ZInstaller.cdrom  s    {{r   c                v    V P                   '       g   \        R 4      hV P                   P                  V4       R# )z2Install method does not support initrd injections.N)r"   RuntimeErrorset_initrd_injections)r%   Zinitrd_injections   &&r   rw   ZInstaller.set_initrd_injections  s*    STT--.?@r   c                ru   )zEKernel arguments are only supported with location or kernel installs.N)r"   rv   set_extra_args)r%   Z
extra_argsrx   r   ry   ZInstaller.set_extra_args  s/    W  	&&z2r   c                s   V P                   '       d   R# V P                  '       d   VP                  4       V n        V P	                  V4       VP
                  P                  '       gI   V P                  V4      '       d2   V P                  V4      pV P                  W4      VP
                  n        V P                  '       g   VP                  R4       RV n         R# )z
Allow API users to set defaults ahead of time if they want it.
Used by vmmDomainVirtinst so the 'Customize before install' dialog
shows accurate values.

If the user doesn't explicitly call this, it will be called by
start_install()
NT)r   r    rq   r!   rG   r   rT   rY   rt   rV   rE   r]   r>   r   set_install_defaultsZInstaller.set_install_defaults  s     !!!&+mmoD#&&u-xx!!!d&C&CE&J&J33E:G!%!7!7!GEHH!!!t$!%r   c                sX   . pV P                   '       g%   V P                  '       g   V P                  '       d=   V P                  V4      '       g&   VP	                  \
        P                  ! V4      4       V P                  4       '       d    VP	                  V P                  4       4       V# )za
Return a list of paths that the hypervisor will need search access
for to perform this install.
)r"   r   r   rf   rR   r   ra   rA   )r%   r2   Zsearch_pathsr>   r   get_search_pathsZInstaller.get_search_paths  s    
 OOOt333t7L7L7L++E22 2 B B5 IJ 0 0 23r   c                s    V P                  4       '       g   V P                  4       '       d   R# V P                  '       d   R# \        V P                  ;'       g!    V P
                  ;'       g    V P                  4      # )z
Return True if the install operation has 2 XML phases, and
requires a hard VM poweroff to ensure the second stage is
used for subsequent boots.
TF)has_cloudinithas_unattendedr   rC   r$   r   r"   r@   r   r   requires_postboot_xml_changesZ'Installer.requires_postboot_xml_changes  s\     4#6#6#8#8DKKKK4#8#8KKDOOLLr   c                sJ    V P                   '       d   R# V P                  4       # )zD
Return True if some explicit install option was actually passed in
T)r   r~   r@   r   r   options_specifiedZInstaller.options_specified  s"     1133r   c                s   RpV P                   '       d   V P                   P                  V4      pMV P                  '       dj   VP                  P	                  4       '       d   \
        P                  ! R4       MH\        P                  ! V P                  4      pV'       d
   V^ ,          pM\
        P                  ! R4       \
        P                  ! RV4       V# )z
Attempt to detect the distro for the Installer's 'location'. If
an error is encountered in the detection process (or if detection
is not relevant for the Installer type), None is returned.

:returns: distro variant string, or None
Nz0Can't detect distro for cdrom remote connection.zNo media for distro detection.z#installer.detect_distro returned=%s)	r"   detect_distror   r   rc   r	   r+   r   rk   )r%   r2   Zretrl   rO   r   r   ZInstaller.detect_distro  s     ???////6CZZZzz##%%		LM..tzz:!!*CII67		7=
r   c                    Wn         R # r8   )r   )r%   Zunattended_datarx   r   set_unattended_dataZInstaller.set_unattended_data(  s     /r   c                r   r8   )r   )r%   Zcloudinit_datarx   r   set_cloudinit_dataZInstaller.set_cloudinit_data+  s    -r   c                ,    \        V P                  4      # r8   )rC   r   r@   r   r   r|   ZInstaller.has_cloudinit.  s    D(())r   c                r   r8   )rC   r   r@   r   r   r}   ZInstaller.has_unattended1  s    D))**r   c                s^    V P                   '       d   V P                   P                  4       # R # r8   )r   Zget_password_if_generatedr@   r   r   get_generated_passwordZ Installer.get_generated_password4  s(    ''AACC  r   c                s   \        V P                  VR 7      pV P                  V4       V P                  WC4       V P	                  4       '       d   VP                  4        VP                  '       d~   VP                  4       '       dh   \        VP                  P                  4      '       dC   \        P                  ! R4       VP                  VP                  P                  ^ ,          4       \        V P                  VR 7      pV P                  V4       V P                  V4       VP!                  4       VP!                  4       3# )Zparsexmlzcombo of default TPM, UEFI, and cloudinit is used. assuming this VM is using a linux distro cloud image with shim in the boot path. disabling TPM for the first boot)r   r   r^   r`   r|   Zset_smbios_serial_cloudinithave_default_tpmZis_uefiZlenr(   Ztpmr	   r+   Zremove_devicerJ   rP   rq   )r%   Zguest_ro	final_xmlr3   Zinitial_guestZfinal_guests   &&&&  r   _build_postboot_xmlZInstaller._build_postboot_xml<  s    dii)<}-%%m;557" (((X-=-=-?-?CH]H]HaHaDbDb		- ++M,A,A,E,Ea,HIDII	:((544[A$$&(;(;(===r   c                s>   R pVP                  4       pV P                  4       '       d   V P                  WV4      w  r4V P                  ;'       g    Tp\        P
                  ! RT;'       d    RV,           ;'       g    R4       \        P
                  ! RV4       W43# )NzGenerated initial_xml: %sZ
zNone requiredzGenerated final_xml: 
%s)rq   r~   r   r!   r	   r+   )r%   r2   r3   initial_xmlr   rU   r   
_build_xmlZInstaller._build_xmla  s    MMO	--//%)%=%=ePU%V"K++88y			'+*N*N4+;M*a*aRa	
 			-y9%%r   c                s<   V P                   P                  T;'       g    T4      pV'       g   V#  VP                  4        T'       d"   Y8w  d   T P                   P                  T4      pT#   \         d%     TP	                  4        h   \         d     h i ; ii ; i)zr
For hypervisors (like vz) that don't implement createXML,
we need to define+start, and undefine on start failure
)r   	defineXMLZcreater1   Zundefine)r%   r   r   
needs_bootdomains   &&&& r   _manual_transient_createZ"Installer._manual_transient_createo  s    
 $$[%=%=I>M	MMO ;3YY((3F  	!   	s/   A, ,B8B	B	BBBBc                s   \        R4      p\        P                  ! V4      pVP                  VR4       T;'       g    \	        V4      pVP
                  R8X  dB   V P                  '       g0   V'       d   \        \        R4      4      hV P                  W4V4      p	MYV'       g	   V'       d'   V P                  P                  T;'       g    T^ 4      p	V'       g   V P                  P                  V4      p	 \        P                  ! RX	P                  ^ 4      4       VP!                  4        X	#   \         d"   p
\        P                  ! RT
4        Rp
?
L9Rp
?
ii ; i)zq
Actually do the XML logging, guest defining/creating

:param doboot: Boot guest even if it has no install phase
zCreating domain...NZvzz4Domain type 'vz' doesn't support transient installs.z#XML fetched from libvirt object:
%sz*Error fetching XML from libvirt object: %s)r-   r
   Zensure_meterr,   rC   Ztyper    rv   r   r   Z	createXMLr   r	   r+   ZXMLDescr1   r0   )r%   r2   r3   r   r   doboot	transientZmeter_labelr   r   r6   s   &&&&&&&    r   _create_guestZInstaller._create_guest  s    ,-%%e,K&00tK0
::d&8&8&8"1%[#\]]22;:VF J,,[-E-EIqI,,Y7	GII<fnnQ>OP 			  	GIIBAFF	Gs   5&D- -E8EEc                s     VP                  R4       R#   \         dN   pT P                  P                  P	                  T4      '       g   h \
        P                  ! R4        Rp?R# Rp?ii ; i)z<
Set the autostart flag for domain if the user requested it
TzLCould not set autostart flag: libvirt connection does not support autostart.N)ZsetAutostartr1   r   ZsupportZis_error_nosupportr	   r_   )r%   r   r6   r>   r   _flag_autostartZInstaller._flag_autostart  sW    	% 	99$$77::KK^ 	s    A-AA((A-c                s   V P                   '       g4   V'       g,   \        P                  ! V P                  VP                  4       V P                  V4       VP                  P                  R,          p\        V P                  VP                  4       R7      pVP                  Vn	         V P                  W4       V'       g-   V P                   '       g   V F  p	V	P                  V4       K  	  V P                  W4      w  rV'       g	   V'       d   W3V P                  V4       # V P                  WWWV4      pV P                  '       d   V P!                  V4       VV P                  V4       #   T P                  T4       i ; i)z
Begin the guest install. Will add install media to the guest config,
launch it, then redefine the XML with the postinstall config.

:param return_xml: Don't create the guest, just return generated XML
:NNNr   )r    r   Zvalidate_namer   r5   rz   r(   r)   rq   r   rr   Zbuild_storager   rs   r   r   r   )r%   Z
user_guestr3   ZdryZ
return_xmlr   r   Zdisksr2   r=   r   r   r   s   &&&&&&&      r   start_installZInstaller.start_install  s#    !!!*		:??;!!*-""''* dii**<*<*>?!+!<!<	!MM%'t111 C%%e, ! &*__U%B"Kj#/ MM%  ''kf`F~~~$$V,MM% DMM% s   +*E0 <E0 E0 '7E0 0F)r$   r   r   r   r   r    r   r!   r   r   r"   r#   r   r   r   r   )
NNNNNNNNNF)NFFTF)3Z__name__Z
__module__Z__qualname__Z__firstlineno__Z__doc__r'   Zstaticmethodr7   r?   rA   rG   rJ   rN   rP   rV   rY   r\   r^   r`   rf   rh   rj   rm   ro   rp   rr   rs   rt   Zpropertyr&   r   rw   ry   rz   r{   r~   r   r   r   r   r|   r}   r   r   r   r   r   r   r   Z__static_attributes__Z__classdictcell__)Z__classdict__s   @r   r   r      s    .0l E E>
6
=*

/$ &2"&>.
0C	>2"-, , ,  A
3&0
M400.*+D#>J&.:"$! $!r   r   )r   Z r   r   Zinstallertreemediar   Zinstallerinjectr   r   r   r(   r   r2   r   Zosdictr   Zloggerr	   r
   r   r   r   ) r   r   <module>r      s=    
   2 5        Y|
! |
!r   