新增虚拟机日志输出和读取功能

This commit is contained in:
2023-11-07 19:07:56 +08:00
parent 0300f8e599
commit 4853cafb67
6 changed files with 220 additions and 10 deletions

View File

@@ -76,9 +76,9 @@ int qemu::SetRemoteConnectSetting(int port){
int qemu::Start(bool unShown){
qDebug() << commandOption;
if(Command().GetCommand("arch").replace("\n", "").replace(" ", "") == "x86_64"){
return system(("kvm -cpu host " + commandOption + " &").toLatin1());
return system(("kvm -cpu host " + commandOption + " > /tmp/windows-virtual-machine-installer-for-wine-runner-install.log 2>&1 &").toLatin1());
}
return system(("qemu-system-x86_64 -nic model=rtl8139 " + commandOption + " &").toLatin1());
return system(("qemu-system-x86_64 -nic model=rtl8139 " + commandOption + " > /tmp/windows-virtual-machine-installer-for-wine-runner-install.log 2>&1 &").toLatin1());
}
int qemu::Stop(){
system("killall qemu-system-x86_64 -9");