Changeset 1072 in ProjectBuilder


Ignore:
Timestamp:
Jul 13, 2010, 12:03:38 AM (14 years ago)
Author:
Bruno Cornec
Message:

r3953@sge91-1-82-234-15-218: bruno | 2010-07-11 23:43:35 +0200

  • Fix partly #41 by externalizing the VM command in the new vmcmd option
Location:
devel
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • devel/pb-modules/etc/pb.conf.pod

    r1066 r1072  
    420420 Example: vertype default = chroot
    421421
     422=item B<vmcmd>
     423
     424 Nature: Mandatory
     425 Key: OS (could be from the most generic up to the most specific from ostype, osfamily, os, os-ver, os-ver-arch). NB: a default value is highly interesting here.
     426 Value: Command to call to launch the VM emulator.  It can contain some options. Another way to pass options to the VM manager command launcher is by using the PBVMOPT environment variable, which comes in addition to the option vmopt.
     427 Conffile: vm
     428 Example: vmcmd default = /usr/bin/kvm
     429
     430
    422431=item B<vmhost>
    423432
  • devel/pb/bin/pb

    r1070 r1072  
    481481    pb_log(0, "and that it allows remote root login (PermitRootLogin yes in /etc/ssh/sshd_config)\n");
    482482    pb_log(0, "Also ensure that network is up, firewalling correctly configured, and perl and scp/ssh installed\n");
     483    pb_log(0, "You should then be able to login with ssh -p VMPORT root\@localhost (if VM started with pb)\n");
    483484} elsif ($action =~ /^setupve$/) {
    484485    pb_setup2v("ve");
     
    16131614
    16141615        # TODO: vmmonport should be optional
    1615         my ($ptr,$vmpath,$vmport,$vmsize,$vmmonport) = pb_conf_get("vmtype","vmpath","vmport","vmsize","vmmonport");
     1616        my ($ptr,$ptr2,$vmpath,$vmport,$vmsize,$vmmonport) = pb_conf_get("vmtype","vmcmd","vmpath","vmport","vmsize","vmmonport");
    16161617        my ($vmopt,$vmtmout,$vmsnap) = pb_conf_get_if("vmopt","vmtmout","vmsnap");
    16171618
    16181619        my $vmtype = $ptr->{$ENV{'PBPROJ'}};
     1620        my $vmcmd = $ptr2->{$ENV{'PBPROJ'}};
    16191621        if (not defined $ENV{'PBVMOPT'}) {
    16201622            $ENV{'PBVMOPT'} = "";
     
    16591661   
    16601662        my $cmd;
    1661         my $vmcmd;      # has to be used for pb_check_ps
    16621663        my $vmm;        # has to be used for pb_check_ps
    16631664        if (($vmtype eq "qemu") || ($vmtype eq "kvm")) {
    1664             my $qemucmd32;
    1665             my $qemucmd64;
    1666             if ($arch eq "x86_64") {
    1667                 $qemucmd32 = "/usr/bin/qemu-system-i386";
    1668                 $qemucmd64 = "/usr/bin/qemu";
    1669             } else {
    1670                 $qemucmd32 = "/usr/bin/qemu";
    1671                 $qemucmd64 = "/usr/bin/qemu-system-x86_64";
    1672             }
    1673             if ($v =~ /x86_64/) {
    1674                     $vmcmd = "$qemucmd64";
    1675                 } else {
    1676                     $vmcmd = "$qemucmd32";
    1677                 }
    1678             if ($vmtype eq "kvm") {
    1679                 $vmcmd = "/usr/bin/kvm";
    1680                 }
    16811665            $vmm = "$vmpath->{$ENV{'PBPROJ'}}/$v.qemu";
    16821666            if (($create != 0) || (defined $iso)) {
Note: See TracChangeset for help on using the changeset viewer.