/[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 54 by dpavlin, Thu Jul 30 12:28:49 2009 UTC revision 62 by dpavlin, Thu Jul 30 16:15:40 2009 UTC
# Line 34  if ( grep /tap0/, read_file '/proc/net/d Line 34  if ( grep /tap0/, read_file '/proc/net/d
34  }  }
35    
36  our $memory_size = 512;  our $memory_size = 512;
37  our $mac = '52:54:00:00:00:01';  our $mac = 'AC:DE:48:00:00:01'; # AC = private, AD = multicast, AE = local
38    
39  sub start {  sub start {
40    
# Line 42  sub start { Line 42  sub start {
42                  vdeq kvm -m $memory_size -net nic,vlan=1,macaddr=$mac                  vdeq kvm -m $memory_size -net nic,vlan=1,macaddr=$mac
43                  -net vde,vlan=1,sock=/var/run/vde2/tap0.ctl                  -net vde,vlan=1,sock=/var/run/vde2/tap0.ctl
44                  -boot n                  -boot n
45                    -monitor stdio
46          |;          |;
47    
48    
49            $kvm = "xterm -e $kvm" if $ENV{DISPLAY};
50    
51          $kvm =~ s{\s+}{ }gs;          $kvm =~ s{\s+}{ }gs;
52          warn $kvm;          warn $kvm;
53          system $kvm;          exec $kvm;
54    
55  }  }
56    

Legend:
Removed from v.54  
changed lines
  Added in v.62

  ViewVC Help
Powered by ViewVC 1.1.26