[pve-devel] [PATCH pve-manager] api2: network : check if ifupdown2 is proxmox version
Alexandre Derumier
aderumier at odiso.com
Sat Jan 11 13:41:44 CET 2020
1 user forgot to add proxmox repo, and have installed debian version.
https://forum.proxmox.com/threads/bridge-cant-be-found-and-vm-failed-to-start.63138/
Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
PVE/API2/Network.pm | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/PVE/API2/Network.pm b/PVE/API2/Network.pm
index 01da0de1..94349998 100644
--- a/PVE/API2/Network.pm
+++ b/PVE/API2/Network.pm
@@ -575,6 +575,11 @@ __PACKAGE__->register_method({
die "you need ifupdown2 to reload networking\n" if !-e '/usr/share/ifupdown2';
+ PVE::Tools::run_command(['ifreload', '-V'], outfunc => sub {
+ my $line = shift;
+ die "you need ifupdown2 package from proxmox repository" if $line !~ m/pve/;
+ });
+
if (-x '/usr/bin/ovs-vsctl') {
my $ovs_configured = sub {
my $ifaces = shift;
--
2.20.1
More information about the pve-devel
mailing list