qemu-server/PVE
Fiona Ebner 83f04be3d5 migration: nbd export: switch away from deprecated QMP command
The 'nbd-server-add' QMP command has been deprecated since QEMU 5.2 in
favor of a more general 'block-export-add'.

When using 'nbd-server-add', QEMU internally converts the parameters
and calls blk_exp_add() which is also used by 'block-export-add'. It
does one more thing, namely calling nbd_export_set_on_eject_blk() to
auto-remove the export from the server when the backing drive goes
away. But that behavior is not needed in our case, stopping the NBD
server removes the exports anyways.

It was checked with a debugger that the parameters to blk_exp_add()
are still the same after this change. Well, the block node names are
autogenerated and not consistent across invocations.

The alternative to using 'query-block' would be specifying a
predictable 'node-name' for our '-drive' commandline. It's not that
difficult for this use case, but in general one needs to be careful
(e.g. it can't be specified for an empty CD drive, but would need to
be set when inserting a CD later). Querying the actual 'node-name'
seemed a bit more future-proof.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
2023-01-13 14:04:39 +01:00
..
API2 rollback: Only create start task with --start if VM is not running 2022-12-30 15:39:19 +01:00
CLI tree-wide: switch to official spelling of QEMU in descriptions/messages 2022-12-20 10:26:41 +01:00
QemuServer memory hot-plug: fix check for maximal memory value 2023-01-02 13:56:43 +01:00
VZDump vzdump : skip special:cloudinit section 2022-11-08 17:23:30 +01:00
Makefile buildsys: use $(MAKE) instead of make 2019-09-24 18:06:16 +02:00
QemuConfig.pm fix #4201: delete cloud-init disk on rollback 2022-11-11 19:26:16 +01:00
QemuMigrate.pm migration: log error from query-migrate upon migration failure 2023-01-12 11:12:14 +01:00
QemuServer.pm migration: nbd export: switch away from deprecated QMP command 2023-01-13 14:04:39 +01:00
QMPClient.pm tree-wide: switch to official spelling of QEMU in descriptions/messages 2022-12-20 10:26:41 +01:00