PowerCLI

 View Only
  • 1.  OSCustomizationSpec and RHEL9 with NetworkManager

    Posted Sep 24, 2024 01:12 PM

    Hello,

    For many time I've used Powercli and OSCustomizationSpec to assign Network settings to VM Os.

    But with the Release of RHEL9 the classical /etc/sysconfig/network-scripts/ifcfg-files  will be no longer supported

    If I deploy a template with RH9 using OSCustomization Scripts, I'll have a duplicated network configuration for the ifcfg-ens192

    one ifcfg-ens192 file is created at /etc/sysconfig/network-scripts and another under /etc/NetworkManager/system-connections. And both were active when I type nmcli con show

    I've tested configuring NetworkManager.conf assigning this parameter to plugin entry, I've removed ifcfg-rh
    [main]
    plugins = keyfile

    With this configuration I only have active the NetworkManager configuration, but there is still a file created under 'network-scripts', the file is still created by the OsCustomization Script (the file contains this note).

    My question is, how should I deploy a RHEL9 that should use NetworkManager? and avoid the automatic creation of network-script files?
    should I change My deployment method? If Yes? how should assign Network settings to the deployed virtual machine?

    can I still continue using OsCustomization with RHEL9? 

    My current powercli version is VMware.PowerCLI 13.0.0 build 20829139

    Thanks in advance

    Regards



  • 2.  RE: OSCustomizationSpec and RHEL9 with NetworkManager

    Posted Sep 25, 2024 03:41 AM

    See KB88199



    ------------------------------


    Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference


    ------------------------------



  • 3.  RE: OSCustomizationSpec and RHEL9 with NetworkManager

    Posted Sep 25, 2024 02:46 PM

    Hi LucD,

    My current problem is that file is that an additional file is created under network-scripts, it's quite similar as described in the article, but I'll have higher versions that are reported on the article.

    I've tested de WorkAroud, but it didn't clear the network-script file.

    I've realized that my Rhel 9 already has cloud-init, and perhaps is interfering the setup. But I don't know how to deal with Cloud-Init because  I'm deploying a template using  Powercli and can't see how to pass parameters to cloud-init using OSCustomization

    I've also tried to disable cloud-init -> touch /etc/cloud/cloud-init.disabled , but then the new IP address is not set.

    How should I deploy a RHEL9 using powercli? Rhel9 deprecates the usage of network-scripts that seems that is the method used when a template is deployed using the powercli OSCustomization 

    Regards

    Regards




  • 4.  RE: OSCustomizationSpec and RHEL9 with NetworkManager

    Posted Sep 26, 2024 03:03 AM

    I did a blog series on Cloud-init, and although I used Ubuntu, the concept should be the same for RHEL.
    Have a look, it might give you some pointers



    ------------------------------


    Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference


    ------------------------------