mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-21 19:02:25 +00:00
ch: Do not add stub console to ch VMs
virDomainDefAddConsoleCompat in post parsing step appends a stub console of type VIR_DOMAIN_CHR_TYPE_NULL to ch VMs' Domain XML. Cloud-hypervisor's deviceValidateCallback (chValidateDomainDeviceDef) checks that the type of stub console is not of type VIR_DOMAIN_CHR_TYPE_PTY and throws an error. This commit introduces NO_STUB_CONSOLE feature check to Domain features and uses it to skip adding stub console to ch VMs. Signed-off-by: Praveen K Paladugu <prapal@linux.microsoft.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
03f76e577d
commit
092176e5ec
@ -262,6 +262,7 @@ virDomainDefParserConfig virCHDriverDomainDefParserConfig = {
|
||||
.domainPostParseBasicCallback = virCHDomainDefPostParseBasic,
|
||||
.domainPostParseCallback = virCHDomainDefPostParse,
|
||||
.deviceValidateCallback = chValidateDomainDeviceDef,
|
||||
.features = VIR_DOMAIN_DEF_FEATURE_NO_STUB_CONSOLE,
|
||||
};
|
||||
|
||||
virCHMonitor *
|
||||
|
@ -21751,9 +21751,10 @@ virDomainDefAddImplicitVideo(virDomainDef *def, virDomainXMLOption *xmlopt)
|
||||
int
|
||||
virDomainDefAddImplicitDevices(virDomainDef *def, virDomainXMLOption *xmlopt)
|
||||
{
|
||||
if (virDomainDefAddConsoleCompat(def) < 0)
|
||||
return -1;
|
||||
|
||||
if ((xmlopt->config.features & VIR_DOMAIN_DEF_FEATURE_NO_STUB_CONSOLE) == 0) {
|
||||
if (virDomainDefAddConsoleCompat(def) < 0)
|
||||
return -1;
|
||||
}
|
||||
if (virDomainDefAddImplicitControllers(def) < 0)
|
||||
return -1;
|
||||
|
||||
|
@ -3231,6 +3231,7 @@ typedef enum {
|
||||
VIR_DOMAIN_DEF_FEATURE_FW_AUTOSELECT = (1 << 7),
|
||||
VIR_DOMAIN_DEF_FEATURE_NET_MODEL_STRING = (1 << 8),
|
||||
VIR_DOMAIN_DEF_FEATURE_DISK_FD = (1 << 9),
|
||||
VIR_DOMAIN_DEF_FEATURE_NO_STUB_CONSOLE = (1 << 10),
|
||||
} virDomainDefFeatures;
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user