1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-21 14:50:08 +03:00

bug #2585: user proper vnc parameters for HVM XEN

This commit is contained in:
Javi Fontan 2014-01-10 11:51:43 +01:00
parent 1abee8aafc
commit 3338cd039c

View File

@ -45,6 +45,7 @@ int XenDriver::deployment_description(
string bootloader = "";
string hvm = "";
string boot = "";
int is_hvm = 0;
vector<string> boots;
@ -220,6 +221,7 @@ int XenDriver::deployment_description(
}
else //No kernel & no bootloader use hvm
{
is_hvm = 1;
file << "builder = \"hvm\"" << endl;
if ( !boot.empty() )
@ -476,11 +478,26 @@ int XenDriver::deployment_description(
if ( type == "vnc" || type == "VNC" )
{
file << "vfb = ['type=vnc";
if ( !is_hvm )
{
file << "vfb = ['type=vnc";
} else {
file << "vnc=1" << endl;
}
if ( !listen.empty() )
{
file << ",vnclisten=" << listen;
if ( !is_hvm )
{
file << ",";
}
file << "vnclisten=" << listen;
if ( is_hvm )
{
file << endl;
}
}
if ( !port.empty() )
@ -495,21 +512,55 @@ int XenDriver::deployment_description(
goto error_vncdisplay;
}
file << ",vncunused=0";
file << ",vncdisplay=" << display - 5900;
if ( is_hvm )
{
file << "vncunused=0" << endl;
} else {
file << ",vncunused=0,";
}
file << "vncdisplay=" << display - 5900;
if ( is_hvm )
{
file << endl;
}
}
if ( !passwd.empty() )
{
file << ",vncpasswd=" << passwd;
if ( !is_hvm )
{
file << ",";
}
file <<"vncpasswd=" << passwd;
if ( is_hvm )
{
file << endl;
}
}
if ( !keymap.empty() )
{
file << ",keymap=" << keymap ;
if ( !is_hvm )
{
file << ",";
}
file << "keymap=" << keymap ;
if ( is_hvm )
{
file << endl;
}
}
file <<"']" << endl;
if ( !is_hvm )
{
file <<"']" << endl;
}
}
else
{