xcat2 / xcat-core

Code repo for xCAT core packages
Eclipse Public License 1.0
359 stars 171 forks source link

"copycds -i <iso path>" copies media content when it shouldn't #5828

Open ryanbowen opened 5 years ago

ryanbowen commented 5 years ago

While testing ESXi support, I noticed that running copycds with "-i|--inspection" on an ESXi image actually does the extraction/copy of the target media instead of just checking the media.

[rbowen@kitsu-mn ~]$ copycds -i /data/images/vmware/VMware-VMvisor-Installer-6.5.0.update01-7388607.x86_64-DellEMC_Customized-A09.iso 
OS Image:/data/images/vmware/VMware-VMvisor-Installer-6.5.0.update01-7388607.x86_64-DellEMC_Customized-A09.iso
Copying media to /install/esxi6.5/x86_64/
Media copy operation successful

[rbowen@kitsu-mn ~]$ ls -l /install/esxi6.5/x86_64/ 
total 344784
-r-xr-xr-x 1 root root     11225 Mar 19  2018 a.b00
-r-xr-xr-x 1 root root     97488 Mar 19  2018 ata_liba.v00
-r-xr-xr-x 1 root root      8681 Mar 19  2018 ata_pata.v00
immarvin commented 5 years ago

hi @bybai ,would you please take a look at this

bybai commented 5 years ago

Hi @ryanbowen, What is the out put of xCAT version lsxcatd -v?
Does the extraction/copy of the target media work well for you? What is the results of command copycds -n <osdis> -a x86_64 <iso_name> ? What is xCAT management OS? I need to more details and re-produce this issue. Thanks

ryanbowen commented 5 years ago

@bybai What is the out put of xCAT version lsxcatd -v? Version 2.14.1 built Fri Jun 1

Does the extraction/copy of the target media work well for you? The extraction works fine, it's just that -i does the actual copy instead of inspecting the iso.

What is the results of command copycds -n -a x86_64 ? It extracts the iso to /install/esxi6.5/x86_64/. (It does not create an osimage definition though.)

What is xCAT management OS? CentOS 7.4

cxhong commented 5 years ago

looking the code, the esx plugin for copycds only supports following options:

GetOptions(
        'n=s' => \$distname,
        'a=s' => \$arch,
        'm=s' => \$path,
        's'   => \$includeupdate
    );

so, option -i is not supported. we should added it.