修复QEMU安装XP无网络的问题

This commit is contained in:
2023-04-29 08:57:35 +08:00
parent 0d3e798644
commit 5443654791
4 changed files with 7 additions and 7 deletions

View File

@@ -21,7 +21,7 @@ except:
print("无法读取配置")
traceback.print_exc()
sys.exit(1)
option = f"--hda \"$HOME/Qemu/Windows/Windows.qcow2\" -usb -m {setting['Memory']}M -smp {setting['CPU']} "
option = f"-nic model=rtl8139 --hda \"$HOME/Qemu/Windows/Windows.qcow2\" -usb -m {setting['Memory']}M -smp {setting['CPU']} "
if setting["EnableKVM"]:
command = "kvm"
if setting["EnableRDP"]:
@@ -30,4 +30,4 @@ if setting["EnableVNC"]:
option += f"-display gtk -display vnc=:{setting['VNC']} "
if setting["EnableSound"]:
option += "-soundhw all "
os.system(f"{command} {option}")
os.system(f"{command} {option}")