console.patch

Ricardo Duarte, 04/07/2013 01:26 PM

Download (1.57 KB)

View differences:

opennebula-3.9.80/src/vmm/LibVirtDriverKVM.cc 2013-04-07 14:22:57.667076525 +0100
29 29
        const string&           file_name) const
30 30
{
31 31
    ofstream                    file;
32
    ofstream                   console_file;
32 33

  
33 34
    int                         num;
34 35
    vector<const Attribute *>   attrs;
......
95 96
    int pae_found  = -1;
96 97
    int acpi_found = -1;
97 98

  
99
    string console_path  = "";
100

  
98 101
    const VectorAttribute * raw;
99 102
    string default_raw;
100 103
    string data;
......
650 653
        }
651 654
    }
652 655

  
656
    // ------------------------------------------------------------------------
657
    // Console
658
    // ------------------------------------------------------------------------
659

  
660
    console_path = vm->get_remote_system_dir() + "/console.log";
661
    console_file.open(console_path.c_str() , ios::out);
662

  
663
    if (console_file.fail() != true)
664
    {
665
        file << "\t\t<console type='file'>" << endl;
666
        file << "\t\t\t<source path='" <<  vm->get_remote_system_dir() << "/console.log" << "'/>" << endl;
667
        file << "\t\t\t<target type='serial' port='0'/>" << endl;
668
        file << "\t\t</console>" << endl;
669
        console_file << "Console output for instance " << vm->get_oid() << endl;
670
    }
671

  
672
    console_file.close();
673

  
653 674
    attrs.clear();
654 675

  
655 676
    file << "\t</devices>" << endl;