新增安装qemu/vbox功能

This commit is contained in:
2023-04-08 11:57:36 +08:00
parent 002a6e309d
commit fd78edd2f7
9 changed files with 60 additions and 5 deletions

View File

@@ -13,9 +13,13 @@ vbox::vbox(QString name, QString managerPath) {
}
int vbox::Create(QString type){
return system(("\"" + managerPath + "\" createvm --name \""
system(("\"" + managerPath + "\" createvm --name \""
+ name + "\" --ostype \"" + type +
"\" --register").toLatin1());
return system(("\"" + managerPath + "\" modifyvm \""
+ name + "\" --ostype \"" + type +
"\" ").toLatin1());
//vboxmanage modifyvm testvm --ostype
}
int vbox::CreateDisk(QString path, int size){
return system(("\"" + managerPath + "\" createvdi --filename \"" + path + "\" --size \"" + QString::number(size) + "\"").toLatin1());