mirror of
https://github.com/OpenNebula/one.git
synced 2025-01-10 01:17:40 +03:00
Merge branch 'one-2.0' of dsa-research.org:one into one-2.0
This commit is contained in:
commit
dfb9114cf6
@ -48,7 +48,7 @@ DB = [ backend = "sqlite" ]
|
||||
# passwd = "oneadmin",
|
||||
# db_name = "opennebula" ]
|
||||
|
||||
VNC_BASE_PORT = 5000
|
||||
VNC_BASE_PORT = 5900
|
||||
|
||||
DEBUG_LEVEL=3
|
||||
|
||||
|
@ -44,6 +44,10 @@ class CloudServer
|
||||
|
||||
@config = Configuration.new(config_file)
|
||||
|
||||
if @config[:vm_type] == nil
|
||||
raise "No VM_TYPE defined."
|
||||
end
|
||||
|
||||
@instance_types = Hash.new
|
||||
|
||||
if @config[:vm_type].kind_of?(Array)
|
||||
@ -56,8 +60,9 @@ class CloudServer
|
||||
|
||||
# --- Start an OpenNebula Session ---
|
||||
|
||||
@one_client = Client.new()
|
||||
@one_client = Client.new(nil,@config[:one_xmlrpc])
|
||||
@user_pool = UserPool.new(@one_client)
|
||||
|
||||
@img_repo = OpenNebula::ImageRepository.new
|
||||
end
|
||||
|
||||
|
@ -367,7 +367,17 @@ int XenDriver::deployment_description(
|
||||
|
||||
if ( !port.empty() )
|
||||
{
|
||||
file << ",vncdisplay=" << port;
|
||||
istringstream iss(port);
|
||||
int display;
|
||||
|
||||
iss >> display;
|
||||
|
||||
if ( iss.fail() || display < 5900 )
|
||||
{
|
||||
goto error_vncdisplay;
|
||||
}
|
||||
|
||||
file << ",vncdisplay=" << display - 5900;
|
||||
}
|
||||
|
||||
if ( !passwd.empty() )
|
||||
@ -441,4 +451,11 @@ error_disk:
|
||||
vm->log("VMM", Log::ERROR, "Wrong target value in DISK.");
|
||||
file.close();
|
||||
return -1;
|
||||
|
||||
error_vncdisplay:
|
||||
vm->log("VMM", Log::ERROR,
|
||||
"Could not generate a valid xen vncdisplay number, "
|
||||
"vnc port number must be equal or above 5900.");
|
||||
file.close();
|
||||
return -1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user