feat(vm_provision_mixin): set agent=1 on VM create for guest-agent channel
Proxmox only opens the virtio-serial channel qemu-guest-agent needs when agent=1 is set at VM creation — without it, the agent package can be installed but never actually reachable.
This commit is contained in:
@@ -123,6 +123,11 @@ def test_create_vm_from_cloud_init_single_nic():
|
||||
assert mock_node.qemu.post.called
|
||||
mixin._download_cloud_image.assert_called_once()
|
||||
|
||||
# Regression: without agent="1" Proxmox never attaches the virtio-serial
|
||||
# channel the QEMU guest agent needs, so get_vm_status(wait_for_ip=True)
|
||||
# can never succeed no matter what's installed inside the guest.
|
||||
assert mock_node.qemu.post.call_args[1]["agent"] == "1"
|
||||
|
||||
# Verify NIC config was set correctly: net0 with tag=10, DHCP enabled
|
||||
net_call_args = next(c for c in mock_vm.config.post.call_args_list if "net0" in c[1])
|
||||
assert "tag=10" in net_call_args[1]["net0"]
|
||||
|
||||
Reference in New Issue
Block a user