my $net = PVE::QemuServer::parse_net($conf->{$netid});
die "unable to parse network config '$netid'\n" if !$net;
-my $bridge = $net->{bridge};
-die "unable to get bridge setting\n" if !$bridge;
-
-my $bridgemtu = PVE::Tools::file_read_firstline("/sys/class/net/$bridge/mtu");
-die "bridge '$bridge' does not exist\n" if !$bridgemtu;
-
-system ("/sbin/ifconfig $iface 0.0.0.0 promisc up mtu $bridgemtu") == 0 ||
- die "interface activation failed\n";
+PVE::Network::tap_create($iface, $net->{bridge});
PVE::Network::tap_rate_limit($iface, $net->{rate}) if $net->{rate};