Configurable SPICE settings.
This commit is contained in:
parent
08d587bdf0
commit
0a6cb82516
3 changed files with 19 additions and 5 deletions
|
|
@ -67,4 +67,8 @@
|
||||||
- "type": "ide-cd"
|
- "type": "ide-cd"
|
||||||
"bootindex": (undefined)
|
"bootindex": (undefined)
|
||||||
"file": (undefined)
|
"file": (undefined)
|
||||||
|
|
||||||
|
# "spice":
|
||||||
|
# "port": 5900
|
||||||
|
# "usbRedirects": 2
|
||||||
|
|
||||||
|
|
@ -72,6 +72,7 @@ class Configuration implements Dto {
|
||||||
public String rtcBase = "utc";
|
public String rtcBase = "utc";
|
||||||
public String rtcClock = "rt";
|
public String rtcClock = "rt";
|
||||||
public Drive[] drives;
|
public Drive[] drives;
|
||||||
|
public Spice spice;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -83,6 +84,14 @@ class Configuration implements Dto {
|
||||||
public String file;
|
public String file;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Subsection "spice".
|
||||||
|
*/
|
||||||
|
public static class Spice implements Dto {
|
||||||
|
public int port = 5900;
|
||||||
|
public int usbRedirects = 2;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check configuration.
|
* Check configuration.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -139,7 +139,8 @@
|
||||||
|
|
||||||
# SPICE (display, channels ...)
|
# SPICE (display, channels ...)
|
||||||
# https://www.linux-kvm.org/page/SPICE
|
# https://www.linux-kvm.org/page/SPICE
|
||||||
- [ "-spice", "port=5900,disable-ticketing=on,seamless-migration=on" ]
|
- [ "-spice", "port=${ vm.spice.port?c },disable-ticketing=on\
|
||||||
|
,seamless-migration=on" ]
|
||||||
- [ "-chardev", "spicevmc,id=vdagentdev,name=vdagent" ]
|
- [ "-chardev", "spicevmc,id=vdagentdev,name=vdagent" ]
|
||||||
- [ "-device", "virtserialport,name=com.redhat.spice.0,\
|
- [ "-device", "virtserialport,name=com.redhat.spice.0,\
|
||||||
chardev=vdagentdev" ]
|
chardev=vdagentdev" ]
|
||||||
|
|
@ -147,10 +148,10 @@
|
||||||
- [ "-audiodev", "driver=spice,id=audio1" ]
|
- [ "-audiodev", "driver=spice,id=audio1" ]
|
||||||
- [ "-device", "hda-duplex,audiodev=audio1" ]
|
- [ "-device", "hda-duplex,audiodev=audio1" ]
|
||||||
# * USB redirection
|
# * USB redirection
|
||||||
- [ "-chardev", "spicevmc,id=charredir0,name=usbredir" ]
|
<#list 0..<vm.spice.usbRedirects as index>
|
||||||
- [ "-device", "usb-redir,chardev=charredir0,id=redir0" ]
|
- [ "-chardev", "spicevmc,id=charredir${ index },name=usbredir" ]
|
||||||
- [ "-chardev", "spicevmc,id=charredir1,name=usbredir" ]
|
- [ "-device", "usb-redir,id=redir${ index },chardev=charredir${ index }" ]
|
||||||
- [ "-device", "usb-redir,chardev=charredir1,id=redir1" ]
|
</#list>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue