feat: add govc vm.customize command to support password and custom script#3867
Conversation
eeac718 to
026d750
Compare
|
@akutz Please help to review this PR, this is to support changing password/expiring password and run custom script in govc. Thanks. |
govc vm.customize command to support password and custom scriptgovc vm.customize command to support password and custom script
|
ping @akutz, please help to review, thanks. |
|
Looks like the CI is failing and that |
6b44975 to
b1bb311
Compare
Thanks for the review, update the doc and PTAL. |
tenthirtyam
left a comment
There was a problem hiding this comment.
It would be good to clarify as "VCF Automation" where applicable and to correct the spelling of "signature", too.
govc vm.customize command to support password and custom scriptgovc vm.customize command to support password and custom script
tenthirtyam
left a comment
There was a problem hiding this comment.
Some minor changes requested.
tenthirtyam
left a comment
There was a problem hiding this comment.
Can you open an issue and link the issue to this pull request for traceability?
govc vm.customize command to support password and custom scriptgovc vm.customize command to support password and custom script
Thanks, I create an issue: #3888 and add it into this pull request, PTAL. Thanks. |
|
@tenthirtyam, Sorry to address your comments late since I was on vacation. PTAL, thanks for your time. |
govc vm.customize command to support password and custom scriptgovc vm.customize command to support password and custom script
5ec888f to
117acc8
Compare
…script This change enhances the `govc vm.customize` command by adding support for: - **`-pwd`**: Change the password of the default administrator (`Administrator` for Windows, `root` for Linux). - **`-expire-pwd`**: Expire the password of the default administrator, requiring users to set a new password at the next login. - **`-script-file`**: Specify a script to be executed before and after the customization process. Signed-off-by: Xiaofeng Wang <xiaofengw@vmware.com>
117acc8 to
71b16a3
Compare
Description
This change enhances the
govc vm.customizecommand by adding support for:-pwd: Change the password of the default administrator (Administratorfor Windows,rootfor Linux).-expire-pwd: Expire the password of the default administrator, requiring users to set a new password at the next login.-script-file: Specify a script to be executed before and after the customization process.How Has This Been Tested?
Deployed a vCenter with both Windows and Linux VMs, then ran:
govc vm.customize -vm rhel -name rhel -ip dhcp \ -pwd 'NewPwd@123' -expire-pwd -script-file './test.sh'and
govc vm.customize -type Windows -vm win10 -name win10 -ip dhcp \ -pwd 'NewPwd@123' -expire-pwd -script-file '~/test.bat' \ -username fake -org dummyPower on the VM and wait for customization complete, verify below:
feat
#3888