Merge feature/guest-agent-channel: agent=1 for guest-agent virtio-serial channel
This commit is contained in:
@@ -273,6 +273,10 @@ class ProxmoxVMProvisionMixin:
|
||||
cores=cpu,
|
||||
ostype="l26",
|
||||
scsihw="virtio-scsi-pci",
|
||||
# Without this, Proxmox never attaches the virtio-serial
|
||||
# channel the QEMU guest agent needs — get_vm_status's
|
||||
# agent queries (below) would have nothing to talk to.
|
||||
agent="1",
|
||||
)
|
||||
|
||||
# Step 3: Download cloud image (cached) and import as root disk
|
||||
|
||||
@@ -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