qemu VM does not start - kvm: -vnc 0.0.0.0:1: Failed to find an available port: Address already in use

Pierre DEDIEU

New Member
Jul 31, 2021
5
0
1
60
The concerned VM is a restore from a backup (on pve1) which was on another node (pve2) of the cluster.

It seems to be a problem on the destination node, as if I try a migration of the initial VM from pve2 to pve1, it also fails to start in the end:

Migration of the initial VM from pve2 fails, after transfering the disk, with a similar message
2021-09-06 11:05:11 starting VM 104 on remote node 'pve'
2021-09-06 11:05:16 [pve] kvm: -vnc 0.0.0.0:1: Failed to find an available port: Address already in use
2021-09-06 11:05:17 [pve] start failed: QEMU exited with code 1
2021-09-06 11:05:17 ERROR: online migrate failure - remote command failed with exit code 255
2021-09-06 11:05:17 aborting phase 2 - cleanup resources
2021-09-06 11:05:17 migrate_cancel
2021-09-06 11:05:17 scsi0: removing block-dirty-bitmap 'repl_scsi0'
2021-09-06 11:05:19 ERROR: migration finished with problems (duration 00:00:21)
TASK ERROR: migration problems

What could I check ?
(qm start 108 just returns the same message as the GUI)
 
hi,

2021-09-06 11:05:16 [pve] kvm: -vnc 0.0.0.0:1: Failed to find an available port: Address already in use
2021-09-06 11:05:17 [pve] start failed: QEMU exited with code 1
2021-09-06 11:05:17 ERROR: online migrate failure - remote command failed with exit code 255
here's your error, it seems you've added vnc parameter to your VM configuration, but there's another VM running VNC on the same port on the target node. if you change your VM config before migrating to use another vnc port, or change the vnc port of the VM in the target node, it should work
 
And was able to start the VM (!)

Any explaination would be appreciated
yes, as i mentioned in my previous post, when you defined the vnc arg with :1 as the port, it starts listening on port 5901.

you had another VM in the target node where it's being migrated to, which also had the same port defined for the VNC server, this caused a conflict and the newly migrated VM was thus not started.

when you changed the config to use :2, it starts the VNC server on port 5902, which fixes the conflict :)

please mark the thread as [SOLVED] so others know what to expect.
 
yes, as i mentioned in my previous post, when you defined the vnc arg with :1 as the port, it starts listening on port 5901.

you had another VM in the target node where it's being migrated to, which also had the same port defined for the VNC server, this caused a conflict and the newly migrated VM was thus not started.

when you changed the config to use :2, it starts the VNC server on port 5902, which fixes the conflict :)

please mark the thread as [SOLVED] so others know what to expect.
Can proxmox automatic change the port when migrate ?
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!