69 |
system "brctl addif virtual $ifname" |
system "brctl addif virtual $ifname" |
70 |
unless `brctl show` =~ m{$ifname}; |
unless `brctl show` =~ m{$ifname}; |
71 |
|
|
72 |
my $name = client::conf( client::ip_from_mac $mac, 'hostname' ); |
my $ip = client::ip_from_mac $mac; |
73 |
|
|
74 |
|
my $name = client::conf( $ip, 'hostname' ); |
75 |
$name ||= $nr; |
$name ||= $nr; |
76 |
|
|
77 |
|
my $boot = client::conf( $ip, 'kvm.boot' ) || 'n'; # network by default |
78 |
|
|
79 |
my $kvm = qq| |
my $kvm = qq| |
80 |
kvm |
kvm |
81 |
-name "$name" |
-name "$name" |
82 |
-m $memory_size -net nic,macaddr=$mac |
-m $memory_size -net nic,macaddr=$mac |
83 |
-net tap,ifname=$ifname,script=no |
-net tap,ifname=$ifname,script=no |
84 |
-boot n |
-boot $boot |
85 |
-monitor tcp:$mon,server,nowait |
-monitor tcp:$mon,server,nowait |
86 |
-serial tcp:$ser,server,nowait |
-serial tcp:$ser,server,nowait |
87 |
|; |
|; |