Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VCH Configure to add new registry whitelist option missing #8629

Open
aviratna opened this issue Mar 9, 2020 · 1 comment
Open

VCH Configure to add new registry whitelist option missing #8629

aviratna opened this issue Mar 9, 2020 · 1 comment

Comments

@aviratna
Copy link

aviratna commented Mar 9, 2020

VIC 1.5.4
VCH Configure to add new registry whitelist option missing

Usecase: To add new registry to existing running VCH

Command given in doc:
vic-machine-operating_system configure
--target vcenter_server_address
--user Administrator@vsphere.local
--password password
--thumbprint certificate_thumbprint
--id vch_id
--registry-ca path_to_ca_cert_for_existing_registry
--registry-ca path_to_ca_cert_for_new_registry

Issue: There is no option to specify the whitelist registry

Error: Command gets completed successfully but not able to pull from new registry
Access denied to unauthorized registry while VCH is in whitelist mode

@malikkal

@malikkal
Copy link

Following powershell could help, while the VIC folks could provide a permanent fix by tweaking vic-machine configure.

Function setGuestInfo ($guestVMName, $guestKey, $guestKeyValue){
    $vmConfigSpec = New-Object VMware.Vim.VirtualMachineConfigSpec
    $extra = New-Object VMware.Vim.optionvalue
    $extra.Key = $guestKey
    $extra.Value = $guestKeyValue
    $vmConfigSpec.extraconfig += $extra
    $vm = Get-View -ViewType VirtualMachine | where { $_.name -eq $guestVMName }
    $vm.ReconfigVM($vmConfigSpec)
}

$vCenterServer = "<your vcenter>"
Connect-VIServer -Server $vCenterServer
setGuestInfo ("<vch name>") ("guestinfo.vice./registry/whitelist_registries~") ("<registry1>|<registry2>")
Disconnect-VIServer -Server $vCenterServer -confirm:$False | Out-Null 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants