[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
modify NetdevUserOptions through QMP in QEMU 6 - how?
From: |
Alexander Sosedkin |
Subject: |
modify NetdevUserOptions through QMP in QEMU 6 - how? |
Date: |
Fri, 10 Dec 2021 18:02:36 +0100 |
With QEMU 5 I could totally issue a QMP netdev_add
with the same ID to adjust the NetdevUserOptions I want,
such as restrict or hostfwd. No deleting needed,
just a netdev_add with what I want changed as a param.
With QEMU 6 it started failing, claiming the ID is already used.
And if I do netdev_del + netdev_add, I just lose connectivity.
What's even stranger, I still see old netdev attached in info network:
> netdev_del {'id': 'net0'}
{}
> human-monitor-command {'command-line': 'info network'}
virtio-net-pci.0:
index=0,type=nic,model=virtio-net-pci,macaddr=52:54:00:12:34:56
\ net0: index=0,type=user,net=10.0.2.0,restrict=off
> netdev_add {'type': 'user', 'id': 'net0', 'restrict': False, 'hostfwd':
> [{'str': 'tcp:127.0.0.1:58239-:22'}]}
{}
> human-monitor-command {'command-line': 'info network'}
unseal: virtio-net-pci.0:
index=0,type=nic,model=virtio-net-pci,macaddr=52:54:00:12:34:56
\ net0: index=0,type=user,net=10.0.2.0,restrict=off
net0: index=0,type=user,net=10.0.2.0,restrict=off
What's the correct QMP command sequence to modify NetdevUserOptions?
Please CC me on replies.