mirror of
https://github.com/reactos/sysreg2.git
synced 2024-11-23 03:19:48 +00:00
Fix the unbearably slow serial port output of VirtualBox 5.2.10 by calling "VBoxManage setextradata VM_NAME VBoxInternal/Devices/serial/0/Config/YieldOnLSRRead 1".
This has to happen after the VM has been defined, so call PrepareSerialPort() after virDomainDefineXML().
This commit is contained in:
parent
ad5d3ed861
commit
a4eb4a4551
10
libvirt.cpp
10
libvirt.cpp
@ -123,15 +123,15 @@ bool LibVirt::LaunchMachine(const char* XmlFileName, const char* BootDevice)
|
||||
xmlFreeDoc(xml);
|
||||
xmlXPathFreeContext(ctxt);
|
||||
|
||||
if (!PrepareSerialPort())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
vDom = virDomainDefineXML(vConn, buffer);
|
||||
xmlFree((xmlChar*)buffer);
|
||||
if (vDom)
|
||||
{
|
||||
if (!PrepareSerialPort())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (virDomainCreate(vDom) != 0)
|
||||
{
|
||||
virDomainUndefine(vDom);
|
||||
|
@ -32,6 +32,12 @@ void VirtualBox::InitializeDisk()
|
||||
|
||||
bool VirtualBox::PrepareSerialPort()
|
||||
{
|
||||
char vboxmanage_cmdline[300];
|
||||
|
||||
/* VirtualBox 5.x serial port output is unbearably slow by default, fix that! */
|
||||
sprintf(vboxmanage_cmdline, "VBoxManage setextradata %s VBoxInternal/Devices/serial/0/Config/YieldOnLSRRead 1", AppSettings.Name);
|
||||
Execute(vboxmanage_cmdline);
|
||||
|
||||
return CreateLocalSocket();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user