1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-26 06:50:09 +03:00

feature #2485: add extra spice options to KVM

This commit is contained in:
Javi Fontan 2014-02-10 16:56:04 +01:00
parent f9c6ac386e
commit e95fa8fb7e
2 changed files with 28 additions and 4 deletions

View File

@ -86,10 +86,11 @@ int LibVirtDriver::deployment_description_kvm(
const VectorAttribute * graphics;
string listen = "";
string port = "";
string passwd = "";
string keymap = "";
string listen = "";
string port = "";
string passwd = "";
string keymap = "";
string spice_options = "";
const VectorAttribute * input;
@ -686,6 +687,16 @@ int LibVirtDriver::deployment_description_kvm(
}
file << "/>" << endl;
if ( type == "spice" )
{
get_default("SPICE_OPTIONS", spice_options);
if ( spice_options != "" )
{
file << "\t\t" << spice_options << endl;
}
}
}
else
{

View File

@ -40,3 +40,16 @@ DISK = [ driver = "raw" , cache = "none"]
#RAW = [ type = "kvm", data = "<devices><serial type=\"pty\"><source path=\"/dev/pts/5\"/><target port=\"0\"/></serial><console type=\"pty\" tty=\"/dev/pts/5\"><source path=\"/dev/pts/5\"/><target port=\"0\"/></console></devices>" ]
HYPERV_OPTIONS="<relaxed state='on'/><vapic state='on'/><spinlocks state='on' retries='4096'/>"
SPICE_OPTIONS="
<video>
<model type='qxl' heads='1'/>
</video>
<sound model='ich6' />
<channel type='spicevmc'>
<target type='virtio' name='com.redhat.spice.0'/>
</channel>
<redirdev bus='usb' type='spicevmc'/>
<redirdev bus='usb' type='spicevmc'/>
<redirdev bus='usb' type='spicevmc'/>"