/[pxelator]/lib/PXElator/kvm.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /lib/PXElator/kvm.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 503 by dpavlin, Sun Sep 13 15:51:03 2009 UTC revision 504 by dpavlin, Fri Jul 16 21:30:30 2010 UTC
# Line 69  sub start { Line 69  sub start {
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          |;          |;

Legend:
Removed from v.503  
changed lines
  Added in v.504

  ViewVC Help
Powered by ViewVC 1.1.26