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

[BUG] host.portgroup.remove always returns NotFound #3498

Open
xarem opened this issue Jul 14, 2024 · 1 comment
Open

[BUG] host.portgroup.remove always returns NotFound #3498

xarem opened this issue Jul 14, 2024 · 1 comment

Comments

@xarem
Copy link
Contributor

xarem commented Jul 14, 2024

Describe the bug

If you create a new portgroup and remove it afterwords, vcsim returns NotFound

To Reproduce
Steps to reproduce the behavior:

vcsim -api-version 8.0 -dc 0 -l 127.0.0.1:8989 &

export GOVC_URL=https://user:[email protected]:8989/sdk
export GOVC_INSECURE=true
export GOVC_HOST="esx1.my_infra.test"

govc datacenter.create dc-my_infra
govc cluster.create dc-my_infra

govc cluster.add -hostname esx1.my_infra.test -username user -password pass -noverify
govc cluster.add -hostname esx2.my_infra.test -username user -password pass -noverify
govc cluster.add -hostname esx3.my_infra.test -username user -password pass -noverify

govc datastore.create -type local -name ds_my_infra -path /tmp 'dc-my_infra/*'

govc host.vswitch.add "vs-my-test"
govc host.portgroup.add -vswitch "vs-my-test" -vlan 211 "pg-my-test"

govc vm.create -net="VM Network" -m=512 -c=1 -g=otherLinux -disk=20G vm-my-linux-machine
govc vm.network.add -vm vm-my-linux-machine -net pg-my-test

govc host.portgroup.remove "vs-my-test" # this returns NotFound on vcsim, but works on prod

Expected behavior

we should be able to remove a previous created portgroup

Affected version
v0.38.0

@dougm
Copy link
Member

dougm commented Sep 6, 2024

Hi @xarem ,

govc host.portgroup.remove "vs-my-test"
vs-my-test is the name of the switch and pg-my-test is name of the portgroup, right?

The following should work against vcsim and real vc:

govc host.portgroup.remove "pg-my-test"
govc host.vswitch.remove "vs-my-test"

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