]>
git.proxmox.com Git - qemu-server.git/blob - pve-bridge
5 use PVE
::Tools
qw(run_command);
10 die "no interface specified\n" if !$iface;
12 die "got strange interface name '$iface'\n"
13 if $iface !~ m/^tap(\d+)i(\d+)$/;
18 my $migratedfrom = $ENV{PVE_MIGRATED_FROM
};
20 my $conf = PVE
::QemuServer
::load_config
($vmid, $migratedfrom);
22 die "unable to get network config '$netid'\n"
25 my $net = PVE
::QemuServer
::parse_net
($conf->{$netid});
26 die "unable to parse network config '$netid'\n" if !$net;
28 PVE
::Network
::tap_create
($iface, $net->{bridge
});
30 PVE
::Network
::tap_rate_limit
($iface, $net->{rate
}) if $net->{rate
};
32 PVE
::Network
::tap_plug
($iface, $net->{bridge
}, $net->{tag
});