pax_global_header00006660000000000000000000000064147345102760014523gustar00rootroot0000000000000052 comment=2a9d45530799837fd40495b0e720cf1ea01e4de7 quickemu-4.9.7/000077500000000000000000000000001473451027600133675ustar00rootroot00000000000000quickemu-4.9.7/.editorconfig000066400000000000000000000005211473451027600160420ustar00rootroot00000000000000root = true [quickemu] charset = utf-8 end_of_line = lf insert_final_newline = true indent_style = space indent_size = 2 trim_trailing_whitespace = true [quickget] charset = utf-8 end_of_line = lf insert_final_newline = true indent_style = space indent_size = 4 trim_trailing_whitespace = true [*.md] trim_trailing_whitespace = false quickemu-4.9.7/.envrc000066400000000000000000000000111473451027600144750ustar00rootroot00000000000000use flakequickemu-4.9.7/.github/000077500000000000000000000000001473451027600147275ustar00rootroot00000000000000quickemu-4.9.7/.github/FUNDING.yml000066400000000000000000000001351473451027600165430ustar00rootroot00000000000000# These are supported funding model platforms github: [flexiondotorg, philclifford, lj3954] quickemu-4.9.7/.github/ISSUE_TEMPLATE/000077500000000000000000000000001473451027600171125ustar00rootroot00000000000000quickemu-4.9.7/.github/ISSUE_TEMPLATE/bug_report.md000066400000000000000000000021741473451027600216100ustar00rootroot00000000000000--- name: Bug report about: Create a report to help us improve title: 'bug: description of the bug you encountered' labels: '' assignees: '' --- **I confirm this bug has not already been reported** - [ ] I have searched the issues and this bug has not been reported previously **Describe the bug** A clear and concise description of what the bug is. **To Reproduce** Steps to reproduce the behaviour: 1. Run `quickemu` with arguments '...' 2. See error **Expected behaviour** A clear and concise description of what you expected to happen. **Quickemu output** Run `quickemu` or `quickemu` and include the output of the failure below:
Quickemu output ```text quickemu/quickget output here ```
**System information** Run `quickreport` and include the output here; if you can't run `quickreport`, please provide the output of the following:
Quickreport output ```text quickreport output here ```
**Screenshots** If applicable, add screenshots to help explain your problem. **Additional context** Add any other context about the problem here. quickemu-4.9.7/.github/ISSUE_TEMPLATE/feature_request.md000066400000000000000000000014221473451027600226360ustar00rootroot00000000000000--- name: Feature request about: Suggest an idea for this project title: 'feat: describe the feature you are requesting' labels: '' assignees: '' --- **I confirm this feature has not been previously requested** - [ ] I have searched the issues and this feature has not previously been requested **Is your feature request related to a problem? Please describe.** A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] **Describe the solution you'd like** A clear and concise description of what you want to happen. **Describe alternatives you've considered** A clear and concise description of any alternative solutions or features you've considered. **Additional context** Add any other context or screenshots about the feature request here. quickemu-4.9.7/.github/Logo.bmp000066400000000000000000002074141473451027600163370ustar00rootroot00000000000000BM 6(        ' 6 +8$'5 68(%"#/'#"'-.'''2,)62-'*5866+23GSZT"[(Q(g&t,{2d6i4C<6O3(j>!F IH#V&X$#H)#V+(X2/O5g))g5,n7!DzE IC<QH=mA$rG+vM1{T9fF6D&K(5H79E+8X2 HR\WUQXQ`Q\ 437!058~6~1~;1~;<6504   ->->O8RY\`_ WUTQXTQT64!0208;~116191;:0553  >- 8-H8\TW_WUTUTXQ`T\R 23557~<;~S0391<<582    >?Y-> -YR\UWUTQTQTQTQT\66391~1~S1~;~1<51   -Z>?-Y>Y H\T`WW_WUTQTQTQTQTQG255~191;:933<~0<5.    Z- 8 H\`_a_WTUTQTQTR 3 8!~6;~;~;85.        ZOZYZ-> - ! Q\a_UTQTQTQUQ22~<;~S;:3~;1;055-         .Z?OZ->  ! RQXa_UTQTQXQUR2 590;331;:;65  ,         -Z?Z-?- >!HGXa_UTQXTQMTQUQ\ 26~:6;;~93;:3058  +           -[Z>->->- !RXUa_WXTXQJXQTQT`QH25!6~S~~;:6;019:658*            -?Z>->- !!G7GQ_WUQXTJXMQ`TQ202S93631:;1;;68)         -]Z[ZY> - ! GQ_WUXQXTQTQTQ55 19~c;<~;136:5(   8][]Z>-!GRa_aWXTXMJTQTUI3226<;1;S:16;<;258&     -][^[Y?>-8>  !HX_WUXJTQTQ`TQ252;9:;~7<;S66< &   -][Y?>->- !!X_WXWXJTXQU`QG52S;1S0;<3::8< %  "  -[^[?Y-Y>->.>!R_WUXWTXQTQ`TUR!231:9;:609;:<9:S<6;0$  " " " "   -[][Z?Z->-> - RWXQMXQTQT`UQ6 4013;9:<;162;;< # " " " " " Z^[][Z>-> >> XXUPTQTQU`QG141;3;<;6306:;03:88" " " " " "'" ?^[Z>-> >GRWTXTMTMTUQTQ  049104;~06:;<;61;;68<! " " " " " " " Z^[][][Z>->->-> IQWUT`T`J`U394940:;:;;116c515   " " " " " " " "  ?c][ZO? -- !!IQW`TXTXQT`UG494 ;3;:30~;:;:0:SS28<    " " " ' " "' " " "?[?- --   !IXWXWXUXTQUR14943110;3:71;:773:0 " "'" "">[?>8->- >-> !RU_WUXUXUQTUTQ09394:;02716;0S4:S7;5S25  " " " " "' ' " " " >?>->Z>?Y- ! IWXUXTUT`TG1941;03:23~923;<270 " " ' $ "$ $" "'>Z?Z?Z?Z[Z?>Y> >  FI_TWXUTVTQ;~;934930864;9696;~;4;36855! "$ $"$ $" $"$ >?[\[][ZYZ>-     IWXWXTUVT81200149494922S0;;96:~30;S8:6"'" $"'" $"'"$"$  >?Z[][Z>-     `WXTU`QR49414;;9301 ;0146;3~:628S752 "$"$"'"'"$"$"$" ">?Z[^[Z>      !aXWXT`UR20072;;3;~59~10202527  "#"'"'$"$"$"$"'"$'"$"$"$ "'8?Z[][Z\>    GaWXWTUQ;16130:;:03;S6267852 "$"'"$"$"$'"$"'"$'"'"$"$"$">?^[^[?>!  aWVTUG7S:::;;<3;60:6;:7:0;;"#"$"$"$"$"$"$"$"$"$"$"$"%">?[Z---   GVUWVUTQU`T 6;;:6;::<20;97 "#"$"$"'"$"$"'$"$"$"$#"$">?][\- >?-  RWVWUTXTU!  291;S568:S6;0:403;3<0;7"#$" $"$"$"$#$""%-c?[^[8 -?>O-.-    GWVXUTU`R \S96<;80<60:SS62;068 "#$"$"$"$"$"$' $&]?[?->Y>-.>       RWUXUVTVT`Q c:434:S;37;6;731;163>::86 "$"$" "#$&"%"?[?>>?>-        RUWXVTVT`U`28c5:2:434S3;6<603;<16607609: "#$" " "'%"?[8>Z?>8-.   RWVTVT`VURc3S29:9S9;::3:66704;8<06136<"&$#$"'""%>Z!>[?Z?>-   _WUVXTVTUT  !S132S;9;6<677623<6;;;<2;:<:; " '$($($%%%%"> 8[?>->-.-      GWUTXTUV`S  873S9S69S072057:06:;0<6:~" $)$)$)$)$)$($($($($("%'%%"'Z8[?>.- -     QVTUWUTWTVUI 3S 25:S90:3;S;:626:630630;;:61~0  "$)$)$+$)$)$)$($($($"'%%%%">[>[]cZ?8>.-5     RU_WXT`T`U 0  2;639S907:7502;<:96<;<3~;"$)$)$)$+$)$ ('"%'''%"?[Z[?>->.8.-    !R`WXTUV`!RS4  89;7 34799063S7S;7775:;67030<1;S:; "'($)$)$)+)$)$($)$($"%%'%'%.[8[?[?>--!    !IWVTVTWTX;9   <!60923;34~:6~S3621205;36c8:0:S2S"$()$)$)$+e$($)$)()$ ($"%%%&%] ?^][?>?>> -      `WVTVU`US  222076S32:17;c026::S<17<6098SS "$($()$)$($d$d)$($)$)$+($"&%'%%%D8?[>.      !H`WVT`WTU   530S06614~62056030;07736;S"($)$)$)$)$)$)$e$)()()()()$"&%&%%%?>?C][?>-      !!GaWVUTV`WT 8c;60!32:01;30722:67S63:0603;S "$)()$e$)$d$)()$d$)d$)$d$e()+),%%%%'%%%#%??[?][?>-.-->      !H_VTWTW1602602S316S65S1768:60817;;;"()$e$d$d$d()$e()$d$e)$d()(,"%%%%"?8?[]Z>.-.-->8>       R\WV`UVWQ110:2100;4:0S700;S106:;0<70<;7<:5 "$)()d$($d)()()e$e)$d()(d)()&%"%&%"%"%".>?^[^Z>->.-.--      GRW_`V`VUQ7202360<0:~1;2<SS::9S25:078<2763::;6"$)()$)d()$ede$)()d(d()%"%&%%"%"%?^][?>.>- ->-      8c_UT`UR;056;963659S1S70:79341120255226;:7S;:1"$(d)(de$)(d$d)(d()d),"%"%%&%"%?Z^[][ZD?>..-> !      !Ha_`V`VU90;3093S9;6S:768725:67;760:2<SS"$(d$)e)d)d()ed)d)d)d)*)(%" %& %D]c[Z?>->-  !  O  Ybc_`V`VURS7:7!019305536S7;0S;:9S5828<28:<06:c "%$d$)(d(d)d)e$d(de()d)(%&%"%"%.^][?>-Z-      !   Y8RUWV`U:9:349;:<06S;S9S;;:;c2577:0<;;7;1:S "%"$)d)d)d)d)d)d)d)d)d)d)d*%'^][Z?>?-[YO    !       ! Rb`VWVTU27:9;6519:6:SS6123SS102767<056;;R #%d(d(d(d(d(d)d)d)d)d)d(%][][Z?>?>-?ZY    !  !!   H`_WTUTaS20<;<0<6;73620S902050785:c52:S #)d(d(d(d)d)d)d)d)e)(%#]^[Z?>-. >ZY-  ! !  ! H`VU_US2;<;;;367;S17:S734S1272570:75:673:78 #*de) de)d%'/^][Z?>- -?YZ- 8    ! ! GbWVWT702;1660;S1372:7911:52<0055:SS #(d(d( d)d)d)%.^][Z?>->Z>   !  Y   GJ_V`U\!3;;806066S1S71S375760:56;:S08 "#)*d(d(d(d)d)d)d%'^][][?> >Z>-      Hb_`V`J8 c 8567;~17SS0S226<07<0655S3!5 %#%d(d)d)ded)d)%][Z?>Z[>       `aW_V`G    !0:1;S67621S2<5S60;SS5  #)d)d%][Z>?[Y   !  -   !FH_`M  5RSSS7;2S27307:2;80;S2 "#*d)d) d)%/^][Z>Z >   !  8   `_`J     623296050666;: ! #$*ded%^[Z>Y  - O     !GaW`J      7cS5!608S2:S27SR  #)d*d*d,%^[][Z>[>Y 8-> -      a_`G       688 "%#&d(%^[ZYZ>- [Y  8! !      R`K         #(d*fd*)%D^[Z >8  ZO          a_`H       %#(ded$(* d)%&^][Z]8! > >Y        a_WK          "#%dedfdf d$%dfde*&%[][Z-> Y!  Y        J_`H         "#%dfdfdfdfde($#*edfdfdfd%.^[Z> -> >Y  8       GU_`H         %(fdfdfdfdfdfded)$#%*dfdf(%][Y ->  Z>!        Ma_`I          #%dfdfdfdfdfdfdfd&%&fedfdfd&%D[>>-YZ            GH_`H      "#$dfdfdfdfdfdfdfdf*&%dfdfdfdfdfd%#^Z   -  Y Y !          `_`G       #(dfdfdfdfdfdfdfdf %dfdfdfd&%'^? > 8YZ!   8        ``K             #*fdfdfdfdfdfdfdfdf(%,dfdfdfdf)%D^8 ?> Y>Y   !     Jaa`      #*fdfdfdfdfdf*,)( %&*dfd*%^-Y> .OY    >! !       aa_W`        "#dfdfdfdf,(%,fdf%&]>>8Z?-Z>  Y-!         H\a_`Q         #(dfefefd(%,dfd%&'[8?Z?- .-[-ZY  !        HOJQ_`G      #%)dfdfdfd*$%(%&%&'&'D[>?Z>Y  YO-           OHGa_`\      #%dgdfdf*0%&%&%'&',D[?>Z-  >-          O `_V`F         #dgdgf,/%&%&,',&'+D[?>->Z!- !        OH GU_`          "%#df*2%&,'&+&,+]>-.  >8        HO  _V`U`H          "#%dgdf-%&%&+&+&'+@Z88 >   -  !      HO __V`        #(f(/%&'&+&+&+&+/Z-  YY              OH  Q_VN`G      %#,fhfhfhf+%&%&',&+&+,+&+/O  Y-          HO   HbVT`M       #%*fhfg*#,%&'&+&+'+/+/Z?->Y   8         OH  R_TMT`K      %#*hfhf)#(% &+&+& +/D?8>  >  O       O   G`VTMVJ     #fgf(*%&,&',&+&+, +/+/B[8  > O      -O a _MVM  "#%fgfgfh,&%%&%&'&,'+&+&+/+/+/B?>- > 8      OH    H_`M`    "%fgfgfhf&%&%&,',&+'+/+/A/@A?>  8           HO    G `TMI   "%(hfgdgfhf"%&%&'&','+,+/+/A/A/A@A?>- - H!      O    _VMT`   #%(hfgdgdf&%&%&'&,&'&+,',+, +/@/B/A/AB]ZY-   O      OH !VMTMF   #%)hgfgdgh!%'%&'&,'+&+'+/@/@/B/A/BA]Z.  !-!      OH !_MTV`      #,hdgdgf %&',+, +@+/@A/B/B/BAB]O-   !O        HO   !GTN`F   #*hgdgf%& %&+&+,'+'+@+@/@A@/BABABo]-     !H       HO  !G!`VTM $dgfgfgdgd*%&',+&+'+',+/+@+/@A@AB/B/ B]- !         O  `NMP    $dfgfgh%&'%&+&,+/+@/@A@A/B/BCos]-!   -        O.O GHGG_`TH#*gfgdgf*%&%&,&+& +/@A@A/BCBC]o]o][O        O \_NT`T     #fgfgdgfgf(%&%&'+& +@/@ABABCBC]oC]oso|ZOY           O  O a`MT`K  %#fhgfgdghgf %$ %&',&',&,+'+@+@+/@AoBCBCoCoso]s]v[>       O H!b_VTM  %#fgfghgh%&%&,'&+' +@+@+/@ABC]oBo]oC]o]o]os]os|bY-        HOH O`MTVPK' #%fhfgfghghg%&,&'&','&+@+@+@AB/oBC]CBCo]so suts}^ !    OH OPPVTMTH  .# #%fgfgf%&'&'&@, +@A@ABCBs]oBosoCsususuz^Z       ! O HGKH`V`VN`MJ)h$#  #hghghghgh&%&%&,&+&,'+@/A/BABABCo]o]s]sususuzzt.  HO    R`_`TVMG ,gh#%#%f gf&%&%&,'&+@+@BABC]sosostus uz}C.-H- O  H!8! _NVN`VNV`MK',gf%# %#f gh%&%&%'&',+&+@+@+@/A/BABCBCoso suvwtzzO.  H H HRV`NPV`VPM '%&=gh#%#f g(%&+,'+@+@A@/BCs]os]osuvuvutwz|O  H  K  H_VN_N`N`TM +=fgf#%  %fig=%&%&,',+&+@+@+@AB/BCo]o]os]su]utvtuvw}D ! H H O HKOHb V`VMLKNTWTK  ]j gf% %fgigig%&'&+&+'+@+@+@ABCBCo]sosusuvuvutwvwz}] H  H HOHV`N`MKIMI .'higigkgigjg=%# "%figigih%,=fh=,%&+&+&+&'+@+@+@A@ABCBCBCso]s uvtzz}{xwy{ZO H  OHOH_`VN`NMIKIF"%)fgigkgif#%#=igigif%hgigig=%'&+&+&+@+@ABCso]tsusuvx ^O- OH HHOc_N`TLIK',=hgigigigigf#%  "%fgigigf%gigigigkg,&+'+&+&+@+@ABABCo]o]stusuvuv}]H HHYHK`TV`N`V`LIK&gigigigigigigigigf# %#=igigig%gigigigjf&+,+@+@ABCo]s^suvuvuvw}O  HOP\ VMTLIKG .&=*=*gigigigigigig=#%#,gigi,%gigij&+&+&+@/@ABCBCo]ososuvuvwvwu O\V__VTVTMIKG .(&%digigigigi,##,igigi&%,kigijlj+&+@+@+/@ABCBCo]osusvuvuvwz}H H\O NVT`NTPMPMIKIK! '+.(&%&%&h igi,%##& i=&gkgigjljlre&+&+/+@ABABCBCoC]o]su^tuvw|wxz ^ HO\NV`N`_NVMJKGIKG'+'+'+=hoh=figi&%""% ikgiljgljlf+&+/+/+@/@ABC]Cososusuvuvwx|x{]Y\VNMV`NM`VMLIKIKI  ./+&=jljkjkji%#""#%g ikililjgplj&+&+/@ABABCBCo]suvuvwv|w|wx|x|{xzx \VN_VNMLJIKFKIKI./+hlpljljk iki#%"#%gikikikikilpl+/@ABCo]suvuvw|x|x|{ ^\_NV`VMNMNMIKI ./+jprlplkjilikig%#%hkikikikikilrlh+)+/+/@ABCBCsCso]stuvuv|wvw|x|x{}{WV_VT`_NMIKIK .]/+)oprplpljljljikikikikikih#% %=ikikikiklilpjplp+/+/]/ABABCBC]Csu]uvuvuvwvx|x{x{}VNVN`NMN`MJIKI  /eplplplkikikih# %#=kikikiklkltlrph+/oABCsCsusuv|wvw|x|x|{|{x{VN`MVM`NMIHK  .]/Bo/rqplrplplki ki*#%,klplplp/+/C/ABCstsusuvw|xwx{|{{{_NMTN`M`PMJLJH./]BsC/tqplplk,%#"#%klplplpj+/o/e]ABCBCs]s^uvuv|w|x {{PVTXLMJI\sCBAeDeD/eqplplpl k%""#iklkml po/B/BABCuCusutuvuvxvx{x| {_VMLILPJyoBABA@/gqplplkl ki#"#i klklplpqp/o/BCsusuvwxw|x|{|x{{}VLFLFKLJLPLJOzroBAoeBojzqrpmpmlplkmkg#%#%=kmkmklmlmlplpqp/o]o/BCr]CuCsusuvwvw|wx|x{x{{}{WVNMKFEKLIJMJPKuqrtqzqzqpmplmlmlkmkmk=##%=kmkmklmplpmpqp/B/BCoso]susuv|vwx{|{|{{  _VMLEKIKIMJPJ]qqqpqnpmpmlmkmkf%"#&kmkmkmklmlmlmpqqp/B/BCBC]stsuvuv|x|x|{NPMLNKNLIJLJPJPzzqqpmpmpmkmkmkmkmk(#""#kmkmklmpmpnqqqeBeDBC]osuvuvuvwxw|x {_`NMKLKLKIJPJzqqqpnpmkmkmkmkmk%#" %#imkmkmpnpqqqzoBCBCursuvuvwvwx|x{{NP`PLKLJIJMJz qpnmkmkmkmg#%  %#=kmkmkmpnppqqqpBtvusuvuvwv|wx|x|{ _`NVLKIJwqqqpnpnmkmkmk=#% #,mkmkmnpqpqqztoCrvuv|vwx|x{_VTMIKIJu}qqqnpnmpmkmkmk,#"#%kmkmnmnpnpqqzv|wx{{ _VLXVMJKIJ]qqnpnmpmnkmk#%" %imnmnpnqpwvwvw{{{_VNTMJKJPqqqnqn mi# %fmnmnpqwv|w{ NVTNTVMJqqnnmmkmkmf# #(mnmnmpnpppxvwx{NF_VXMT`MTvqqpmkmkkm&%"#imnpnnpwx|x{FENWMXVTMN]nnnkmki%%hmnmnmnnx|xNFEF_VTVWVTMJM\qqnnmmkmg%%#=mnx{x{}NFENW_WVTMXMLIMTppnmnm,%# "%"kmnnnx{NNKFEFE`_WV`VXJIJMQTxnmk#"  #hnmn}{NFNFKFEFKVWVWJILM`\|nnmg% %,nnnnLFNLFKLKLFKFEEILILIKIM]yutznn,#% "%#k   LKLKNKLKNKFKFEEEEKIJ\uouCnk%#"  "#gnXIKIKLILKLKFLKLFKFEFKIHJQ^u]sr h%# #%, IKFLIKLKLFNLNLIKIJus,%# "%lKFLILIKLKNKLNVVXNLJLILIJxusk%"  %=  EFKLFLNVVXLXJXQJLJXIRxy]y=#% %& IEFKLNVXNXJLJLJR&%" %jFEFKLFLVNXLXLJMQLJXxj#% "%,  FEFLNVXLQMJMJMJX ,#% "#%  EEFLXVXLMXMXLMIJXJ|#"  #= FEFEFLNVWVNXLJLQXJMXJQ\vut=%# "#%xvwv NEXNEFNVVVTXLXLJLXJsustsz&#"%=vNEFNFEFLNXVNVXTNLILXJLJXJ]us=&# #%vw NLNLEFKNVXLILIXJLQLXJXJu]u%# %ivwvVNLKEFLNVNXLJILMJLXMQJK^ustuoz=% %&uvwvwv|VNLFEFIKLNXLXLILXLXJXJMJFOvus]y&%%&=]uvwxNLIKEEFKIKLIXLILXLJXMXLJLJXIEPstuo=&"%uvuvwNLNLFEEKFILKILMLMLXIXJXJNKEKuso%#% #jwx NLKEFKILILMTXJXJILMJEKusus]h%##%x|wNLNKEEEFLFLMTMRXLIJXJIJMKEFuso%#% %= NLKFEFEFKFLJLMXIXIJMKF]usus]^=%#"%" NLKFEFKGFGKGIKIJXIKIJKEF]vu]% %=  NFKF! GIXJKEFPtu=% %#mW_WSWWVLIF GRQTU`U`U`Q\IJIJKFEKuvyj"%&ptzqzz  bUXINLK GKGJQTRTXQRJIUbKIJQKFE]uy&%%=CuCuCutr^ bXNLF KGKHKFKJMPMJIR`aJKIHFKF[us=#%o]rCu]yuy   `XTLK KKJMP`NTJIRGXb IKIJFKFE\u^%# %,C]Cu]ru^w  `FXK KKKOP`_PIGIRaRIKIJKJbvuys&%# %#jsCuCusuyu abUMLE FGFKHP`_`PMJIGIKH\J\wu^suj"%""#%Couousu   \T KPa_PLPJIKIKIRIGGZ|vu%"%,C]t]uv RHTIGKGOKPa_`POJGIGKIR!GR ^vu,#%"j]uou]uvu 7U!GHK.PPJHKFKIRYR\ Z^|vuyh%""%CustuvyQFaGHO^bP|P\OHFEFGIX^R\^|Zvuy %" #%ouo]uvw{PKIOK . D]b|]POFEIJX^^[Zvy^uy^%# #%=r]outuvwx}^bIFIXK K.H. 'OubPOHEILXQb  ac^Z^r=%# #js]ousuvwx[^_`H! HOH"O]OKOTLQb^[\^ ru j%"#%posuyvwvwx{ ZbP`H]   GKHO ".O KKPXQJIbR \^8 u$#"%sostutwx{}{^]PH- ! GHGH.OITQXJIR  ^\ Zu,%#  &%,tsouyvwx{^>P\Gab`b`H! K! EEP`UQJRQc  \H  !='%"%&=rostutuytwx{}{bRb`aH G`b`P_` H .OP^`UQRG RH ='&"%&=ysutyuwx{x{}{b^``Q`\a`bTG\a_`GGO\OPO    KGJI  A' #%(j]utywxzx{}{b^babbbb\G`aXGK     FGIRGI  j%(& ! %(rtouyuwtwxwx{x{}{}} |a8!GJUaUTRG   GIGIR  ^uvr&% " %(pstutuywtzxz{}{}{} _`RH  FGIRIRGIG  ]yv%(% #(%&Boutuyuwywx{}_RG  FGIG    ^yuyr%&% #$"%(&Bstwtwx}x}x}a`JGEFKIRIG  ^ytuyuoB(%"$%"(&(Bruvutywzwxzx}} a_a_a_MLJIXIGRIXRXIG   [vututB(%("%&"(Ctyvtywzwx}{}{}} _`_`T__VUTXIRXIXIRIRI  DtyvtC(%"&'"%(&Ctuywywx}x}_WUXRIXIXGK   ]uytC($("'("(%(otytywzwzx}}WXIXIRJIG  yuyB(%("()"(Btwywzwzx}}__WVXIXIJIK  -ytyB(%")*"($oywtzwz}x}} VWVWXIXIJIF  ByA("*+"()/ywzywzxz}}VWVXQRIRIG ]yA("+,(/yzwzw}w}}}} WVXVUXUXRIRIG  ]/%(,- (*ywzwz}}}}WVXRXIXIXIG  /( -.&(,twzwzwzw}}}}}VTVWXIXRIG   ( ./ %(owz}z}}}VXVTXJRIRIG    (/0%(oxz }}}aVTVTXTXRXRIRK #02"()yxz}}}b_WWXTXQRXIG 23 ()()tz}}}}baWVWVTXRXQXIR  24 $(exz}} b_WVXLJXRIRG 26")(*yz}}}aWVUQXIXIRXGF !37 ()(oz}}aQRWXUXQXIXJRJIRIG  48%()*tz}}}}}}\RWUWVXJRJIRIG   4:"(,(o}}}bQRWXQJIRIRIG 5; %()dt}}a!aWUXJRIRIG  6=()dz}}\FWUXIXIGF  7>#)()ez}}}Q_WXIRG !7@ $)(do}}}}|R!H_WXIGRKGKF !7B ()o}}bR\_UXRKGF   !6C"(*)*o}}v`SUTXJRGF  6E",)o}  YGWXQIRG     7G#)*de} G!_XGFGF     !9I #()dfw   GJWUIG      9K"()*)*tz^EK`WULG        :M"()*)ez}{HQ`aaWXIE        ;P$)*)d)fx}OGRQRJG       ;R"(d)*)*oz}^          >U $()*detz} {O         ?X #(*)d)dtz v         !?[ "$d(d)detz}  }{/ R!G        ! ?^"%)*doyz} ztod*+HG!H        Ab"#(*d*)d*detz}}}}ztod*d*    Cg "$()d* d*d)d)* d*)d)(#" !!!  El "#d(d(d*d)d)d*d(d#"  !!GH!G!! Gs  "#$%(#"   !! K! ! M! QYquickemu-4.9.7/.github/apple.png000066400000000000000000000072501473451027600165420ustar00rootroot00000000000000PNG  IHDR>asBIT|d_IDATx{tU՝ǿ} %O-Q53UXE0T!QVFtֵ\ֶq֌: ,q " DB+2A*#P^IϽg wֺ?|d>aĪQ!ZxPA7 W]X['p3zPr/z) PU.);-2"#+ Rdʂρ&"I,M@}`TS Sq8b'N,0zZƄMΠC @#8҈El\zL}#|tu -kMi7%Dp9AٯE1SAI ԴF@ɧapA<˔m#hJל" Fsv596Yksg{p3{p--$퓵h=1f ɧ ބ^d<ʷLi >kJ/J'0H]#+Ajc̟3zeFOYY_G} HmjZ@@)g OD?Θ?.Z\ TbkrA>Yi\O⤐_n=/j'P  ;C\de @?\}!֍[POVk2((:^ig%k/l>dqaa0s(fKojtՀ+4c\6Gj8Bo}[zi~H}W|܎7MI\p^JA-NGH@qllM~ 2]@!qxj$UjCVSH!hdQ# H Iچ~Jb$>%wYr>Xym;<QGϵ"j3$2F~]Tֲp|-m׶6#m&8 *%[ 3 dV &8NA0{-Xj.:sd3 `ݑ!DUT ۉ8NA*^ 4H^fG~nQ d}A|"*\@KQ j~ fG PQ3 wG޿3 fAr@#ق"ue6#m>Mjǭf+¾|iHd`qB CO1m@PAۉ8>GF,X *ΉlG\3iAHA!l@XqrquU$34w[q6BHRÃnN6EdΜrP}6'|J]f..D 5ba"`b+7l8a+F&e$燔+f CLqyyml&[I8ZZ:/f&qYv!P"wr6`ƍGe# GOMӲU+F&s zmۆMy5DrId[ jϔuD զ)ړdNivBH'%x};Hc@1W#5@<@K+<0|x)Go9'eKJ75|bq'dG$oX.Бri=?ԫ[/qhUî#䒴v oaIaըs2.16z=żٳ)^yck^J.[=kB QHBa4&kL =ˤ`}XGX,ϤzUhԖg8!W֕}uF<}Mh9RQ%'\kޝ,´pA:?-@Zچw]m#ͫ xioUqAy#7ۄ;f@ q2 ^5%hw'=ftLAV,|!ZCxLߋKg^ڰ QrH6#ĴBHb]j]oeh IJ]*Pt 3DEbEe6CDg>0t?4E 65\&30z7J5g x`^TQ>=tsAdDE 쁠+^N_eE[aՑbn8 *P@ {x̩ »Re r ԗ> B8Sf]B00|Y$ ZP== p&sA :! @z \5Hw[PIb-[)/UH܏IENDB`quickemu-4.9.7/.github/dependabot.yml000066400000000000000000000002541473451027600175600ustar00rootroot00000000000000version: 2 updates: - package-ecosystem: "github-actions" directory: "/" schedule: # Check for updates to GitHub Actions every week interval: "weekly"quickemu-4.9.7/.github/logo.png000066400000000000000000000576521473451027600164140ustar00rootroot00000000000000PNG  IHDRxsRGB IDATxgTn .*vԨŞ(QMkhԘhij -*6Pl(vT.m l~a3sq(cu~U㗂yaш 4]CAP8@W>m>^` >Q aʿ2و (Lsl)3P038T Ct)uDɲªU)  ]L.jsCp(ShIӝzo$MeVdUϮӝJXPJSŨeȡPA\ x\S+XSw,"]XPʩ2aJpDHLBEanxxHDDgMYpu;YRXD-PٺD0/;Q,P2iHeb*hНR-Cayxoug"64 4"䰝-Pgr@ϛ * ۶dPRGw |![w"J- 9rPd1)@˦&c6D{`~\[> HLCK0[J/6XY o/ 70(y "tg!"BE*g; uC-JaOD Ed(ylu h]Š,3O2Aw"Q/[eV$3S]:i1!2Lw"Pegl(#XHI0l( a\1Iw{,@a,?"JnJ)jT0/;JcYv<; Q<(MTΒ8Qmińݹ?QCtǠ~!semi':k@)+ E;Q"1uG(A2v?qM35pZz#Bh+h8篺Pt=S]$JXQim"֝(d\~22~^7~_=9ER(=d;){- ql>! Cw"㐽; wlTS[=0lhc289};;o)ZWA1Z;iU莒 XA'0; N}QOruM}6F~J&QYKtIv,bb bӝ(Ly;T;oܺ}|-F^t?f5끰l{u~&X?ՕQEQPQd@լugIf,bDRS^q@~; Q<=935߂ܽ[}%p>VSy/EMsܟ*Eg,ҝ%B A=ϿGU9Q߅܀sLqe90XDYi^{hD~; Q;B^Ϳ KQjIZS.nE[N쵇T+{s<A;z~Ee$QR[:eh.K!; .ן[Y#aI<-5JXDAuMZ*"{4QQ!N;^;B2f,)z,ɀ@?m)r،wR; nᇺcDaHp f]=h8Y ~TqtPo; U,!j2~{܌.w_!{1\׫˦;I"*ՕM>5,|\YMQ;FTX)v^;wVV?8'L] 4-Y?9Yw@)"O; IVc㛱}H wwޞ>p6 ip'=s~#݅𷛸P `Z{w_g,pk_j>5y9F\vkkZTuX5`, ݨ<\%1K d#q$PާCۿ_@xS4ATʼduG*]? ]w"0r;j;J[,Dx](O!diQuG"-zR96D?2 16}v9}@?)(M,:bS4 @ܺYQܧ}tGI9,AAlacBцug;+:ڄZ A,DV!.={#%=莒T4-\?'9άԕMzUYIά_w:۟4_{8Y0J؎*zsY- ; d\~22~31m^AxuGI, a9` g2]K =Kvʡ>;~n :t0Q[z "cp(9?Ds\Vw$3 o8Gwwzc,BwġZq(tPS6eН;i'AQzch{M1s4N?Dw #['FwfTΪНCpk7Sf㟄fauH6 u(x6d8=ڲu%%{j˦B ѓ7þoE5Uh8@К'(xP2[3>(֦`B9*g=;J\P=h8w8tgI#e;iQ?VKoUpE[}pO cIJ)P9k,RKm锡?sSRˍZwu$dT?Ki'By:D$M)yt0Y)e EP;Ko֬ķ`9|X˅Q[b(A';>}8#Be NK6RPӼ  ՝/Hw4Wwne3 ;ŁQ{.i?aqEdz^NL )Q;G__[σ,]jnmicP9 oގmmFҳk5+.!75 FQl tǡ>j|;Fl3J'_*:`斔Gey*Qb)WԕO>Ȅ2(Sjug%1,A) GUHwXI!i9a ƟS關Ɵvqϐ`鎢ân2)WwXI@#+w!mH12dAC!?`QoV%)ʤEՖU,"AdEr +8O]2r7z!"8f9b!ԕO9Tx Qe5ir\7`*̒/MIU,p~gu"y9cP"<Vw T3 #6Ϭԝ$Z[8-=hw,NN<;%+OER};´X4@=|?DҝȊ@}IN?ON"@k-IQ rНȊ{FpKO9OwhHSw> Wvؿ_})Z$f;> -YwHl:rO^Ɵ.s:@1*4'HueU ZuH>q-~0N ueU ;P=x~0GqBdr tG`ַ[ܠ; *9dÜOugDBT(gO#R/?ōҧI )1WabBE YwOw"p< nmP[Ckʲ;F$)8Ku q9cP K8> ojW;G_%TXvAAd%۠1(eܞi, V%T!@Jt ǘH1cAӑ)c#͇t苄)jO9")fFN쿝^W7I8 W}`qfIu:Vq,Tqiɣ;a.@ uNҜH1<~m^Yݠ;Jq $/nK$ :>'1?b/}ډ=. g݉ Z ātG8ĥSC&kMsD0o'eQb _sik{9 O?mBkQtǰ8b\}"r~/c9~.4ܵ/7h`T՚R|ϯovy,S9a4"9_w K2L_~L V97mprI3r㣺c vx1"o=33; ɳmttǰrָX?fM'v,V Y{]_n9(XWG(ާ}˹> IDATr>`&NI ga9*$l<$kF-buȸH$ h:V۝3P#q.>!cCpZZ#oX9aX=S ꘟFpYw7ILl)xPp̸"aQP?m5q;aַ;o |sFpM ׄp~{[[ӿL) !{Xv/8#bpu!rd, IyD曷fM W a#f"iN8 Ec3 Gx] `UBV2x~uAab@]p1^wkM+_LNL57B`2?aH5fj .HKkJ|fM#O co4O<ΓGy>֟6YxcgJ~@6X6Mo}9°?>8;i\iK%7}f n8 Gzq_x<Bhz[7f`3`+-Xw87C5Pm~݉AG w70 _2<.Lm7Ex.E }Ж[x۶p/'I cp%禨;uGJ_ ~"tIʆyhr ¾@Q(뷠Qev.>FkJ0|>,חIcsh9n*߂hcPQO(Ƅ 3E~ѺԔMy3yODg+-Dl֟E%W%}n8]ǏiSm`~-7< +uGCU3vH ݦ8vK>bR k`(rmuz0#AwOŃ~sPV쨬[hაuco; {umM-Xo¬i[>'}ݐ>XHnBTBy;>9 B6մrI4nHM(E}Ȃ߳}dqDc9FG}LJW7ڗ(8ِ:@N=Vrwg{~T(.G/}t H`ٗ=.|ϯp$t= ~-Zo U}huJ)%5J\ {dbQEAofxZߣ#L>i @2b{W>FO'݊1 QS^ s !mqcEOȄho!Bti ye"TPqѢVTן{4iRtG. ~/9麓ńzz%p_p$=^Z\7'V#sVEz}&^7z!J6#A9 (Cw{p?v3`lhEmeVZ >  wP>dHΏie[G0QS$%W}acō޹}d1̺a}?&C@} oa̟+ n@}`znnqP3xʙ0 뉒݆@2u Q<`?DCD~݀ă>H87 Q=כ|Ń})ω?~fDK#&[D_%# ١ci!6KpC>6BM-Xˠ|ˋ!d6 v@D0(@nZ9?k#*9jC[ѷ4.֖N9Ir$%+ph/QO W"ZFnyp߾t?>6Z2G1x>O'5[}hN;e9+G/aekۨV˾BیWZ=$+ =Js!H;Ս}1 A8b?QGkh1mP\'BGD>Û[ᛷo6>jQeyp'o{qsM+_%}̼Gŀ@~)02ǬkBXU/}U`HE߃%/qؑI; QұmW sKs \ o?C܎~ 7or+ٖz>t LQ"g("p7 #] #7>a6:1z(o}h'0@ڻ (QʺHh1RjnxuoӵS<ٚ5hȷ>*U]\9k7uPW:uiSoE(9;fQ̦6/_l:~$E|K P!9dl9 "#E|lCwC/O(A{"}ұp {uj"ޗ>yKalN;GJ{޴b@F(O97;¬ow_!BWZ#?i_q;tmӴ>]M jEIql i9P$2%Yt n7n=.Uo{!0X+.W>$j)nN*jR83/'"qrf\Wn[P=^>/n'r-l'jzfPN#څ#Q|؇B΃D[vOzuMճ๷w썼Ld?xy"FL[I#D\rSPmZ0v3Tfc+TsN4'$+ Fv:$;}6 Y/m *=GB:Zw~1ȼ^ݷoE#b؂ 7{In@,:WEhZW}ߧ(ofmS>oQ `}lCwk~6#?9 铏E6.O$l{Mmc|3$ڑ'm)X( p]c[ >@pZ(kL8Ǹp7{ iz\0|gܧA.^f]ꏿf'܀gvn +]5mMpYGWr^@wXېbݑ{fZo{;Ⱥ㝷-Ύvnʌ>m:qũȸH E`o~s03}%yr[[r.3 dSM}9d 39afD)þOD 7˾Bp#EMu~zq:O;FArfާCMs;U<c`>>d\}&. Qwކ#@ Ƴ'Ⱦ`({_"K?Fw, _G:C| gYoއ-;rly؈.wM c@.̚7鋖n}WŨ)LDK\}*R_#K?q*]8c{fM w;.i{ݭk={ R2j-fgwY4RmN4 (^QmcP on@}VКYߧS }:Y1}t?x^!`t>L#oiI(ݑ`G}ngF5a^}"(+GAF+b!P`u{ l v@2}.F`I\jr#? #"(:p^؄/w|c62n{Wr= smm{)j$'uM\ݞE $&4_#$+-moĎuL>(ΌJ agB}mzKQc6sxPJwJ1f}+Pz;FX>l lEcu6HHwzӜGECO15pZ: _ruºP47Z~JEL 1bGlL`W?SJ; ؋aZb@'GP1㱅fW 0^x Iw"vmwL =Rjs؊1 *D7vs% E;JJ_ϣq?6})v;w2KPLOW`Ԅy%xD",^T`@u¬kBxs~amlK/;em}LJ!VhGfmZ%``]hՃ'FfmglP!%JQ;uBhGD@;LDpԅrQ/&Xuþ_ 1Žm={zɾ/ QZn~Lw "; m7uy#.!e`@# Ix]-juH9sV1 a@߳uGH9o6@Ը X_hmDIsz!kuH)oY WAmO莐R #%3XJpZ_@wa6@ \C%ֻBa1R` N$pUZnxXw%Dd(;Q"[^#LuͺS%- FGwG`Wc$z@)1>,Th[-5LvŚP,"b6i;J o@XRz(BCtH:fCDI(C}IEճ %hhtEfCDɎCDѠ<~4M%)[Y'EIh1Ŗ2@= V莑L(Znx[tHhG@Dg(TM!yDIMA9(BWoO뎑U@h4D1Ы,Y;FB }Nw$퀪DwO'V)bLF պd~"ᅩ?K5?}@1vbַc$scDIO)4Dԃ>D(dBw|ߓꎑ0L%Śi4; :OIqd\u%(֔Ba*=Ku>PUyH1vZhtH=D1g*i4\9Srʹgl{Yk>(*hN v"w֯!麣妹P-^1,MuG JzSqm_hJrBdk;14'tǰ`XwE<оPWkypSss2(n›ȼlQ,GXŖuC_RMیWZzb@[ رP)Doa-ѝr(mm~$@EAo}1=D mH;ìo28@[?C!D6I1,QlBz#.߂e,Rw KSwʭ^aCJQo*z㣺#X{bF 6 ⇍Hjbˮ;Qq@m @Dx]Ew 8@C; EO뎡'Ŏ@mlC ߼}L6 1tVp/"KP -H (vX({k,"r-|ϭC JDt JJf(@9j$"Z2*sY#%GBax;E [:,l DayQ|ϭ@ c ŝi%,,5{#%1;o;-¶%?Coz` *()n:-7MQ(IIbVD}᭝ad/;FL( i˻) gtG D'Ju:d@[cDߌpmy@!(-DDPm~1(]wRQR[;]Ssp(ɘx[;Ft6Hw %mk%`V'6@ݶit9yEh#62(b=Җ1(V|ϭ@J1+"ކw@pJގn&"?>;B԰ b qBkz} +uLj DRjQOoBDyt7Dq{n{, 7R3Hj[_B0v^D}ʼ9z\e{?n6Pw 6w5 TSornD',b(D)硂!16Xw֫AzU䭛Ө/śYߣVMdgpQb"/;FXч ,Y 7uLjCD^6XN_$q!1AM9{ J,餚6U1"c7`NAd} [L L_@boqJuAwI["vg@%gӃ},s6DfJxSD}"yp iNٺcYRCVFw>s{`i͠}WXWuFDDyHYP‘ 7c- 0}QBS:H ea;לGown k i'-) Dg}V;Qi"]|4񏂸sh'JaKq@z0=%Ez=g6c Wu07\ODy{cȶ;{v6_@9z&x/GԊ68r*&=H{_>m# jgDwGRއ o ߂ec{J)}]<އܷPwq)  Uwݰ`"IvݒdZiKN-i+Z, b:-! 0LiB:,@ؽ  PI7P0d_MMHo9~?$l9f{xN0 QȌn);R ][x5YG8)@NBW 'xRPQ]XDd+>: y#2.@ OR@[?FLD'5~Nț6Hku "+SjM]A Xz#"ϏX8!oQu" g`-AGDT1u}Pj|D&$sw-ycQJznuJ- 5"}p#8 $ibϴ_2*PCr%hߴ^Uhb-X(F:.a/2f\w=.EG1ck[ z 4נ16E%A,@С] cl"3wl(^tW[a}R>Ճw<0 H AU~9C+]yDdbga(ނy} RXeuQ4ƻpFz DT=u7P cZx0QpbQob? @ZA;y(\{` cutʭ { z JQtҦǭc9B嵵 @ƍU~PB{2 'I*Q}s(?S\է p^gc%P2TD?a*Q}n{ W ňL>P\nDI!M)M36w@X(6t,[DsGzuɪ@K>d:{OCPvZ(Mb鹍1"Q2f(1?d1_(' R U|5>jcW@˕OC)?u "~L/~PRYSP^oc:Y:7V.Qh^6Tuj`͟m6??aZ Vwq?D:L ugu"i^>sac~|u NFT?eΚD=ۭsĊO OzkPb%V9^ Ŝ܏ʖ @eUއ\v:MÀnd %/%&=9f*x@UlAD'WЃが8DSXמ:F@X*AD'W@?EM;RYJyk4U݅tfHh 獮9`$(uSm`N>iNWg<aJm`m]2UP:XOx "zs{_c s"typCHB4t1P@iT(ݣ>3 Pi4O. t nJ]P3{(d܅n < oުݧg2;`c8gc dۡXgKl~~Z?IqG&:F@m9hӽ ³=u(4DBoP}: Rei,OMHJk5WR-ZGBC3fD@#YߡtF*F9k0҅/_;bߝs{Y(PUWB+AP2}mU9u9Mmf]S_J+@FDp Ft!w5dL.J=9(Nh` @.ˮaa d@"{}>kҿ;bjs~{lC*C߂UL(^i:THop{ Q\{ Mﻫ$m=0 (]Ȉ;0ʏ^7BDGq(Fw",G纞 w"#9[iZDqA{(q+Xl7?7)$ Y龮Q\#gX ˮwR@'at.]UBT=o*&:JҰLC&sxXQ~mP XƋLS/{e,D+<(PVueΒT,3Б T7%BvP:V C#su$c\{a 8z+;ȋ?~G:r߷Nt,?> X5{iB,9RQuz. KCs2Yg,~&: Q=r~~АTEQ͋Xew֚>ǭՃگ6 [ƚdrY~  @ I΅z,DIW{7KI(rӹs獮y4c,!V2eoYKo\؍FЛ2eފuztPLKL4 g~w Z?z T/uzL.S XDS[_8W*F<Ź\O#t.x%!@4u]@\_t.#"3l+6"b(I]H-jG'PTo5]8g`Ŀ`@es: )յU|/z, ."YEOqM:]kQ۳E*]:EA|/; k_Z}Ol^^q &Ε&J ub="g(ؗrc텞-YXbh:+M-"C,DD3*K lYg Qq_< ӭM\ݞ:  @,k^YNFirի ɱ$2xJQoCDt!SG.{u\N : @I2,_v , X\4df: W:T^!y(T1.ke`͸u @ڻ[ bQRUTwPͿYHW,D-n7tzB6X2xPY BY@ηBTdrGPPv.O \ :QBqOP`P /ZqW2:QAwzٞX@;9ٳ:,Cw } *4*wA0Ht>G&X̞̲4_"+DpubfR_CVX(/_Vo xu)uٶڟX!bXjmh-_J:ь)~$v$ޢu7Pl -\HrU;(QTU']~:P)Fk> c8|[ᾕ;OSܱP(Vy# r PLEcU:dPb)VyÝ%X*EM@PW^Oݷx}J* p?fPu_jhX( .? GyD -ֹ(9Z0E ==SGࣀu&#}IS"US?5։@ g+VS|> n,~(~]DDQbXZ0ww6%u. AM - Closes # - Fixes # - Resolves # ## Type of change - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] Packaging (updates the packaging) - [ ] Documentation (updates the documentation) # Checklist: - [ ] I have performed a self-review of my code - [ ] I have tested my code in common scenarios and confirmed there are no regressions - [ ] I have added comments to my code, particularly in hard-to-understand sections - [ ] I have made corresponding changes to the documentation (*remove if no documentation changes were required*) quickemu-4.9.7/.github/tux.png000066400000000000000000000202241473451027600162550ustar00rootroot00000000000000PNG  IHDR>agAMA7 KIDATxXSo!tDl]^֮]]u׎tb;R-`NJ E}s.c@0G\ow\VXd7Uy8LJ9{H Z+buJt0̋uln\鍨8H8T=QT^"n ,-yu%xJ%VÝA0P'n_^k[קy/_ijgcNl_9[|Ç>0,_Vrk֧xlDR1@|N"ex1C LZ ~~E!_V 9}.yKv}_E-9&IxY66L h,MUɓ'*ďD&S~$Fc9Xj 8es pͲèAk<̫W>DN{0L 3LZG a Y,&:U;iE|$ #mOkD]Ւ8y_-Ry4#>.1$Y[[3c6Q¤bE:.\BkӔ<`c4͠ o)5.]:͉3 o-T*{~-?X5,۷EywmFD'd.3E;s…4)ӧOy'Wv3h$L }Or Nvvv O"3|ޣXΟ2n6CoqHFMx(ӵk4->Ts|xiAl@ST ) 4D@2s7'muy[9ޞN}qmfe6 $ܿ! FSt|޽9ω" _ߛ4>F`|SGXQ0Vjٙ3_[|ުbM\[#t`lMiF$pS%2q] u`q b3|8SL|=>5@G8[2A2TYSgЊ.8P $,:l„ zAj5jnF .>7{yjƍՌ.#H͠ڀEbe] -Kb!^|\bd͚eK6fjY? HIxR2e IzEo [l4fӠ6f7#rR+`IxB^ ^q6#l$H92.ҢEҋ|Ve&4dmFf똙9]\$cǎyR3Fk #8Üw!绿k w ݈gBVmFUh6 <4̩U,kA⠦y 0@2<(3uA%]qI|-3t%>WרQ# *6dmFe\::9.f%98t%>lܸh$wܒ ]quU13~.>nĿ|h6HMQFtMR Z-]4N-]qZ!6NͭP)lj߿ܹA*UJ2wyDYmJ ^5Kdl߿n6M Te bŊRL3c;2Ok,<_}$K&kߢsfFKNanыk"v,σ@dA)2)aلѓdI/_:'0 tY űl秺p'NZj02D _T{ؘ~?8*)(Nk'fhIt4R\KuXHnù72\Կp\ZlY_Q`SNp?8e./xU0o iV|-U?,&?AhD!Hd1Z`ĂV檪)x{;ZZ|(V/޽{xiN|'`7r2w,,X WsY>9rF7g\M4Fx1)}?#&P]D4&jLue'cH PUø:䀓#йz6gc1cܹsiF/e p'~KÓM]&qw~:n_2k*BFIC)q"| ($8G?+P˷ oň)ce˖aY` =#DmFyXdNN<YW|$mT5Z gX#qr}V@H /g_>7G6qp{6ݹjyd rHz~s#)@d+p}q9eXU*L6mʋ1SE|>Jne67y+>QcXɍ̀SjL op+A.D9@J*T\᱘&̙3Xoħ Cp aӬg}^Be5{D1HQ}{*쇢K'tڵkM.>䌂Ibٗx;(+|]ÇsGSlvԩ#`XxE\*L2"QS Nt!PE2BrWj*% 1TI89#O̓xN;oB 8m9asmkfiC+D CHThYAfQ"&uStQtnBZ).*5j'u]8y}?jXd1G>ύI ʘ匵`!3f|+&u _W /ǩi5a3$( @`dqΚ͛Y >K{tg%rޝK}OGhQ;3#~?TA d. OcYn`yLy-rXK.w}~7wDnw שmeW=+HXT!X-gŖR_7& !>D4F&7E]b·e 1X,b5Wb(׀׉3O4lxz4E 1_,mXtfN-PȂ4~#3& 455^'?T=- ݋D{[/t##~T{bWƖ_y];Xk!s[AGρ;F1-g?7PC.r%%b!vƚ[ʒ_DIxy ċ^ M0->TaJg3DVmvz})z[\]|$>QӼ0=AmA.8@Z! f[?<ZXsan2ЁNlxߏAޓ@$F?TB4X<qjP y0b@Zg$,x;|eZ|*0uO1R!A[%9h yn<r`0в$VA-ߺhaIENDB`quickemu-4.9.7/.github/workflows/000077500000000000000000000000001473451027600167645ustar00rootroot00000000000000quickemu-4.9.7/.github/workflows/flake-checker.yml000066400000000000000000000007171473451027600222000ustar00rootroot00000000000000name: Flake ❄️ Checker ✅ on: push: branches: - master schedule: - cron: '42 0 * * 6' workflow_dispatch: jobs: flake-checker: name: Flake Checker runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 with: fetch-depth: 0 - uses: DeterminateSystems/nix-installer-action@v16 - uses: DeterminateSystems/magic-nix-cache-action@v8 - uses: DeterminateSystems/flake-checker-action@v9 quickemu-4.9.7/.github/workflows/flake-updater.yml000066400000000000000000000007731473451027600222420ustar00rootroot00000000000000name: Flake ❄️ Lock 🔒️ Updater ✨ on: schedule: - cron: '37 13 14,28 * *' workflow_dispatch: jobs: lock-updater: name: Flake Lock Updater runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 with: fetch-depth: 0 - uses: DeterminateSystems/nix-installer-action@v16 - uses: DeterminateSystems/magic-nix-cache-action@v8 - uses: DeterminateSystems/update-flake-lock@v24 with: pr-title: "chore: update flake.lock" quickemu-4.9.7/.github/workflows/lint-pr.yml000066400000000000000000000013471473451027600211010ustar00rootroot00000000000000name: "Lint Pull Request 🐙" on: pull_request_target: types: - opened - edited - synchronize permissions: pull-requests: read jobs: main: name: Validate pull request title runs-on: ubuntu-22.04 steps: - uses: amannn/action-semantic-pull-request@v5 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: # If the PR only contains a single commit, the action will validate that # it matches the configured pattern. validateSingleCommit: true # Related to `validateSingleCommit` you can opt-in to validate that the PR # title matches a single commit to avoid confusion. validateSingleCommitMatchesPrTitle: true quickemu-4.9.7/.github/workflows/lint-shellcheck.yml000066400000000000000000000005271473451027600225640ustar00rootroot00000000000000name: "Lint Shellcheck 🐚" on: pull_request: branches: '**' workflow_dispatch: jobs: shellcheck: name: Shellcheck runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 - name: Run ShellCheck uses: ludeeus/action-shellcheck@master with: format: gcc severity: warning quickemu-4.9.7/.github/workflows/publish-release.yml000066400000000000000000000103121473451027600225700ustar00rootroot00000000000000name: Publish Release 🏷️ on: push: tags: - "v?[0-9]+.[0-9]+.[0-9]+*" workflow_dispatch: inputs: tag: description: "The existing tag to publish" type: "string" required: true jobs: version-check: name: "Check versions ⚖️" runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 with: fetch-depth: 0 - name: "Compare App and Git versions 🟰" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | APP_VERSION=$(grep "^readonly VERSION" quickemu | cut -d'"' -f2) GIT_VERSION=$(git describe --tags | cut -d'-' -f1) echo "App version: ${REL_VERSION}" echo "Git version: ${GIT_VERSION}" if [ "${APP_VERSION}" != "${GIT_VERSION}" ]; then echo "ERROR! Version mismatch."; exit 1 fi draft-release: needs: [version-check] name: "Draft Release 📥️" runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 - name: Create release ${{ github.ref }} as a draft env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | gh release create "${{ github.ref }}" --draft --generate-notes build-release: needs: [draft-release] name: "Build Release 👨‍🔧" runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 - name: Build and Upload .deb env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | sudo apt-get -y update sudo apt-get -y install debhelper devscripts REL_VER=$(grep "^readonly VERSION" quickemu | cut -d'"' -f2) rm debian/changelog dch --package quickemu --newversion="${REL_VER}-1" --distribution=unstable "New upstream release." --create dpkg-buildpackage --build=binary --no-check-builddeps --compression=gzip gh release upload "${{ github.ref }}" "../quickemu_${REL_VER}-1_all.deb" --clobber publish-release: needs: [build-release] name: "Publish Release 📤️" runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 - name: Publish release ${{ github.ref }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | if [ "$(gh release view "${{ github.ref }}" --json assets --template '{{len .assets}}')" -lt 0 ]; then exit 1 fi gh release edit "${{ github.ref }}" --draft=false publish-flakehub: needs: [version-check] name: "Publish FlakeHub ❄️" runs-on: "ubuntu-22.04" permissions: id-token: "write" contents: "read" steps: - uses: "actions/checkout@v4" with: ref: "${{ (inputs.tag != null) && format('refs/tags/{0}', inputs.tag) || '' }}" - uses: "DeterminateSystems/nix-installer-action@main" - uses: "DeterminateSystems/magic-nix-cache-action@main" - uses: "DeterminateSystems/flakehub-push@main" with: visibility: "public" name: "quickemu-project/quickemu" tag: "${{ inputs.tag }}" publish-ppa: needs: [version-check] name: "Publish PPA 📦️" runs-on: ubuntu-22.04 steps: - name: "Checkout 🥡" uses: actions/checkout@v4 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: "Import gpg key 🔑" uses: crazy-max/ghaction-import-gpg@v6 with: gpg_private_key: ${{ secrets.PPA_GPG_PRIVATE_KEY }} passphrase: ${{ secrets.PPA_GPG_PASSPHRASE }} - name: "Install dependencies 💾" run: | sudo apt-get -y update sudo apt-get -y install debhelper-compat distro-info dput devscripts - name: "Upload to PPA ⤴️" env: DEBEMAIL: ${{ secrets.DEBEMAIL }} DEBFULLNAME: ${{ secrets.DEBFULLNAME }} run: | REL_VER=$(grep "^readonly VERSION" quickemu | cut -d'"' -f2) STAMP=$(date +%y%j.%H%M) for CODENAME in $(distro-info --supported); do rm debian/changelog dch --package quickemu --newversion="${REL_VER}-1~${CODENAME}${STAMP}" --distribution=${CODENAME} "New upstream release." --create dpkg-buildpackage -d -S -sa dput ppa:flexiondotorg/quickemu ../quickemu_${REL_VER}-1~${CODENAME}${STAMP}_source.changes done quickemu-4.9.7/.github/workflows/test-build-quickemu.yml000066400000000000000000000047561473451027600234200ustar00rootroot00000000000000name: Test build quickemu 🚧 on: pull_request: branches: - master paths: - quickemu - quickget - debian/** - flake.nix - package.nix push: branches: - master paths: - quickemu - quickget - debian/** - flake.nix - package.nix workflow_dispatch: # TODO: arm64 runner # https://github.blog/changelog/2024-06-03-actions-arm-based-linux-and-windows-runners-are-now-in-public-beta/ jobs: test-deb-build: runs-on: ubuntu-22.04 steps: - name: "Checkout 🥡" uses: actions/checkout@v4 - name: "Build & Test .deb 🍥" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | sudo apt-get -y update sudo apt-get -y install debhelper devscripts REL_VER=$(grep "^readonly VERSION" quickemu | cut -d'"' -f2) rm debian/changelog dch --package quickemu --newversion="${REL_VER}-1" --distribution=unstable "New upstream release." --create dpkg-buildpackage --build=binary --no-check-builddeps --compression=gzip sudo apt-get -y install ../quickemu_${REL_VER}-1_all.deb quickemu --help quickget --help test-nix-build: runs-on: ubuntu-22.04 permissions: id-token: "write" contents: "read" steps: - name: "Checkout 🥡" uses: "actions/checkout@v4" - name: "Install Nix ❄️" uses: "DeterminateSystems/nix-installer-action@v16" - name: "Enable Magic Nix Cache 🪄" uses: "DeterminateSystems/magic-nix-cache-action@v8" - name: "Build & Test .nix ❄️" run: | nix build .#quickemu tree ./result ./result/bin/quickemu --help ./result/bin/quickget --help ./result/bin/quickreport # Text a VM if the Nix Installer successfully enabled KVM if [ $DETERMINATE_NIX_KVM -eq 1 ]; then ./result/bin/quickget alpine v3.20 ./result/bin/quickemu --vm alpine-v3.20.conf --display none sleep 5 if pgrep -F ./alpine-v3.20/alpine-v3.20.pid; then echo "Test VM is running" else echo "Test VM is not running" exit 1 fi # Test a few more quickemu commands to clean up ./result/bin/quickemu --vm alpine-v3.20.conf --kill ./result/bin/quickemu --vm alpine-v3.20.conf --delete-disk ./result/bin/quickemu --vm alpine-v3.20.conf --delete-vm fi quickemu-4.9.7/.github/workflows/test-quickget.yml000066400000000000000000000032021473451027600222750ustar00rootroot00000000000000name: "Test quickget 🧪" on: workflow_dispatch: push: branches: - master paths: - quickget pull_request: branches: - '**' paths: - quickget jobs: quickget-tests: name: "Run quickget tests 👟" runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 - name: "Install dependencies 📦️" run: | sudo apt-get -y update sudo apt-get -y install curl qemu-utils - name: "List OS variants 📃" run: | mkdir -p results ./quickget --list | tail -n +2 | tee results/list.txt - name: "Check OS downloads 💿️" run: | mkdir -p results ./quickget --check | tee results/check.txt - name: "Display results 📊" run: | WINDOWS=$(grep -c "windows-" results/check.txt) FAILED=$(grep -c ^FAIL results/check.txt) SKIPPED=$(grep -c ^SKIP results/check.txt) PASSED=$(grep -c ^PASS results/check.txt) CHECKED=$((WINDOWS + FAILED + SKIPPED + PASSED)) echo -e "\nResults:" echo -e "- CHECKED:\t${CHECKED}" echo -e "- PASSED:\t${PASSED}" echo -e "- SKIPPED:\t${SKIPPED}\t(of which ${WINDOWS} are Windows)" echo -e "- FAILED:\t${FAILED}\n" grep ^FAIL results/check.txt | tee results/failed.txt VARIATIONS=$(wc -l results/list.txt | cut -d' ' -f 1) DOWNLOADS=$(wc -l results/check.txt | cut -d' ' -f 1) echo echo "Compare OS variations with downloads:" echo -e "- Variations:\t${VARIATIONS}" echo -e "- Downloads:\t${DOWNLOADS}" quickemu-4.9.7/.gitignore000066400000000000000000000003131473451027600153540ustar00rootroot00000000000000*.chunklist *.conf *.dmg *.fd *.fixed *.img *.iso *.ISO *.lock !flake.lock *.log *.markdownlint.jsonc *.markdownlint.yaml *.msi *.part *.permall *.pid *.ports *.qcow2 *.sh *.sock *.xml *.zs-old .direnv/ quickemu-4.9.7/.gitmodules000066400000000000000000000001411473451027600155400ustar00rootroot00000000000000[submodule "build-docs"] path = build-docs url = git@github.com:philclifford/quickemu-docs.git quickemu-4.9.7/CODE_OF_CONDUCT.md000066400000000000000000000121701473451027600161670ustar00rootroot00000000000000# Contributor Covenant Code of Conduct ## Our Pledge We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation. We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community. ## Our Standards Examples of behaviour that contributes to a positive environment for our community include: * Demonstrating empathy and kindness toward other people * Being respectful of differing opinions, viewpoints, and experiences * Giving and gracefully accepting constructive feedback * Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience * Focusing on what is best not just for us as individuals, but for the overall community Examples of unacceptable behaviour include: * The use of sexualized language or imagery, and sexual attention or advances of any kind * Trolling, insulting or derogatory comments, and personal or political attacks * Public or private harassment * Publishing others' private information, such as a physical or email address, without their explicit permission * Other conduct which could reasonably be considered inappropriate in a professional setting ## Enforcement Responsibilities Community leaders are responsible for clarifying and enforcing our standards of acceptable behaviour and will take appropriate and fair corrective action in response to any behaviour that they deem inappropriate, threatening, offensive, or harmful. Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate. ## Scope This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. ## Enforcement Instances of abusive, harassing, or otherwise unacceptable behaviour may be reported to the community leaders responsible for enforcement at #quickemu channel on Discord. All complaints will be reviewed and investigated promptly and fairly. All community leaders are obligated to respect the privacy and security of the reporter of any incident. ## Enforcement Guidelines Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct: ### 1. Correction **Community Impact**: Use of inappropriate language or other behaviour deemed unprofessional or unwelcome in the community. **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behaviour was inappropriate. A public apology may be requested. ### 2. Warning **Community Impact**: A violation through a single incident or series of actions. **Consequence**: A warning with consequences for continued behaviour. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban. ### 3. Temporary Ban **Community Impact**: A serious violation of community standards, including sustained inappropriate behaviour. **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban. ### 4. Permanent Ban **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behaviour, harassment of an individual, or aggression toward or disparagement of classes of individuals. **Consequence**: A permanent ban from any sort of public interaction within the community. ## Attribution This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0, available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity). [homepage]: https://www.contributor-covenant.org For answers to common questions about this code of conduct, see the FAQ at https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations. quickemu-4.9.7/CONTRIBUTING.md000066400000000000000000000017411473451027600156230ustar00rootroot00000000000000# Contributing We welcome contributions to Quickemu. - Help other Quickemu users by answering questions in the [Quickemu Discussions](https://github.com/quickemu-project/quickemu/discussions) 🛟 - Improve the documentation in [this README](https://github.com/quickemu-project/quickemu/edit/master/README.md) and the [Quickemu Wiki](https://github.com/quickemu-project/quickemu/wiki) 📖 - File bug reports and feature requests in the [Quickemu Issues](https://github.com/quickemu-project/quickemu/issues) 📁 - Submit [Quickemu Pull requests](https://github.com/quickemu-project/quickemu/pulls) to fix bugs 🐞 or add new features ✨ - Follow our [guide to adding a new OS to quickget](https://github.com/quickemu-project/quickemu/wiki/06-Advanced-quickget-features#adding-a-new-os-to-quickget) - Commit messages must [conform to the Conventional Commits specification](https://www.conventionalcommits.org/). - [Sponsor the project](https://github.com/sponsors/flexiondotorg) 💖 quickemu-4.9.7/LICENSE000066400000000000000000000020561473451027600143770ustar00rootroot00000000000000MIT License Copyright (c) 2020 Wimpy's World Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. quickemu-4.9.7/README.md000066400000000000000000000145441473451027600146560ustar00rootroot00000000000000
Quickemu # Quickemu **Quickly create and run optimised Windows, macOS and Linux virtual machines:** **Made with 💝 for Tux (Linux) & Apple (macOS)**

 Discord   Mastodon   Twitter   LinkedIn 

# Introduction **Quickemu** is a wrapper for the excellent [QEMU](https://www.qemu.org/) that automatically *"does the right thing"* when creating virtual machines. No requirement for exhaustive configuration options. You decide what operating system you want to run and Quickemu takes care of the rest 🤖 - `quickget` **automatically downloads the upstream OS** and creates the configuration 📀 - `quickemu` enumerates your hardware and launches the virtual machine with the **optimum configuration best suited to your computer** ⚡️ The original objective of the project was to [enable quick testing of Linux distributions](https://github.com/quickemu-project/quickemu/wiki/02-Create-Linux-virtual-machines) where the virtual machines and their configuration can be stored anywhere (such as external USB storage or your home directory) and no elevated permissions are required to run the virtual machines. **Today, Quickemu includes comprehensive support for [macOS](https://github.com/quickemu-project/quickemu/wiki/03-Create-macOS-virtual-machines), [Windows](https://github.com/quickemu-project/quickemu/wiki/04-Create-Windows-virtual-machines)**, most of the BSDs, novel non-Linux operating systems such as FreeDOS, Haiku, KolibriOS, OpenIndiana, ReactOS, and more. # Features - Host support for **Linux and macOS** - **macOS** Sonoma, Ventura, Monterey, Big Sur, Catalina & Mojave - **Windows** 10 and 11 including TPM 2.0 - **Windows Server** 2022 2019 2016 - [Ubuntu](https://ubuntu.com/desktop) and all the **[official Ubuntu flavours](https://ubuntu.com/download/flavours)** - **Nearly 1000 operating system editions are supported!** - Full SPICE support including host/guest clipboard sharing - VirtIO-webdavd file sharing for Linux and Windows guests - VirtIO-9p file sharing for Linux and macOS guests - [QEMU Guest Agent support](https://wiki.qemu.org/Features/GuestAgent); provides access to a system-level agent via standard QMP commands - Samba file sharing for Linux, macOS and Windows guests (*if `smbd` is installed on the host*) - VirGL acceleration - USB device pass-through - Smartcard pass-through - Automatic SSH port forwarding to guests - Network port forwarding - Full duplex audio - Braille support - EFI (with or without SecureBoot) and Legacy BIOS boot ## As featured on [Linux Matters](https://linuxmatters.sh) podcast! The presenters of Linux Matters 🐧🎙️ are the creators of each of the principle Quickemu projects. We discussed Quickemu's 2024 reboot in [Episode 30 - Quickemu Rising From the Bashes](https://linuxmatters.sh/30).
Linux Matters Podcast
Linux Matters Podcast
# Quick start [Once Quickemu is installed](https://github.com/quickemu-project/quickemu/wiki/01-Installation), there are two simple steps to create and run a virtual machine: - `quickget` automatically downloads the ISO image for the operating system you want to run and creates a configuration file for the virtual machine. ``` shell quickget nixos unstable minimal ``` - `quickemu` starts the virtual machine using the configuration file created by `quickget`. ``` shell quickemu --vm nixos-unstable-minimal.conf ``` Execute `quickget` (with no arguments) to see a list of all the supported operating systems. ## Demo
# Documentation The wiki describes how to get up and running with Quickemu and also covers more advanced configuration and usage. - [**Installation**](https://github.com/quickemu-project/quickemu/wiki/01-Installation) 💾 - [**Create Linux virtual machines**](https://github.com/quickemu-project/quickemu/wiki/02-Create-Linux-virtual-machines) 🐧 - [**Create macOS virtual machines**](https://github.com/quickemu-project/quickemu/wiki/03-Create-macOS-virtual-machines) 🍏 - [**Create Windows virtual machines**](https://github.com/quickemu-project/quickemu/wiki/04-Create-Windows-virtual-machines) 🪟 - [**Advanced quickemu configuration**](https://github.com/quickemu-project/quickemu/wiki/05-Advanced-quickemu-configuration) 🔧 - [**Advanced quickget features**](https://github.com/quickemu-project/quickemu/wiki/06-Advanced-quickget-features) 🤓 - [**Alternative frontends**](https://github.com/quickemu-project/quickemu/wiki/07-Alternative-frontends) 🧑‍💻 - [**References**](https://github.com/quickemu-project/quickemu/wiki/08-References) 📚️ quickemu-4.9.7/SECURITY.md000066400000000000000000000011011473451027600151510ustar00rootroot00000000000000# Security Policy ## Supported Versions Here are the versions of Quickemu currently being supported with security updates. | Version | Supported | | ------- | ------------------ | | 4.9.x | :white_check_mark: | | < 4.8 | :x: | ## Reporting a Vulnerability If you discover a vulnerability in Quickemu then [file an issue](https://github.com/quickemu-project/quickemu/issues/new) and click *Report a vulnerability*. - Quickemu is a spare-time hobby project. - We do not have SLAs for responding to security issues. - It is a best-efforts basis. quickemu-4.9.7/build-docs/000077500000000000000000000000001473451027600154145ustar00rootroot00000000000000quickemu-4.9.7/chunkcheck000077500000000000000000000103341473451027600154240ustar00rootroot00000000000000#!/usr/bin/env python3 from pathlib import Path import struct import hashlib import argparse v1_prod_pubkey = 0xC3E748CAD9CD384329E10E25A91E43E1A762FF529ADE578C935BDDF9B13F2179D4855E6FC89E9E29CA12517D17DFA1EDCE0BEBF0EA7B461FFE61D94E2BDF72C196F89ACD3536B644064014DAE25A15DB6BB0852ECBD120916318D1CCDEA3C84C92ED743FC176D0BACA920D3FCF3158AFF731F88CE0623182A8ED67E650515F75745909F07D415F55FC15A35654D118C55A462D37A3ACDA08612F3F3F6571761EFCCBCC299AEE99B3A4FD6212CCFFF5EF37A2C334E871191F7E1C31960E010A54E86FA3F62E6D6905E1CD57732410A3EB0C6B4DEFDABE9F59BF1618758C751CD56CEF851D1C0EAA1C558E37AC108DA9089863D20E2E7E4BF475EC66FE6B3EFDCF # v2_prod_pubkey = 0xCB45C5E53217D4499FB80B2D96AA4F964EB551F1DA4EBFA4F5E23F87BFE82FC113590E536757F329D6EAD1F267771EE342F5A5E61514DD3D3383187E663929D577D94648F262EBA1157E152DB5273D10AE3A6A058CB9CD64D01267DAC82ED3B7BC1631D078C911414129CDAAA0FFB0A8E2A7ADD6F32FB09A7E98D259BFF6ED10808D1BDA58CAF7355DFF1A085A18B11657D2617447BF657140D599364E5AC8E626276AC03BC2417831D9E61B25154AFE9F2D8271E9CE22D2783803083A5A7A575774688721097DC5E4B32D118CF6317A7083BA15BA608430A8C8C6B7DA2D932D81F571603A9363AC0197AB670242D9C9180D97A10900F11FE3D9246CF14F0883 # v2_dev_pubkey = 0xB372CEC9E05E71FB3FAA08C34E3256FB312EA821638A243EF8A5DEA46FCDA33F00F88FC2933FB276D37B914F89BAD5B5D75771E342265B771995AE8F43B4DFF3F21A877FE777A8B419587C8718D36204FA1922A575AD5207D5D6B8C10F84DDCA661B731E7E7601D64D4A894F487FE1AA1DDC2A1697A3553B1DD85D5750DF2AA9D988E83C4C70BBBE4747219F9B92B199FECB16091896EBB441606DEC20F446249D5568BB51FC87BA7F85E6295FBE811B0A314408CD31921C360608A0FF7F87BD733560FE1C96E472834CAB6BE016C35727754273125089BE043FD3B26F0B2DE141E05990CE922F1702DA0A2F4E9F8760D0FA712DDB9928E0CDAC14501ED5E2C3 ChunkListHeader = struct.Struct('<4sIBBBxQQQ') assert ChunkListHeader.size == 0x24 Chunk = struct.Struct(' 0 assert chunk_offset == 0x24 assert signature_offset == chunk_offset + Chunk.size * chunk_count for i in range(chunk_count): data = f.read(Chunk.size) hash_ctx.update(data) chunk_size, chunk_sha256 = Chunk.unpack(data) yield chunk_size, chunk_sha256 digest = hash_ctx.digest() if signature_method == 1: data = f.read(256) assert len(data) == 256 signature = int.from_bytes(data, 'little') plaintext = 0x1ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff003031300d0609608648016503040201050004200000000000000000000000000000000000000000000000000000000000000000 | int.from_bytes(digest, 'big') assert pow(signature, 0x10001, v1_prod_pubkey) == plaintext elif signature_method == 2: data = f.read(32) assert data == digest else: raise NotImplementedError assert f.read(1) == b'' def check_chunklist(path, chunklist_path): with open(path, 'rb') as f: for chunk_size, chunk_sha256 in parse_chunklist(chunklist_path): chunk = f.read(chunk_size) assert len(chunk) == chunk_size assert hashlib.sha256(chunk).digest() == chunk_sha256 assert f.read(1) == b'' def main(): parser = argparse.ArgumentParser() parser.add_argument('vmdir', type=Path) args = parser.parse_args() vmdir = args.vmdir check_chunklist(vmdir / 'RecoveryImage.dmg', vmdir / 'RecoveryImage.chunklist') if __name__ == "__main__": main() quickemu-4.9.7/debian/000077500000000000000000000000001473451027600146115ustar00rootroot00000000000000quickemu-4.9.7/debian/changelog000066400000000000000000000002201473451027600164550ustar00rootroot00000000000000quickemu (4.9.6-1) unstable; urgency=medium * New upstream release. -- Martin Wimpress Fri, 10 Nov 2023 14:49:08 +0000 quickemu-4.9.7/debian/control000066400000000000000000000022251473451027600162150ustar00rootroot00000000000000Source: quickemu Section: utils Priority: optional Maintainer: Martin Wimpress Build-Depends: debhelper-compat (= 12), Standards-Version: 4.5.1 Homepage: https://github.com/quickemu-project/quickemu Vcs-Browser: https://github.com/quickemu-project/quickemu Vcs-Git: https://github.com/quickemu-project/quickemu.git Rules-Requires-Root: no Package: quickemu Architecture: all Depends: coreutils, curl, genisoimage, jq, mesa-utils, pciutils, procps, python3-minimal, qemu-system (>= 6.0), socat, spice-client-gtk, swtpm, usbutils, util-linux, uuid-runtime, x11-xserver-utils, xdg-user-dirs, zsync, ${misc:Depends}, ${shlibs:Depends}, Suggests: virt-viewer, Description: Quickemu creates and runs optimised virtual machines. Simple script to "manage" Qemu virtual machines. Each virtual machine configuration is a few lines long requiring minimal setup. The main objective of the project is to enable quick testing of desktop Linux distributions where the virtual machines configuration and disk images can be stored anywhere, such as external USB storage or your home directory. Windows and macOS guests are also supported. . quickemu-4.9.7/debian/copyright000066400000000000000000000044121473451027600165450ustar00rootroot00000000000000Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: quickemu Upstream-Contact: Martin Wimpress Source: https://github.com/quickemu-project/quickemu Files: * Copyright: 2020-2024 Martin Wimpress License: MIT Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: . The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. . THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # If you want to use GPL v2 or later for the /debian/* files use # the following clauses, or change it to suit. Delete these two lines Files: debian/* Copyright: 2021 - 2024 Martin Wimpress License: GPL-2+ This package is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. . This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. . You should have received a copy of the GNU General Public License along with this program. If not, see . On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". quickemu-4.9.7/debian/install000066400000000000000000000001111473451027600161730ustar00rootroot00000000000000chunkcheck usr/bin quickemu usr/bin quickget usr/bin quickreport usr/bin quickemu-4.9.7/debian/rules000077500000000000000000000001141473451027600156650ustar00rootroot00000000000000#!/usr/bin/make -f %: dh $@ override_dh_builddeb: dh_builddeb -- -Zgzip quickemu-4.9.7/debian/source/000077500000000000000000000000001473451027600161115ustar00rootroot00000000000000quickemu-4.9.7/debian/source/format000066400000000000000000000000151473451027600173200ustar00rootroot000000000000003.0 (native) quickemu-4.9.7/devshell.nix000066400000000000000000000021621473451027600157160ustar00rootroot00000000000000{ lib, mkShell, pkgs, stdenv, }: mkShell { packages = with pkgs; ([ cdrtools curl gawk gnugrep gnused jq pciutils procps python3 qemu_full samba socat spice-gtk swtpm unzip util-linux xorg.xrandr zsync OVMF OVMFFull ] ++ lib.optionals stdenv.isLinux [ glxinfo usbutils xdg-user-dirs ]); inputsFrom = with pkgs; [ git ]; shellHook = '' echo "**********************************************************************" echo "* 'direnv reload' to update '.direnv/bin/quickemu' for testing *" echo "**********************************************************************" sed \ -e '/OVMF_CODE_4M.secboot.fd/s|ovmfs=(|ovmfs=("${pkgs.OVMFFull.firmware}","${pkgs.OVMFFull.variables}" |' \ -e '/OVMF_CODE_4M.fd/s|ovmfs=(|ovmfs=("${pkgs.OVMF.firmware}","${pkgs.OVMF.variables}" |' \ -e '/cp "''${VARS_IN}" "''${VARS_OUT}"/a chmod +w "''${VARS_OUT}"' \ -e 's,\$(command -v smbd),${pkgs.samba}/bin/smbd,' \ quickemu > $PWD/.direnv/bin/quickemu chmod +x $PWD/.direnv/bin/quickemu ''; } quickemu-4.9.7/docs/000077500000000000000000000000001473451027600143175ustar00rootroot00000000000000quickemu-4.9.7/docs/Makefile000066400000000000000000000023241473451027600157600ustar00rootroot00000000000000include pandoc-man.mk ifeq ($(PREFIX),) PREFIX := /usr/local endif datarootdir := $(PREFIX)/share datadir := $(datarootdir) mandir := $(datarootdir)/man bindir := $(PREFIX)/bin all: quickget.1 quickemu.1 quickemu_conf.5 clean: rm *.1 *.5 install_docs: all install -d $(DESTDIR)$(mandir)/man1 install -d $(DESTDIR)$(mandir)/man5 install -m 644 quickget.1 $(DESTDIR)$(mandir)/man1 install -m 644 quickemu.1 $(DESTDIR)$(mandir)/man1 install -m 644 quickemu_conf.5 $(DESTDIR)$(mandir)/man5 rm -f $(DESTDIR)$(mandir)/man1/quickemu_conf.1 # install -m 644 quickgui.1 $(DESTDIR)$(mandir)/man1 install_bins: install -d $(DESTDIR)$(bindir) install -m 755 ../quickget $(DESTDIR)$(bindir) install -m 755 ../quickemu $(DESTDIR)$(bindir) install -m 755 ../quickreport $(DESTDIR)$(bindir) install -m 755 ../chunkcheck $(DESTDIR)$(bindir) install: install_bins install_docs uninstall:: rm -f $(DESTDIR)$(mandir)/man1/quickget.1 rm -f $(DESTDIR)$(mandir)/man1/quickemu.1 rm -f $(DESTDIR)$(mandir)/man5/quickemu_conf.5 rm -f $(DESTDIR)$(bindir)/quickget rm -f $(DESTDIR)$(bindir)/quickemu rm -f $(DESTDIR)$(bindir)/quickreport rm -f $(DESTDIR)$(bindir)/macrecovery rm -f $(DESTDIR)$(bindir)/chunkcheck .PHONY: all quickemu-4.9.7/docs/pandoc-man.mk000066400000000000000000000002461473451027600166670ustar00rootroot00000000000000PANDOC ?= pandoc PANDOC_OPTIONS = -f gfm+definition_lists .SUFFIXES: .1.md .1 .5.md .5 .1.md.1 .5.md.5: $(PANDOC) --standalone $(PANDOC_OPTIONS) --to man -o $@ $< quickemu-4.9.7/docs/quickemu.1000066400000000000000000001113051473451027600162250ustar00rootroot00000000000000.\" Automatically generated by Pandoc 3.3 .\" .TH "QUICKEMU" "1" "August 2, 2024" "quickemu" "Quickemu User Manual" .SH NAME quickemu \- A quick VM builder and manager .SH SYNOPSIS \f[B]quickemu\f[R] [\f[I]OPTION\f[R]]... .SH DESCRIPTION \f[B]quickemu\f[R] will create and run highly optimised desktop virtual machines for Linux, macOS and Windows .SH OPTIONS .TP \f[B]\-\-vm\f[R] vm configuration file .PP You can also pass optional parameters .TP \f[B]\-\-access\f[R] Enable remote spice access support. \[aq]local\[aq] (default), \[aq]remote\[aq], \[aq]clientipaddress\[aq] .TP \f[B]\-\-braille\f[R] Enable braille support. Requires SDL. .TP \f[B]\-\-delete\-disk\f[R] Delete the disk image and EFI variables .TP \f[B]\-\-delete\-vm\f[R] Delete the entire VM and its configuration .TP \f[B]\-\-display\f[R] Select display backend. \[aq]sdl\[aq] (default), \[aq]gtk\[aq], \[aq]none\[aq], \[aq]spice\[aq] or \[aq]spice\-app\[aq] .TP \f[B]\-\-fullscreen\f[R] Starts VM in full screen mode (Ctl+Alt+f to exit) .TP \f[B]\-\-ignore\-msrs\-always\f[R] Configure KVM to always ignore unhandled machine\-specific registers .TP \f[B]\-\-kill\f[R] Kill the VM process if it is running .TP \f[B]\-\-offline\f[R] Override all network settings and start the VM offline .TP \f[B]\-\-shortcut\f[R] Create a desktop shortcut .TP \f[B]\-\-snapshot apply \f[R] Apply/restore a snapshot. .TP \f[B]\-\-snapshot create \f[R] Create a snapshot. .TP \f[B]\-\-snapshot delete \f[R] Delete a snapshot. .TP \f[B]\-\-snapshot info\f[R] Show disk/snapshot info. .TP \f[B]\-\-status\-quo\f[R] Do not commit any changes to disk/snapshot. .TP \f[B]\-\-viewer \f[R] Choose an alternative viewer. \[at]Options: \[aq]spicy\[aq] (default), \[aq]remote\-viewer\[aq], \[aq]none\[aq] .TP \f[B]\-\-width \f[R] Set VM screen width; requires \[aq]\-\-height\[aq] .TP \f[B]\-\-height \f[R] Set VM screen height; requires \[aq]\-\-width\[aq] .TP \f[B]\-\-ssh\-port \f[R] Set SSH port manually .TP \f[B]\-\-spice\-port \f[R] Set SPICE port manually .TP \f[B]\-\-public\-dir \f[R] Expose share directory. \[at]Options: \[aq]\[aq] (default: xdg\-user\-dir PUBLICSHARE), \[aq]\[aq], \[aq]none\[aq] .TP \f[B]\-\-monitor \f[R] Set monitor connection type. \[at]Options: \[aq]socket\[aq] (default), \[aq]telnet\[aq], \[aq]none\[aq] .TP \f[B]\-\-monitor\-telnet\-host \f[R] Set telnet host for monitor. (default: \[aq]localhost\[aq]) .TP \f[B]\-\-monitor\-telnet\-port \f[R] Set telnet port for monitor. (default: \[aq]4440\[aq]) .TP \f[B]\-\-monitor\-cmd \f[R] Send command to monitor if available. (Example: system_powerdown) .TP \f[B]\-\-serial \f[R] Set serial connection type. \[at]Options: \[aq]socket\[aq] (default), \[aq]telnet\[aq], \[aq]none\[aq] .TP \f[B]\-\-serial\-telnet\-host \f[R] Set telnet host for serial. (default: \[aq]localhost\[aq]) .TP \f[B]\-\-serial\-telnet\-port \f[R] Set telnet port for serial. (default: \[aq]6660\[aq]) .TP \f[B]\-\-keyboard \f[R] Set keyboard. \[at]Options: \[aq]usb\[aq] (default), \[aq]ps2\[aq], \[aq]virtio\[aq] .TP \f[B]\-\-keyboard_layout \f[R] Set keyboard layout: \[aq]en\-us\[aq] (default) .TP \f[B]\-\-mouse \f[R] Set mouse. \[at]Options: \[aq]tablet\[aq] (default), \[aq]ps2\[aq], \[aq]usb\[aq], \[aq]virtio\[aq] .TP \f[B]\-\-usb\-controller \f[R] Set usb\-controller. \[at]Options: \[aq]ehci\[aq] (default), \[aq]xhci\[aq], \[aq]none\[aq] .TP \f[B]\-\-sound\-card \f[R] Set sound card. \[at]Options: \[aq]intel\-hda\[aq] (default), \[aq]ac97\[aq], \[aq]es1370\[aq], \[aq]sb16\[aq], \[aq]none\[aq] .TP \f[B]\-\-extra_args \f[R] Pass additional arguments to qemu .TP \f[B]\-\-version\f[R] Print version .SH EXAMPLES .TP \f[B]quickemu \-\-vm ubuntu\-mate\-22.04.conf\f[R] Launches the VM specified in the file \f[I]ubuntu\-mate\-22.04.conf\f[R] .SH Introduction \f[B]Quickemu\f[R] is a wrapper for the excellent \c .UR https://www.qemu.org/ QEMU .UE \c \ that automatically \f[I]\[dq]does the right thing\[dq]\f[R] when creating virtual machines. No requirement for exhaustive configuration options. You decide what operating system you want to run and Quickemu takes care of the rest 🤖 .IP \[bu] 2 \f[CR]quickget\f[R] \f[B]automatically downloads the upstream OS\f[R] and creates the configuration 📀 .IP \[bu] 2 \f[CR]quickemu\f[R] enumerates your hardware and launches the virtual machine with the \f[B]optimum configuration best suited to your computer\f[R] ⚡️ .PP The original objective of the project was to \c .UR https://github.com/quickemu-project/quickemu/wiki/02-Create-Linux-virtual-machines enable quick testing of Linux distributions .UE \c \ where the virtual machines and their configuration can be stored anywhere (such as external USB storage or your home directory) and no elevated permissions are required to run the virtual machines. .PP \f[B]Today, Quickemu includes comprehensive support for \c .UR https://github.com/quickemu-project/quickemu/wiki/03-Create-macOS-virtual-machines macOS .UE \c , \c .UR https://github.com/quickemu-project/quickemu/wiki/04-Create-Windows-virtual-machines Windows .UE \c \f[R], most of the BSDs, novel non\-Linux operating systems such as FreeDOS, Haiku, KolibriOS, OpenIndiana, ReactOS, and more. .SH Features .IP \[bu] 2 Host support for \f[B]Linux and macOS\f[R] .IP \[bu] 2 \f[B]macOS\f[R] Sonoma, Ventura, Monterey, Big Sur, Catalina & Mojave .IP \[bu] 2 \f[B]Windows\f[R] 10 and 11 including TPM 2.0 .IP \[bu] 2 \f[B]Windows Server\f[R] 2022 2019 2016 .IP \[bu] 2 \c .UR https://ubuntu.com/desktop Ubuntu .UE \c \ and all the \f[B]\c .UR https://ubuntu.com/download/flavours official Ubuntu flavours .UE \c \f[R] .IP \[bu] 2 \f[B]Nearly 1000 operating system editions are supported!\f[R] .IP \[bu] 2 Full SPICE support including host/guest clipboard sharing .IP \[bu] 2 VirtIO\-webdavd file sharing for Linux and Windows guests .IP \[bu] 2 VirtIO\-9p file sharing for Linux and macOS guests .IP \[bu] 2 \c .UR https://wiki.qemu.org/Features/GuestAgent QEMU Guest Agent support .UE \c ; provides access to a system\-level agent via standard QMP commands .IP \[bu] 2 Samba file sharing for Linux, macOS and Windows guests (\f[I]if \f[CI]smbd\f[I] is installed on the host\f[R]) .IP \[bu] 2 VirGL acceleration .IP \[bu] 2 USB device pass\-through .IP \[bu] 2 Smartcard pass\-through .IP \[bu] 2 Automatic SSH port forwarding to guests .IP \[bu] 2 Network port forwarding .IP \[bu] 2 Full duplex audio .IP \[bu] 2 Braille support .IP \[bu] 2 EFI (with or without SecureBoot) and Legacy BIOS boot .SS As featured on \c .UR https://linuxmatters.sh Linux Matters .UE \c \ podcast! The presenters of Linux Matters 🐧🎙️ are the creators of each of the principle Quickemu projects. We discussed Quickemu\[aq]s 2024 reboot in \c .UR https://linuxmatters.sh/30 Episode 30 \- Quickemu Rising From the Bashes .UE \c \&. .PP \ Linux Matters Podcast .PP When installing from source, you will need to install the following requirements manually: .IP \[bu] 2 \c .UR https://www.qemu.org/ QEMU .UE \c \ (\f[I]6.0.0 or newer\f[R]) \f[B]with GTK, SDL, SPICE & VirtFS support\f[R] .IP \[bu] 2 \c .UR https://www.gnu.org/software/bash/ bash .UE \c \ (\f[I]4.0 or newer\f[R]) .IP \[bu] 2 \c .UR https://www.gnu.org/software/coreutils/ Coreutils .UE \c .IP \[bu] 2 \c .UR https://curl.se/ curl .UE \c .IP \[bu] 2 \c .UR https://github.com/tianocore/edk2 EDK II .UE \c .IP \[bu] 2 \c .UR https://www.gnu.org/software/gawk/ gawk .UE \c .IP \[bu] 2 \c .UR https://www.gnu.org/software/grep/ grep .UE \c .IP \[bu] 2 \c .UR https://gitlab.freedesktop.org/mesa/demos glxinfo .UE \c .IP \[bu] 2 \c .UR https://stedolan.github.io/jq/ jq .UE \c .IP \[bu] 2 \c .UR https://wiki.linuxfoundation.org/lsb/start LSB .UE \c .IP \[bu] 2 \c .UR https://github.com/pciutils/pciutils pciutils .UE \c .IP \[bu] 2 \c .UR https://gitlab.com/procps-ng/procps procps .UE \c .IP \[bu] 2 \c .UR https://www.python.org/ python3 .UE \c .IP \[bu] 2 \c .UR http://cdrtools.sourceforge.net/private/cdrecord.html mkisofs .UE \c .IP \[bu] 2 \c .UR https://github.com/gregkh/usbutils usbutils .UE \c .IP \[bu] 2 \c .UR https://github.com/karelzak/util-linux util\-linux .UE \c ; including \f[CR]uuidgen\f[R] .IP \[bu] 2 \c .UR https://www.gnu.org/software/sed/ sed .UE \c .IP \[bu] 2 \c .UR http://www.dest-unreach.org/socat/ socat .UE \c .IP \[bu] 2 \c .UR https://gitlab.freedesktop.org/spice/spice-gtk spicy .UE \c .IP \[bu] 2 \c .UR https://github.com/stefanberger/swtpm swtpm .UE \c .IP \[bu] 2 \c .UR https://www.freedesktop.org/wiki/Software/xdg-user-dirs/ xdg\-user\-dirs .UE \c .IP \[bu] 2 \c .UR https://gitlab.freedesktop.org/xorg/app/xrandr xrandr .UE \c .IP \[bu] 2 \c .UR http://zsync.moria.org.uk/ zsync .UE \c .IP \[bu] 2 \c .UR http://www.info-zip.org/UnZip.html unzip .UE \c .PP For Ubuntu, Arch and NixOS hosts, the \c .UR https://launchpad.net/~flexiondotorg/+archive/ubuntu/quickemu ppa .UE \c , \c .UR https://aur.archlinux.org/packages/quickemu AUR .UE \c \ or \c .UR https://github.com/NixOS/nixpkgs/tree/master/pkgs/development/quickemu nix .UE \c \ packaging will take care of the dependencies. For other host distributions or operating systems it will be necessary to install the above requirements or their equivalents. .PP These examples may save a little typing: .SS Install requirements on Debian hosts This also applies to derivatives: .IP .EX sudo apt\-get install bash coreutils curl genisoimage grep jq mesa\-utils ovmf pciutils procps python3 qemu sed socat spice\-client\-gtk swtpm\-tools unzip usbutils util\-linux xdg\-user\-dirs xrandr zsync .EE .SS Install requirements on Fedora hosts .IP .EX sudo dnf install bash coreutils curl edk2\-tools genisoimage grep jq mesa\-demos pciutils procps python3 qemu sed socat spice\-gtk\-tools swtpm unzip usbutils util\-linux uuidgen\-runtime xdg\-user\-dirs xrandr zsync .EE .SS Install requirements on Gentoo Please note that you may have to use \f[CR]sys\-firmware/edk2\-ovmf\f[R] instead of \f[CR]sys\-firmware/edk2\-ovmf\-bin\f[R] \- depending on how your system is configured. .IP .EX sudo emerge \-\-ask \-\-noreplace app\-emulation/qemu \[rs] app\-shells/bash \[rs] sys\-apps/coreutils \[rs] net\-misc/curl \[rs] sys\-firmware/edk2\-ovmf\-bin \[rs] sys\-apps/gawk \[rs] sys\-apps/grep \[rs] x11\-apps/mesa\-progs \[rs] app\-misc/jq \[rs] sys\-apps/pciutils \[rs] sys\-process/procps \[rs] app\-cdr/cdrtools \[rs] sys\-apps/usbutils \[rs] sys\-apps/util\-linux \[rs] sys\-apps/sed \[rs] net\-misc/socat \[rs] app\-emulation/spice \[rs] app\-crypt/swtpm \[rs] x11\-misc/xdg\-user\-dirs \[rs] x11\-apps/xrandr \[rs] net\-misc/zsync \[rs] app\-arch/unzip .EE .SS Install requirements on macOS hosts Install the Quickemu requirements using brew: .IP .EX brew install bash cdrtools coreutils jq python3 qemu usbutils samba socat swtpm zsync .EE .PP Now clone the project: .IP .EX git clone https://github.com/quickemu\-project/quickemu cd quickemu .EE .SS \c .UR https://github.com/quickemu-project/quickemu/wiki/07-Alternative-frontends Alternative Frontends .UE \c .SS Quickgui While \f[CR]quickemu\f[R] and \f[CR]quickget\f[R] are designed for the terminal, a graphical user interface is also available: .IP \[bu] 2 \f[B]\c .UR https://github.com/quickemu-project/quickgui Quickgui .UE \c \f[R] by \c .UR https://github.com/marxjohnson Mark Johnson .UE \c \ and \c .UR https://github.com/ymauray Yannick Mauray .UE \c \&. .PP To install Quickgui on Ubuntu: .IP .EX sudo add\-apt\-repository ppa:yannick\-mauray/quickgui sudo apt update sudo apt install quickgui .EE .PP Many thanks to \c .UR https://github.com/Lukewh Luke Wesley\-Holley .UE \c \ and \c .UR https://github.com/daPhipz Philipp Kiemle .UE \c \ for creating the \f[B]\c .UR https://github.com/Lukewh/quickemu-icons Quickemu icons .UE \c \f[R] 🎨 .SS Creating Linux guests 🐧 .SS Ubuntu \f[CR]quickget\f[R] will automatically download an Ubuntu release and create the virtual machine configuration. .IP .EX quickget ubuntu 22.04 quickemu \-\-vm ubuntu\-22.04.conf .EE .IP \[bu] 2 Complete the installation as normal. .IP \[bu] 2 Post\-install: .RS 2 .IP \[bu] 2 Install the SPICE agent (\f[CR]spice\-vdagent\f[R]) in the guest to enable copy/paste and USB redirection .RS 2 .IP \[bu] 2 \f[CR]sudo apt install spice\-vdagent\f[R] .RE .IP \[bu] 2 Install the SPICE WebDAV agent (\f[CR]spice\-webdavd\f[R]) in the guest to enable file sharing. .RS 2 .IP \[bu] 2 \f[CR]sudo apt install spice\-webdavd\f[R] .RE .RE .SS Ubuntu daily\-live images \f[CR]quickget\f[R] can also download/refresh daily\-live images via \f[CR]zsync\f[R] for Ubuntu developers and testers. .IP .EX quickget ubuntu daily\-live quickemu \-\-vm ubuntu\-daily\-live.conf .EE .PP You can run \f[CR]quickget ubuntu daily\-live\f[R] to refresh your daily development image as often as you like, it will even automatically switch to a new series. .SS Ubuntu Flavours All the official Ubuntu flavours are supported, just replace \f[CR]ubuntu\f[R] with your preferred flavour. .PP The project \c .UR https://github.com/quickemu-project/quickemu/wiki/02-Create-Linux-virtual-machines wiki .UE \c \ may have further information. .IP \[bu] 2 \f[CR]edubuntu\f[R] (Edubuntu) .IP \[bu] 2 \f[CR]kubuntu\f[R] (Kubuntu) .IP \[bu] 2 \f[CR]lubuntu\f[R] (Lubuntu) .IP \[bu] 2 \f[CR]ubuntu\-budgie\f[R] (Ubuntu Budgie) .IP \[bu] 2 \f[CR]ubuntucinnamon\f[R] (Ubuntu Cinnamon) .IP \[bu] 2 \f[CR]ubuntukylin\f[R] (Ubuntu Kylin) .IP \[bu] 2 \f[CR]ubuntu\-mate\f[R] (Ubuntu MATE) .IP \[bu] 2 \f[CR]ubuntu\-server\f[R] (Ubuntu Server) .IP \[bu] 2 \f[CR]ubuntustudio\f[R] (Ubuntu Studio) .IP \[bu] 2 \f[CR]ubuntu\f[R] (Ubuntu) .IP \[bu] 2 \f[CR]ubuntu\-unity\f[R] (Ubuntu Unity) .IP \[bu] 2 \f[CR]xubuntu\f[R] (Xubuntu) .PP You can also use \f[CR]quickget\f[R] with advanced options : .IP .EX \-\-download [edition] : Download image; no VM configuration \-\-create\-config [path/url] [flags] : Create VM config for an OS image \-\-open\-homepage : Open homepage for the OS \-\-show [os] : Show OS information \-\-version : Show version \-\-help : Show this help message \-\-disable\-unattended : Force quickget not to set up an unattended installation \-\-url [os] [release] [edition] : Show image URL(s) \-\-check [os] [release] [edition] : Check image URL(s) \-\-list : List all supported systems \-\-list\-csv : List everything in csv format \-\-list\-json : List everything in json format .EE .PP Here are some typical uses .IP .EX # show an OS ISO download URL for {os} {release} [edition] quickget \-\-url fedora 38 Silverblue # test if an OS ISO is available for {os} {release} [edition] quickget \-\-check nixos unstable plasma5 # open an OS distribution homepage in a browser quickget \-\-open\-homepage ubuntu\-mate # Only download image file into current directory, without creating VM quickget \-\-download elementary 7.1 .EE .PP The \f[CR]\-\-url\f[R], \f[CR]\-\-check\f[R], and \f[CR]\-\-download\f[R] options are fully functional for all operating systems, including Windows and macOS. .PP Further information is available from the project \c .UR https://github.com/quickemu-project/quickemu/wiki/06-Advanced-quickget-features wiki .UE \c .SS Other Operating Systems \f[CR]quickget\f[R] also supports: .IP \[bu] 2 \f[CR]alma\f[R] (AlmaLinux) .IP \[bu] 2 \f[CR]alpine\f[R] (Alpine Linux) .IP \[bu] 2 \f[CR]android\f[R] (Android x86) .IP \[bu] 2 \f[CR]antix\f[R] (Antix) .IP \[bu] 2 \f[CR]archcraft\f[R] (Archcraft) .IP \[bu] 2 \f[CR]archlinux\f[R] (Arch Linux) .IP \[bu] 2 \f[CR]arcolinux\f[R] (Arco Linux) .IP \[bu] 2 \f[CR]artixlinux\f[R] (Artix Linux) .IP \[bu] 2 \f[CR]athenaos\f[R] (Athena OS) .IP \[bu] 2 \f[CR]batocera\f[R] (Batocera) .IP \[bu] 2 \f[CR]bazzite\f[R] (Bazzite) .IP \[bu] 2 \f[CR]biglinux\f[R] (BigLinux) .IP \[bu] 2 \f[CR]blendos\f[R] (BlendOS) .IP \[bu] 2 \f[CR]bodhi\f[R] (Bodhi) .IP \[bu] 2 \f[CR]bunsenlabs\f[R] (BunsenLabs) .IP \[bu] 2 \f[CR]cachyos\f[R] (CachyOS) .IP \[bu] 2 \f[CR]centos\-stream\f[R] (CentOS Stream) .IP \[bu] 2 \f[CR]chimeralinux\f[R] (Chimera Linux) .IP \[bu] 2 \f[CR]crunchbang++\f[R] (Crunchbangplusplus) .IP \[bu] 2 \f[CR]debian\f[R] (Debian) .IP \[bu] 2 \f[CR]deepin\f[R] (Deepin) .IP \[bu] 2 \f[CR]devuan\f[R] (Devuan) .IP \[bu] 2 \f[CR]dragonflybsd\f[R] (DragonFlyBSD) .IP \[bu] 2 \f[CR]easyos\f[R] (EasyOS) .IP \[bu] 2 \f[CR]elementary\f[R] (elementary OS) .IP \[bu] 2 \f[CR]endeavouros\f[R] (EndeavourOS) .IP \[bu] 2 \f[CR]endless\f[R] (Endless OS) .IP \[bu] 2 \f[CR]fedora\f[R] (Fedora) .IP \[bu] 2 \f[CR]freebsd\f[R] (FreeBSD) .IP \[bu] 2 \f[CR]freedos\f[R] (FreeDOS) .IP \[bu] 2 \f[CR]garuda\f[R] (Garuda Linux) .IP \[bu] 2 \f[CR]gentoo\f[R] (Gentoo) .IP \[bu] 2 \f[CR]ghostbsd\f[R] (GhostBSD) .IP \[bu] 2 \f[CR]gnomeos\f[R] (GNOME OS) .IP \[bu] 2 \f[CR]guix\f[R] (Guix) .IP \[bu] 2 \f[CR]haiku\f[R] (Haiku) .IP \[bu] 2 \f[CR]holoiso\f[R] (HoloISO) .IP \[bu] 2 \f[CR]kali\f[R] (Kali) .IP \[bu] 2 \f[CR]kdeneon\f[R] (KDE Neon) .IP \[bu] 2 \f[CR]kolibrios\f[R] (KolibriOS) .IP \[bu] 2 \f[CR]linuxlite\f[R] (Linux Lite) .IP \[bu] 2 \f[CR]linuxmint\f[R] (Linux Mint) .IP \[bu] 2 \f[CR]lmde\f[R] (Linux Mint Debian Edition) .IP \[bu] 2 \f[CR]mageia\f[R] (Mageia) .IP \[bu] 2 \f[CR]manjaro\f[R] (Manjaro) .IP \[bu] 2 \f[CR]mxlinux\f[R] (MX Linux) .IP \[bu] 2 \f[CR]netboot\f[R] (netboot.xyz) .IP \[bu] 2 \f[CR]netbsd\f[R] (NetBSD) .IP \[bu] 2 \f[CR]nitrux\f[R] (Nitrux) .IP \[bu] 2 \f[CR]nixos\f[R] (NixOS) .IP \[bu] 2 \f[CR]nwg\-shell\f[R] (nwg\-shell) .IP \[bu] 2 \f[CR]openbsd\f[R] (OpenBSD) .IP \[bu] 2 \f[CR]openindiana\f[R] (OpenIndiana) .IP \[bu] 2 \f[CR]opensuse\f[R] (openSUSE) .IP \[bu] 2 \f[CR]oraclelinux\f[R] (Oracle Linux) .IP \[bu] 2 \f[CR]parrotsec\f[R] (Parrot Security) .IP \[bu] 2 \f[CR]peppermint\f[R] (PeppermintOS) .IP \[bu] 2 \f[CR]popos\f[R] (Pop!_OS) .IP \[bu] 2 \f[CR]porteus\f[R] (Porteus) .IP \[bu] 2 \f[CR]primtux\f[R] (PrimTux) .IP \[bu] 2 \f[CR]pureos\f[R] (PureOS) .IP \[bu] 2 \f[CR]reactos\f[R] (ReactOS) .IP \[bu] 2 \f[CR]rebornos\f[R] (RebornOS) .IP \[bu] 2 \f[CR]rockylinux\f[R] (Rocky Linux) .IP \[bu] 2 \f[CR]siduction\f[R] (Siduction) .IP \[bu] 2 \f[CR]slackware\f[R] (Slackware) .IP \[bu] 2 \f[CR]slax\f[R] (Slax) .IP \[bu] 2 \f[CR]slint\f[R] (Slint) .IP \[bu] 2 \f[CR]slitaz\f[R] (SliTaz) .IP \[bu] 2 \f[CR]solus\f[R] (Solus) .IP \[bu] 2 \f[CR]sparkylinux\f[R] (SparkyLinux) .IP \[bu] 2 \f[CR]spirallinux\f[R] (SpiralLinux) .IP \[bu] 2 \f[CR]tails\f[R] (Tails) .IP \[bu] 2 \f[CR]tinycore\f[R] (Tiny Core Linux) .IP \[bu] 2 \f[CR]trisquel\f[R] (Trisquel\-) .IP \[bu] 2 \f[CR]truenas\-core\f[R] (TrueNAS Core) .IP \[bu] 2 \f[CR]truenas\-scale\f[R] (TrueNAS Scale) .IP \[bu] 2 \f[CR]tuxedo\-os\f[R] (Tuxedo OS) .IP \[bu] 2 \f[CR]vanillaos\f[R] (Vanilla OS) .IP \[bu] 2 \f[CR]void\f[R] (Void Linux) .IP \[bu] 2 \f[CR]vxlinux\f[R] (VX Linux) .IP \[bu] 2 \f[CR]zorin\f[R] (Zorin OS) .SS \c .UR https://github.com/quickemu-project/quickemu/wiki/02-Create-Linux-virtual-machines#manually-create-linux-guests Custom Linux guests .UE \c Or you can download a Linux image and manually create a VM configuration. .IP \[bu] 2 Download a .iso image of a Linux distribution .IP \[bu] 2 Create a VM configuration file; for example \f[CR]debian\-bullseye.conf\f[R] .IP .EX guest_os=\[dq]linux\[dq] disk_img=\[dq]debian\-bullseye/disk.qcow2\[dq] iso=\[dq]debian\-bullseye/firmware\-11.0.0\-amd64\-DVD\-1.iso\[dq] .EE .IP \[bu] 2 Use \f[CR]quickemu\f[R] to start the virtual machine: .IP .EX quickemu \-\-vm debian\-bullseye.conf .EE .IP \[bu] 2 Complete the installation as normal. .IP \[bu] 2 Post\-install: .RS 2 .IP \[bu] 2 Install the SPICE agent (\f[CR]spice\-vdagent\f[R]) in the guest to enable copy/paste and USB redirection. .IP \[bu] 2 Install the SPICE WebDAV agent (\f[CR]spice\-webdavd\f[R]) in the guest to enable file sharing. .RE .SS Supporting old Linux distros If you want to run an old Linux , from 2016 or earlier, change the \f[CR]guest_os\f[R] to \f[CR]linux_old\f[R]. This will enable the \f[CR]vmware\-svga\f[R] graphics driver which is better supported on older distros. .SS \c .UR https://github.com/quickemu-project/quickemu/wiki/03-Create-macOS-virtual-machines#automatically-create-macos-guests Creating macOS Guests .UE \c \ 🍏 \f[B]Installing macOS in a VM can be a bit finicky, if you encounter problems, \c .UR https://github.com/quickemu-project/quickemu/discussions check the Discussions .UE \c \ for solutions or ask for help there\f[R] 🛟 .PP \f[CR]quickget\f[R] automatically downloads a macOS recovery image and creates a virtual machine configuration. .IP .EX quickget macos big\-sur quickemu \-\-vm macos\-big\-sur.conf .EE .PP macOS \f[CR]mojave\f[R], \f[CR]catalina\f[R], \f[CR]big\-sur\f[R], \f[CR]monterey\f[R], \f[CR]ventura\f[R] and \f[CR]sonoma\f[R] are supported. .IP \[bu] 2 Use cursor keys and enter key to select the \f[B]macOS Base System\f[R] .IP \[bu] 2 From \f[B]macOS Utilities\f[R] .RS 2 .IP \[bu] 2 Click \f[B]Disk Utility\f[R] and \f[B]Continue\f[R] .RS 2 .IP \[bu] 2 Select \f[CR]QEMU HARDDISK Media\f[R] (\[ti]103.08GB) from the list (on Big Sur and above use \f[CR]Apple Inc. VirtIO Block Device\f[R]) and click \f[B]Erase\f[R]. .IP \[bu] 2 Enter a \f[CR]Name:\f[R] for the disk .IP \[bu] 2 If you are installing macOS Mojave or later (Catalina, Big Sur, Monterey, Ventura and Sonoma), choose any of the APFS options as the filesystem. MacOS Extended may not work. .RE .IP \[bu] 2 Click \f[B]Erase\f[R]. .IP \[bu] 2 Click \f[B]Done\f[R]. .IP \[bu] 2 Close Disk Utility .RE .IP \[bu] 2 From \f[B]macOS Utilities\f[R] .RS 2 .IP \[bu] 2 Click \f[B]Reinstall macOS\f[R] and \f[B]Continue\f[R] .RE .IP \[bu] 2 Complete the installation as you normally would. .RS 2 .IP \[bu] 2 On the first reboot use cursor keys and enter key to select \f[B]macOS Installer\f[R] .IP \[bu] 2 On the subsequent reboots use cursor keys and enter key to select the disk you named .RE .IP \[bu] 2 Once you have finished installing macOS you will be presented with an the out\-of\-the\-box first\-start wizard to configure various options and set up your username and password .IP \[bu] 2 OPTIONAL: After you have concluded the out\-of\-the\-box wizard, you may want to enable the TRIM feature that the computer industry created for SSD disks. This feature in our macOS installation will allow QuickEmu to compact (shrink) your macOS disk image whenever you delete files inside the Virtual Machine. Without this step your macOS disk image will only ever get larger and will not shrink even when you delete lots of data inside macOS. .RS 2 .IP \[bu] 2 To enable TRIM, open the Terminal application and type the following command followed by pressing enter to tell macos to use the TRIM command on the hard disk when files are deleted: .RE .IP .EX sudo trimforce enable .EE .PP You will be prompted to enter your account\[aq]s password to gain the privilege needed. Once you\[aq]ve entered your password and pressed enter the command will request confirmation in the form of two questions that require you to type y (for a \[dq]yes\[dq] response) followed by enter to confirm. .PP If you press enter without first typing y the system will consider that a negative response as though you said \[dq]no\[dq]: .IP .EX IMPORTANT NOTICE: This tool force\-enables TRIM for all relevant attached devices, even though such devices may not have been validated for data integrity while using TRIM. Use of this tool to enable TRIM may result in unintended data loss or data corruption. It should not be used in a commercial operating environment or with important data. Before using this tool, you should back up all of your data and regularly back up data while TRIM is enabled. This tool is provided on an \[dq]as is\[dq] basis. APPLE MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF NON\-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING THIS TOOL OR ITS USE ALONE OR IN COMBINATION WITH YOUR DEVICES, SYSTEMS, OR SERVICES. BY USING THIS TOOL TO ENABLE TRIM, YOU AGREE THAT, TO THE EXTENT PERMITTED BY APPLICABLE LAW, USE OF THE TOOL IS AT YOUR SOLE RISK AND THAT THE ENTIRE RISK AS TO SATISFACTORY QUALITY, PERFORMANCE, ACCURACY AND EFFORT IS WITH YOU. Are you sure you with to proceed (y/N)? .EE .PP And a second confirmation once you\[aq]ve confirmed the previous one: .IP .EX Your system will immediately reboot when this is complete. Is this OK (y/N)? .EE .PP As the last message states, your system will automatically reboot as soon as the command completes. .PP The default macOS configuration looks like this: .IP .EX guest_os=\[dq]macos\[dq] img=\[dq]macos\- big\-sur/RecoveryImage.img\[dq] disk_img=\[dq]macos\- big\-sur/disk.qcow2\[dq] macos_release=\[dq] big\-sur\[dq] .EE .IP \[bu] 2 \f[CR]guest_os=\[dq]macos\[dq]\f[R] instructs Quickemu to optimise for macOS. .IP \[bu] 2 \f[CR]macos_release=\[dq] big\-sur\[dq]\f[R] instructs Quickemu to optimise for a particular macOS release. .RS 2 .IP \[bu] 2 For example VirtIO Network and Memory Ballooning are available in Big Sur and newer, but not previous releases. .IP \[bu] 2 And VirtIO Block Media (disks) are supported/stable in Catalina and newer. .RE .SH macOS compatibility There are some considerations when running macOS via Quickemu. .IP \[bu] 2 Supported macOS releases: .RS 2 .IP \[bu] 2 Mojave .IP \[bu] 2 Catalina .IP \[bu] 2 Big Sur .IP \[bu] 2 Monterey .IP \[bu] 2 Ventura .IP \[bu] 2 Sonoma .RE .IP \[bu] 2 \f[CR]quickemu\f[R] will automatically download the required \c .UR https://github.com/acidanthera/OpenCorePkg OpenCore .UE \c \ bootloader and OVMF firmware from \c .UR https://github.com/kholia/OSX-KVM OSX\-KVM .UE \c \&. .IP \[bu] 2 Optimised by default, but no GPU acceleration is available. .RS 2 .IP \[bu] 2 Host CPU vendor is detected and guest CPU is optimised accordingly. .IP \[bu] 2 \c .UR https://www.kraxel.org/blog/2019/06/macos-qemu-guest/ VirtIO Block Media .UE \c \ is used for the system disk where supported. .IP \[bu] 2 \c .UR http://philjordan.eu/osx-virt/ VirtIO \f[CR]usb\-tablet\f[R] .UE \c \ is used for the mouse. .IP \[bu] 2 VirtIO Network (\f[CR]virtio\-net\f[R]) is supported and enabled on macOS Big Sur and newer, but earlier releases use \f[CR]vmxnet3\f[R]. .IP \[bu] 2 VirtIO Memory Ballooning is supported and enabled on macOS Big Sur and newer but disabled for other support macOS releases. .RE .IP \[bu] 2 USB host and SPICE pass\-through is: .RS 2 .IP \[bu] 2 UHCI (USB 2.0) on macOS Catalina and earlier. .IP \[bu] 2 XHCI (USB 3.0) on macOS Big Sur and newer. .RE .IP \[bu] 2 Display resolution can be changed via \f[CR]quickemu\f[R] using \f[CR]\-\-width\f[R] and \f[CR]\-\-height\f[R] command line arguments. .IP \[bu] 2 \f[B]Full Duplex audio requires \c .UR https://github.com/chris1111/VoodooHDA-OC VoodooHDA OC .UE \c \ or pass\-through a USB audio\-device to the macOS guest VM\f[R]. .RS 2 .IP \[bu] 2 NOTE! \c .UR https://disable-gatekeeper.github.io/ Gatekeeper .UE \c \ and \c .UR https://developer.apple.com/documentation/security/disabling_and_enabling_system_integrity_protection System Integrity Protection (SIP) .UE \c \ need to be disabled to install VoodooHDA OC .RE .IP \[bu] 2 File sharing between guest and host is available via \c .UR https://wiki.qemu.org/Documentation/9psetup virtio\-9p .UE \c \ and \c .UR https://gitlab.gnome.org/GNOME/phodav/-/merge_requests/24 SPICE webdavd .UE \c \&. .IP \[bu] 2 Copy/paste via SPICE agent is \f[B]not available on macOS\f[R]. .SH macOS App Store If you see \f[I]\[dq]Your device or computer could not be verified\[dq]\f[R] when you try to login to the App Store, make sure that your wired ethernet device is \f[CR]en0\f[R]. Use \f[CR]ifconfig\f[R] in a terminal to verify this. .PP If the wired ethernet device is not \f[CR]en0\f[R], then then go to \f[I]System Preferences\f[R] \-> \f[I]Network\f[R], delete all the network devices and apply the changes. Next, open a terminal and run the following: .IP .EX sudo rm /Library/Preferences/SystemConfiguration/NetworkInterfaces.plist .EE .PP Now reboot, and the App Store should work. .PP There may be further advice and information about macOS guests in the project \c .UR https://github.com/quickemu-project/quickemu/wiki/03-Create-macOS-virtual-machines#automatically-create-macos-guests wiki .UE \c \&. .SS \c .UR https://github.com/quickemu-project/quickemu/wiki/04-Create-Windows-virtual-machines Creating Windows guests .UE \c \ 🪟 \f[CR]quickget\f[R] can download \c .UR https://www.microsoft.com/software-download/windows10 \f[B]Windows 10\f[R] .UE \c \ and \c .UR https://www.microsoft.com/software-download/windows11 \f[B]Windows 11\f[R] .UE \c \ automatically and create an optimised virtual machine configuration. This configuration also includes the \c .UR https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/ VirtIO drivers for Windows .UE \c \&. .PP \f[B]Windows 8.1\f[R] is also supported but doesn\[aq]t feature any automated installation or driver optimisation. .PP \f[CR]quickget\f[R] can also download \c .UR https://www.microsoft.com/en-us/evalcenter/download-windows-10-enterprise Windows 10 LTSC .UE \c \ and Windows Server \c .UR https://www.microsoft.com/en-us/evalcenter/download-windows-server-2012-r2 2012\-r2 .UE \c , \c .UR https://www.microsoft.com/en-us/evalcenter/download-windows-server-2016 2016 .UE \c , \c .UR https://www.microsoft.com/en-us/evalcenter/download-windows-server-2019 2019 .UE \c , and \c .UR https://www.microsoft.com/en-us/evalcenter/download-windows-server-2022 2022 .UE \c \&. No automated installation is supported for these releases. .IP .EX quickget windows 11 quickemu \-\-vm windows\-11.conf .EE .IP \[bu] 2 Complete the installation as you normally would. .IP \[bu] 2 All relevant drivers and services should be installed automatically. .IP \[bu] 2 A local administrator user account is automatically created, with these credentials: .RS 2 .IP \[bu] 2 Username: \f[CR]Quickemu\f[R] .IP \[bu] 2 Password: \f[CR]quickemu\f[R] .RE .PP Further information is available from the project \c .UR https://github.com/quickemu-project/quickemu/wiki/04-Create-Windows-virtual-machines wiki .UE \c .SS Configuration Here are the usage instructions: .IP .EX Usage quickemu \-\-vm ubuntu.conf Arguments \-\-access : Enable remote spice access support. \[aq]local\[aq] (default), \[aq]remote\[aq], \[aq]clientipaddress\[aq] \-\-braille : Enable braille support. Requires SDL. \-\-delete\-disk : Delete the disk image and EFI variables \-\-delete\-vm : Delete the entire VM and its configuration \-\-display : Select display backend. \[aq]sdl\[aq] (default), \[aq]cocoa\[aq], \[aq]gtk\[aq], \[aq]none\[aq], \[aq]spice\[aq] or \[aq]spice\-app\[aq] \-\-fullscreen : Starts VM in full screen mode (Ctl+Alt+f to exit) \-\-ignore\-msrs\-always : Configure KVM to always ignore unhandled machine\-specific registers \-\-kill : Kill the VM process if it is running \-\-offline : Override all network settings and start the VM offline \-\-shortcut : Create a desktop shortcut \-\-snapshot apply : Apply/restore a snapshot. \-\-snapshot create : Create a snapshot. \-\-snapshot delete : Delete a snapshot. \-\-snapshot info : Show disk/snapshot info. \-\-status\-quo : Do not commit any changes to disk/snapshot. \-\-viewer : Choose an alternative viewer. \[at]Options: \[aq]spicy\[aq] (default), \[aq]remote\-viewer\[aq], \[aq]none\[aq] \-\-width : Set VM screen width; requires \[aq]\-\-height\[aq] \-\-height : Set VM screen height; requires \[aq]\-\-width\[aq] \-\-ssh\-port : Set SSH port manually \-\-spice\-port : Set SPICE port manually \-\-public\-dir : Expose share directory. \[at]Options: \[aq]\[aq] (default: xdg\-user\-dir PUBLICSHARE), \[aq]\[aq], \[aq]none\[aq] \-\-monitor : Set monitor connection type. \[at]Options: \[aq]socket\[aq] (default), \[aq]telnet\[aq], \[aq]none\[aq] \-\-monitor\-telnet\-host : Set telnet host for monitor. (default: \[aq]localhost\[aq]) \-\-monitor\-telnet\-port : Set telnet port for monitor. (default: \[aq]4440\[aq]) \-\-monitor\-cmd : Send command to monitor if available. (Example: system_powerdown) \-\-serial : Set serial connection type. \[at]Options: \[aq]socket\[aq] (default), \[aq]telnet\[aq], \[aq]none\[aq] \-\-serial\-telnet\-host : Set telnet host for serial. (default: \[aq]localhost\[aq]) \-\-serial\-telnet\-port : Set telnet port for serial. (default: \[aq]6660\[aq]) \-\-keyboard : Set keyboard. \[at]Options: \[aq]usb\[aq] (default), \[aq]ps2\[aq], \[aq]virtio\[aq] \-\-keyboard_layout : Set keyboard layout: \[aq]en\-us\[aq] (default) \-\-mouse : Set mouse. \[at]Options: \[aq]tablet\[aq] (default), \[aq]ps2\[aq], \[aq]usb\[aq], \[aq]virtio\[aq] \-\-usb\-controller : Set usb\-controller. \[at]Options: \[aq]ehci\[aq] (default), \[aq]xhci\[aq], \[aq]none\[aq] \-\-sound\-card : Set sound card. \[at]Options: \[aq]intel\-hda\[aq] (default), \[aq]ac97\[aq], \[aq]es1370\[aq], \[aq]sb16\[aq], \[aq]usb\-audio\[aq], \[aq]none\[aq] \-\-sound\-duplex : Set sound card duplex. \[at]Options: \[aq]hda\-micro\[aq] (default: speaker/mic), \[aq]hda\-duplex\[aq] (line\-in/line\-out), \[aq]hda\-output\[aq] (output\-only) \-\-extra_args : Pass additional arguments to qemu \-\-version : Print version .EE .SS Desktop shortcuts Desktop shortcuts can be created for a VM, the shortcuts are saved in \f[CR]\[ti]/.local/share/applications\f[R]. Here is an example of how to create a shortcut. .IP .EX quickemu \-\-vm ubuntu\-22.04\-desktop.conf \-\-shortcut .EE .SS References Useful reference that assisted the development of Quickemu. .IP \[bu] 2 General .RS 2 .IP \[bu] 2 \c .UR https://qemu.readthedocs.io/en/latest/ QEMU\[aq]s documentation! .UE \c .IP \[bu] 2 \c .UR https://pve.proxmox.com/wiki/Qemu/KVM_Virtual_Machines .UE \c .IP \[bu] 2 \c .UR https://www.kraxel.org/blog/2020/01/qemu-sound-audiodev/ .UE \c .RE .IP \[bu] 2 macOS .RS 2 .IP \[bu] 2 \c .UR https://www.nicksherlock.com/2020/06/installing-macos-big-sur-on-proxmox/ .UE \c .IP \[bu] 2 \c .UR https://passthroughpo.st/mac-os-adds-early-support-for-virtio-qemu/ .UE \c .IP \[bu] 2 \c .UR https://github.com/kholia/OSX-KVM .UE \c .IP \[bu] 2 \c .UR https://github.com/thenickdude/KVM-Opencore .UE \c .IP \[bu] 2 \c .UR https://gist.github.com/MCJack123/943eaca762730ca4b7ae460b731b68e7 .UE \c .IP \[bu] 2 \c .UR https://github.com/acidanthera/OpenCorePkg/tree/master/Utilities/macrecovery .UE \c .IP \[bu] 2 \c .UR https://www.kraxel.org/blog/2017/09/running-macos-as-guest-in-kvm/ .UE \c .IP \[bu] 2 \c .UR https://www.nicksherlock.com/2017/10/passthrough-of-advanced-cpu-features-for-macos-high-sierra-guests/ .UE \c .IP \[bu] 2 \c .UR http://philjordan.eu/osx-virt/ .UE \c .IP \[bu] 2 \c .UR https://github.com/Dids/clover-builder .UE \c .IP \[bu] 2 \c .UR https://mackie100projects.altervista.org OpenCore Configurator .UE \c .RE .IP \[bu] 2 Windows .RS 2 .IP \[bu] 2 \c .UR https://www.heiko-sieger.info/running-windows-10-on-linux-using-kvm-with-vga-passthrough/ .UE \c .IP \[bu] 2 \c .UR https://leduccc.medium.com/improving-the-performance-of-a-windows-10-guest-on-qemu-a5b3f54d9cf5 .UE \c .IP \[bu] 2 \c .UR https://frontpagelinux.com/tutorials/how-to-use-linux-kvm-to-optimize-your-windows-10-virtual-machine/ .UE \c .IP \[bu] 2 \c .UR https://turlucode.com/qemu-command-line-args/ .UE \c .IP \[bu] 2 \c .UR https://github.com/pbatard/Fido .UE \c .IP \[bu] 2 \c .UR https://www.catapultsystems.com/blogs/create-zero-touch-windows-10-iso/ .UE \c .RE .IP \[bu] 2 TPM .RS 2 .IP \[bu] 2 \c .UR https://qemu-project.gitlab.io/qemu/specs/tpm.html .UE \c .IP \[bu] 2 \c .UR https://www.tecklyfe.com/how-to-create-a-windows-11-virtual-machine-in-qemu/ .UE \c .RE .IP \[bu] 2 9p & virtiofs .RS 2 .IP \[bu] 2 \c .UR https://wiki.qemu.org/Documentation/9p .UE \c .IP \[bu] 2 \c .UR https://wiki.qemu.org/Documentation/9psetup .UE \c .IP \[bu] 2 \c .UR https://www.kraxel.org/blog/2019/06/macos-qemu-guest/ .UE \c .IP \[bu] 2 \c .UR https://superuser.com/questions/628169/how-to-share-a-directory-with-the-host-without-networking-in-qemu .UE \c .IP \[bu] 2 \c .UR https://virtio-fs.gitlab.io/ .UE \c .RE .SH AUTHORS Written by Martin Wimpress. .SH BUGS Submit bug reports online at: \c .UR https://github.com/quickemu-project/quickemu/issues .UE \c .SH SEE ALSO Full sources at: \c .UR https://github.com/quickemu-project/quickemu .UE \c .PP quickemu_conf(5), quickget(1), quickgui(1) .SH AUTHORS Martin Wimpress. quickemu-4.9.7/docs/quickemu.1.md000066400000000000000000000761611473451027600166360ustar00rootroot00000000000000--- author: Martin Wimpress date: August 2, 2024 footer: quickemu header: Quickemu User Manual section: 1 title: QUICKEMU --- # NAME quickemu - A quick VM builder and manager # SYNOPSIS **quickemu** \[*OPTION*\]... # DESCRIPTION **quickemu** will create and run highly optimised desktop virtual machines for Linux, macOS and Windows # OPTIONS **--vm** : vm configuration file You can also pass optional parameters **--access** : Enable remote spice access support. 'local' (default), 'remote', 'clientipaddress' **--braille** : Enable braille support. Requires SDL. **--delete-disk** : Delete the disk image and EFI variables **--delete-vm** : Delete the entire VM and its configuration **--display** : Select display backend. 'sdl' (default), 'gtk', 'none', 'spice' or 'spice-app' **--fullscreen** : Starts VM in full screen mode (Ctl+Alt+f to exit) **--ignore-msrs-always** : Configure KVM to always ignore unhandled machine-specific registers **--kill** : Kill the VM process if it is running **--offline** : Override all network settings and start the VM offline **--shortcut** : Create a desktop shortcut **--snapshot apply \** : Apply/restore a snapshot. **--snapshot create \** : Create a snapshot. **--snapshot delete \** : Delete a snapshot. **--snapshot info** : Show disk/snapshot info. **--status-quo** : Do not commit any changes to disk/snapshot. **--viewer \** : Choose an alternative viewer. @Options: 'spicy' (default), 'remote-viewer', 'none' **--width \** : Set VM screen width; requires '--height' **--height \** : Set VM screen height; requires '--width' **--ssh-port \** : Set SSH port manually **--spice-port \** : Set SPICE port manually **--public-dir \** : Expose share directory. @Options: '' (default: xdg-user-dir PUBLICSHARE), '', 'none' **--monitor \** : Set monitor connection type. @Options: 'socket' (default), 'telnet', 'none' **--monitor-telnet-host \** : Set telnet host for monitor. (default: 'localhost') **--monitor-telnet-port \** : Set telnet port for monitor. (default: '4440') **--monitor-cmd \** : Send command to monitor if available. (Example: system_powerdown) **--serial \** : Set serial connection type. @Options: 'socket' (default), 'telnet', 'none' **--serial-telnet-host \** : Set telnet host for serial. (default: 'localhost') **--serial-telnet-port \** : Set telnet port for serial. (default: '6660') **--keyboard \** : Set keyboard. @Options: 'usb' (default), 'ps2', 'virtio' **--keyboard_layout \** : Set keyboard layout: 'en-us' (default) **--mouse \** : Set mouse. @Options: 'tablet' (default), 'ps2', 'usb', 'virtio' **--usb-controller \** : Set usb-controller. @Options: 'ehci' (default), 'xhci', 'none' **--sound-card \** : Set sound card. @Options: 'intel-hda' (default), 'ac97', 'es1370', 'sb16', 'none' **--extra_args \** : Pass additional arguments to qemu **--version** : Print version # EXAMPLES **quickemu --vm ubuntu-mate-22.04.conf** : Launches the VM specified in the file *ubuntu-mate-22.04.conf* # Introduction **Quickemu** is a wrapper for the excellent [QEMU](https://www.qemu.org/) that automatically *"does the right thing"* when creating virtual machines. No requirement for exhaustive configuration options. You decide what operating system you want to run and Quickemu takes care of the rest 🤖 - `quickget` **automatically downloads the upstream OS** and creates the configuration 📀 - `quickemu` enumerates your hardware and launches the virtual machine with the **optimum configuration best suited to your computer** ⚡️ The original objective of the project was to [enable quick testing of Linux distributions](https://github.com/quickemu-project/quickemu/wiki/02-Create-Linux-virtual-machines) where the virtual machines and their configuration can be stored anywhere (such as external USB storage or your home directory) and no elevated permissions are required to run the virtual machines. **Today, Quickemu includes comprehensive support for [macOS](https://github.com/quickemu-project/quickemu/wiki/03-Create-macOS-virtual-machines), [Windows](https://github.com/quickemu-project/quickemu/wiki/04-Create-Windows-virtual-machines)**, most of the BSDs, novel non-Linux operating systems such as FreeDOS, Haiku, KolibriOS, OpenIndiana, ReactOS, and more. # Features - Host support for **Linux and macOS** - **macOS** Sonoma, Ventura, Monterey, Big Sur, Catalina & Mojave - **Windows** 10 and 11 including TPM 2.0 - **Windows Server** 2022 2019 2016 - [Ubuntu](https://ubuntu.com/desktop) and all the **[official Ubuntu flavours](https://ubuntu.com/download/flavours)** - **Nearly 1000 operating system editions are supported!** - Full SPICE support including host/guest clipboard sharing - VirtIO-webdavd file sharing for Linux and Windows guests - VirtIO-9p file sharing for Linux and macOS guests - [QEMU Guest Agent support](https://wiki.qemu.org/Features/GuestAgent); provides access to a system-level agent via standard QMP commands - Samba file sharing for Linux, macOS and Windows guests (*if `smbd` is installed on the host*) - VirGL acceleration - USB device pass-through - Smartcard pass-through - Automatic SSH port forwarding to guests - Network port forwarding - Full duplex audio - Braille support - EFI (with or without SecureBoot) and Legacy BIOS boot ## As featured on [Linux Matters](https://linuxmatters.sh) podcast! The presenters of Linux Matters 🐧🎙️ are the creators of each of the principle Quickemu projects. We discussed Quickemu's 2024 reboot in [Episode 30 - Quickemu Rising From the Bashes](https://linuxmatters.sh/30).
Linux Matters Podcast
Linux Matters Podcast
When installing from source, you will need to install the following requirements manually: - [QEMU](https://www.qemu.org/) (*6.0.0 or newer*) **with GTK, SDL, SPICE & VirtFS support** - [bash](https://www.gnu.org/software/bash/) (*4.0 or newer*) - [Coreutils](https://www.gnu.org/software/coreutils/) - [curl](https://curl.se/) - [EDK II](https://github.com/tianocore/edk2) - [gawk](https://www.gnu.org/software/gawk/) - [grep](https://www.gnu.org/software/grep/) - [glxinfo](https://gitlab.freedesktop.org/mesa/demos) - [jq](https://stedolan.github.io/jq/) - [LSB](https://wiki.linuxfoundation.org/lsb/start) - [pciutils](https://github.com/pciutils/pciutils) - [procps](https://gitlab.com/procps-ng/procps) - [python3](https://www.python.org/) - [mkisofs](http://cdrtools.sourceforge.net/private/cdrecord.html) - [usbutils](https://github.com/gregkh/usbutils) - [util-linux](https://github.com/karelzak/util-linux); including `uuidgen` - [sed](https://www.gnu.org/software/sed/) - [socat](http://www.dest-unreach.org/socat/) - [spicy](https://gitlab.freedesktop.org/spice/spice-gtk) - [swtpm](https://github.com/stefanberger/swtpm) - [xdg-user-dirs](https://www.freedesktop.org/wiki/Software/xdg-user-dirs/) - [xrandr](https://gitlab.freedesktop.org/xorg/app/xrandr) - [zsync](http://zsync.moria.org.uk/) - [unzip](http://www.info-zip.org/UnZip.html) For Ubuntu, Arch and NixOS hosts, the [ppa](https://launchpad.net/~flexiondotorg/+archive/ubuntu/quickemu), [AUR](https://aur.archlinux.org/packages/quickemu) or [nix](https://github.com/NixOS/nixpkgs/tree/master/pkgs/development/quickemu) packaging will take care of the dependencies. For other host distributions or operating systems it will be necessary to install the above requirements or their equivalents. These examples may save a little typing: #### Install requirements on Debian hosts This also applies to derivatives: ``` shell sudo apt-get install bash coreutils curl genisoimage grep jq mesa-utils ovmf pciutils procps python3 qemu sed socat spice-client-gtk swtpm-tools unzip usbutils util-linux xdg-user-dirs xrandr zsync ``` #### Install requirements on Fedora hosts ``` shell sudo dnf install bash coreutils curl edk2-tools genisoimage grep jq mesa-demos pciutils procps python3 qemu sed socat spice-gtk-tools swtpm unzip usbutils util-linux uuidgen-runtime xdg-user-dirs xrandr zsync ``` ### Install requirements on Gentoo Please note that you may have to use `sys-firmware/edk2-ovmf` instead of `sys-firmware/edk2-ovmf-bin` - depending on how your system is configured. ``` shell sudo emerge --ask --noreplace app-emulation/qemu \ app-shells/bash \ sys-apps/coreutils \ net-misc/curl \ sys-firmware/edk2-ovmf-bin \ sys-apps/gawk \ sys-apps/grep \ x11-apps/mesa-progs \ app-misc/jq \ sys-apps/pciutils \ sys-process/procps \ app-cdr/cdrtools \ sys-apps/usbutils \ sys-apps/util-linux \ sys-apps/sed \ net-misc/socat \ app-emulation/spice \ app-crypt/swtpm \ x11-misc/xdg-user-dirs \ x11-apps/xrandr \ net-misc/zsync \ app-arch/unzip ``` #### Install requirements on macOS hosts Install the Quickemu requirements using brew: ``` shell brew install bash cdrtools coreutils jq python3 qemu usbutils samba socat swtpm zsync ``` Now clone the project: ``` shell git clone https://github.com/quickemu-project/quickemu cd quickemu ``` ## [Alternative Frontends](https://github.com/quickemu-project/quickemu/wiki/07-Alternative-frontends) ### Quickgui While `quickemu` and `quickget` are designed for the terminal, a graphical user interface is also available: - **[Quickgui](https://github.com/quickemu-project/quickgui)** by [Mark Johnson](https://github.com/marxjohnson) and [Yannick Mauray](https://github.com/ymauray). To install Quickgui on Ubuntu: ``` shell sudo add-apt-repository ppa:yannick-mauray/quickgui sudo apt update sudo apt install quickgui ``` Many thanks to [Luke Wesley-Holley](https://github.com/Lukewh) and [Philipp Kiemle](https://github.com/daPhipz) for creating the **[Quickemu icons](https://github.com/Lukewh/quickemu-icons)** 🎨 ## Creating Linux guests 🐧 ### Ubuntu `quickget` will automatically download an Ubuntu release and create the virtual machine configuration. ``` shell quickget ubuntu 22.04 quickemu --vm ubuntu-22.04.conf ``` - Complete the installation as normal. - Post-install: - Install the SPICE agent (`spice-vdagent`) in the guest to enable copy/paste and USB redirection - `sudo apt install spice-vdagent` - Install the SPICE WebDAV agent (`spice-webdavd`) in the guest to enable file sharing. - `sudo apt install spice-webdavd` ### Ubuntu daily-live images `quickget` can also download/refresh daily-live images via `zsync` for Ubuntu developers and testers. ``` shell quickget ubuntu daily-live quickemu --vm ubuntu-daily-live.conf ``` You can run `quickget ubuntu daily-live` to refresh your daily development image as often as you like, it will even automatically switch to a new series. ### Ubuntu Flavours All the official Ubuntu flavours are supported, just replace `ubuntu` with your preferred flavour. The project [wiki](https://github.com/quickemu-project/quickemu/wiki/02-Create-Linux-virtual-machines) may have further information. - `edubuntu` (Edubuntu) - `kubuntu` (Kubuntu) - `lubuntu` (Lubuntu) - `ubuntu-budgie` (Ubuntu Budgie) - `ubuntucinnamon` (Ubuntu Cinnamon) - `ubuntukylin` (Ubuntu Kylin) - `ubuntu-mate` (Ubuntu MATE) - `ubuntu-server` (Ubuntu Server) - `ubuntustudio` (Ubuntu Studio) - `ubuntu` (Ubuntu) - `ubuntu-unity` (Ubuntu Unity) - `xubuntu` (Xubuntu) You can also use `quickget` with advanced options : ``` text --download [edition] : Download image; no VM configuration --create-config [path/url] [flags] : Create VM config for an OS image --open-homepage : Open homepage for the OS --show [os] : Show OS information --version : Show version --help : Show this help message --disable-unattended : Force quickget not to set up an unattended installation --url [os] [release] [edition] : Show image URL(s) --check [os] [release] [edition] : Check image URL(s) --list : List all supported systems --list-csv : List everything in csv format --list-json : List everything in json format ``` Here are some typical uses ``` shell # show an OS ISO download URL for {os} {release} [edition] quickget --url fedora 38 Silverblue # test if an OS ISO is available for {os} {release} [edition] quickget --check nixos unstable plasma5 # open an OS distribution homepage in a browser quickget --open-homepage ubuntu-mate # Only download image file into current directory, without creating VM quickget --download elementary 7.1 ``` The `--url`, `--check`, and `--download` options are fully functional for all operating systems, including Windows and macOS. Further information is available from the project [wiki](https://github.com/quickemu-project/quickemu/wiki/06-Advanced-quickget-features) ### Other Operating Systems `quickget` also supports: - `alma` (AlmaLinux) - `alpine` (Alpine Linux) - `android` (Android x86) - `antix` (Antix) - `archcraft` (Archcraft) - `archlinux` (Arch Linux) - `arcolinux` (Arco Linux) - `artixlinux` (Artix Linux) - `athenaos` (Athena OS) - `batocera` (Batocera) - `bazzite` (Bazzite) - `biglinux` (BigLinux) - `blendos` (BlendOS) - `bodhi` (Bodhi) - `bunsenlabs` (BunsenLabs) - `cachyos` (CachyOS) - `centos-stream` (CentOS Stream) - `chimeralinux` (Chimera Linux) - `crunchbang++` (Crunchbangplusplus) - `debian` (Debian) - `deepin` (Deepin) - `devuan` (Devuan) - `dragonflybsd` (DragonFlyBSD) - `easyos` (EasyOS) - `elementary` (elementary OS) - `endeavouros` (EndeavourOS) - `endless` (Endless OS) - `fedora` (Fedora) - `freebsd` (FreeBSD) - `freedos` (FreeDOS) - `garuda` (Garuda Linux) - `gentoo` (Gentoo) - `ghostbsd` (GhostBSD) - `gnomeos` (GNOME OS) - `guix` (Guix) - `haiku` (Haiku) - `holoiso` (HoloISO) - `kali` (Kali) - `kdeneon` (KDE Neon) - `kolibrios` (KolibriOS) - `linuxlite` (Linux Lite) - `linuxmint` (Linux Mint) - `lmde` (Linux Mint Debian Edition) - `mageia` (Mageia) - `manjaro` (Manjaro) - `mxlinux` (MX Linux) - `netboot` (netboot.xyz) - `netbsd` (NetBSD) - `nitrux` (Nitrux) - `nixos` (NixOS) - `nwg-shell` (nwg-shell) - `openbsd` (OpenBSD) - `openindiana` (OpenIndiana) - `opensuse` (openSUSE) - `oraclelinux` (Oracle Linux) - `parrotsec` (Parrot Security) - `peppermint` (PeppermintOS) - `popos` (Pop!\_OS) - `porteus` (Porteus) - `primtux` (PrimTux) - `pureos` (PureOS) - `reactos` (ReactOS) - `rebornos` (RebornOS) - `rockylinux` (Rocky Linux) - `siduction` (Siduction) - `slackware` (Slackware) - `slax` (Slax) - `slint` (Slint) - `slitaz` (SliTaz) - `solus` (Solus) - `sparkylinux` (SparkyLinux) - `spirallinux` (SpiralLinux) - `tails` (Tails) - `tinycore` (Tiny Core Linux) - `trisquel` (Trisquel-) - `truenas-core` (TrueNAS Core) - `truenas-scale` (TrueNAS Scale) - `tuxedo-os` (Tuxedo OS) - `vanillaos` (Vanilla OS) - `void` (Void Linux) - `vxlinux` (VX Linux) - `zorin` (Zorin OS) ### [Custom Linux guests](https://github.com/quickemu-project/quickemu/wiki/02-Create-Linux-virtual-machines#manually-create-linux-guests) Or you can download a Linux image and manually create a VM configuration. - Download a .iso image of a Linux distribution - Create a VM configuration file; for example `debian-bullseye.conf` ``` shell guest_os="linux" disk_img="debian-bullseye/disk.qcow2" iso="debian-bullseye/firmware-11.0.0-amd64-DVD-1.iso" ``` - Use `quickemu` to start the virtual machine: ``` shell quickemu --vm debian-bullseye.conf ``` - Complete the installation as normal. - Post-install: - Install the SPICE agent (`spice-vdagent`) in the guest to enable copy/paste and USB redirection. - Install the SPICE WebDAV agent (`spice-webdavd`) in the guest to enable file sharing. ## Supporting old Linux distros If you want to run an old Linux , from 2016 or earlier, change the `guest_os` to `linux_old`. This will enable the `vmware-svga` graphics driver which is better supported on older distros. ## [Creating macOS Guests](https://github.com/quickemu-project/quickemu/wiki/03-Create-macOS-virtual-machines#automatically-create-macos-guests) 🍏 **Installing macOS in a VM can be a bit finicky, if you encounter problems, [check the Discussions](https://github.com/quickemu-project/quickemu/discussions) for solutions or ask for help there** 🛟 `quickget` automatically downloads a macOS recovery image and creates a virtual machine configuration. ``` shell quickget macos big-sur quickemu --vm macos-big-sur.conf ``` macOS `mojave`, `catalina`, `big-sur`, `monterey`, `ventura` and `sonoma` are supported. - Use cursor keys and enter key to select the **macOS Base System** - From **macOS Utilities** - Click **Disk Utility** and **Continue** - Select `QEMU HARDDISK Media` (~103.08GB) from the list (on Big Sur and above use `Apple Inc. VirtIO Block Device`) and click **Erase**. - Enter a `Name:` for the disk - If you are installing macOS Mojave or later (Catalina, Big Sur, Monterey, Ventura and Sonoma), choose any of the APFS options as the filesystem. MacOS Extended may not work. - Click **Erase**. - Click **Done**. - Close Disk Utility - From **macOS Utilities** - Click **Reinstall macOS** and **Continue** - Complete the installation as you normally would. - On the first reboot use cursor keys and enter key to select **macOS Installer** - On the subsequent reboots use cursor keys and enter key to select the disk you named - Once you have finished installing macOS you will be presented with an the out-of-the-box first-start wizard to configure various options and set up your username and password - OPTIONAL: After you have concluded the out-of-the-box wizard, you may want to enable the TRIM feature that the computer industry created for SSD disks. This feature in our macOS installation will allow QuickEmu to compact (shrink) your macOS disk image whenever you delete files inside the Virtual Machine. Without this step your macOS disk image will only ever get larger and will not shrink even when you delete lots of data inside macOS. - To enable TRIM, open the Terminal application and type the following command followed by pressing enter to tell macos to use the TRIM command on the hard disk when files are deleted: ``` shell sudo trimforce enable ``` You will be prompted to enter your account's password to gain the privilege needed. Once you've entered your password and pressed enter the command will request confirmation in the form of two questions that require you to type y (for a "yes" response) followed by enter to confirm. If you press enter without first typing y the system will consider that a negative response as though you said "no": ``` plain IMPORTANT NOTICE: This tool force-enables TRIM for all relevant attached devices, even though such devices may not have been validated for data integrity while using TRIM. Use of this tool to enable TRIM may result in unintended data loss or data corruption. It should not be used in a commercial operating environment or with important data. Before using this tool, you should back up all of your data and regularly back up data while TRIM is enabled. This tool is provided on an "as is" basis. APPLE MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING THIS TOOL OR ITS USE ALONE OR IN COMBINATION WITH YOUR DEVICES, SYSTEMS, OR SERVICES. BY USING THIS TOOL TO ENABLE TRIM, YOU AGREE THAT, TO THE EXTENT PERMITTED BY APPLICABLE LAW, USE OF THE TOOL IS AT YOUR SOLE RISK AND THAT THE ENTIRE RISK AS TO SATISFACTORY QUALITY, PERFORMANCE, ACCURACY AND EFFORT IS WITH YOU. Are you sure you with to proceed (y/N)? ``` And a second confirmation once you've confirmed the previous one: ``` plain Your system will immediately reboot when this is complete. Is this OK (y/N)? ``` As the last message states, your system will automatically reboot as soon as the command completes. The default macOS configuration looks like this: ``` shell guest_os="macos" img="macos- big-sur/RecoveryImage.img" disk_img="macos- big-sur/disk.qcow2" macos_release=" big-sur" ``` - `guest_os="macos"` instructs Quickemu to optimise for macOS. - `macos_release=" big-sur"` instructs Quickemu to optimise for a particular macOS release. - For example VirtIO Network and Memory Ballooning are available in Big Sur and newer, but not previous releases. - And VirtIO Block Media (disks) are supported/stable in Catalina and newer. # macOS compatibility There are some considerations when running macOS via Quickemu. - Supported macOS releases: - Mojave - Catalina - Big Sur - Monterey - Ventura - Sonoma - `quickemu` will automatically download the required [OpenCore](https://github.com/acidanthera/OpenCorePkg) bootloader and OVMF firmware from [OSX-KVM](https://github.com/kholia/OSX-KVM). - Optimised by default, but no GPU acceleration is available. - Host CPU vendor is detected and guest CPU is optimised accordingly. - [VirtIO Block Media](https://www.kraxel.org/blog/2019/06/macos-qemu-guest/) is used for the system disk where supported. - [VirtIO `usb-tablet`](http://philjordan.eu/osx-virt/) is used for the mouse. - VirtIO Network (`virtio-net`) is supported and enabled on macOS Big Sur and newer, but earlier releases use `vmxnet3`. - VirtIO Memory Ballooning is supported and enabled on macOS Big Sur and newer but disabled for other support macOS releases. - USB host and SPICE pass-through is: - UHCI (USB 2.0) on macOS Catalina and earlier. - XHCI (USB 3.0) on macOS Big Sur and newer. - Display resolution can be changed via `quickemu` using `--width` and `--height` command line arguments. - **Full Duplex audio requires [VoodooHDA OC](https://github.com/chris1111/VoodooHDA-OC) or pass-through a USB audio-device to the macOS guest VM**. - NOTE! [Gatekeeper](https://disable-gatekeeper.github.io/) and [System Integrity Protection (SIP)](https://developer.apple.com/documentation/security/disabling_and_enabling_system_integrity_protection) need to be disabled to install VoodooHDA OC - File sharing between guest and host is available via [virtio-9p](https://wiki.qemu.org/Documentation/9psetup) and [SPICE webdavd](https://gitlab.gnome.org/GNOME/phodav/-/merge_requests/24). - Copy/paste via SPICE agent is **not available on macOS**. # macOS App Store If you see *"Your device or computer could not be verified"* when you try to login to the App Store, make sure that your wired ethernet device is `en0`. Use `ifconfig` in a terminal to verify this. If the wired ethernet device is not `en0`, then then go to *System Preferences* -\> *Network*, delete all the network devices and apply the changes. Next, open a terminal and run the following: ``` shell sudo rm /Library/Preferences/SystemConfiguration/NetworkInterfaces.plist ``` Now reboot, and the App Store should work. There may be further advice and information about macOS guests in the project [wiki](https://github.com/quickemu-project/quickemu/wiki/03-Create-macOS-virtual-machines#automatically-create-macos-guests). ## [Creating Windows guests](https://github.com/quickemu-project/quickemu/wiki/04-Create-Windows-virtual-machines) 🪟 `quickget` can download [**Windows 10**](https://www.microsoft.com/software-download/windows10) and [**Windows 11**](https://www.microsoft.com/software-download/windows11) automatically and create an optimised virtual machine configuration. This configuration also includes the [VirtIO drivers for Windows](https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/). **Windows 8.1** is also supported but doesn't feature any automated installation or driver optimisation. `quickget` can also download [Windows 10 LTSC](https://www.microsoft.com/en-us/evalcenter/download-windows-10-enterprise) and Windows Server [2012-r2](https://www.microsoft.com/en-us/evalcenter/download-windows-server-2012-r2), [2016](https://www.microsoft.com/en-us/evalcenter/download-windows-server-2016), [2019](https://www.microsoft.com/en-us/evalcenter/download-windows-server-2019), and [2022](https://www.microsoft.com/en-us/evalcenter/download-windows-server-2022). No automated installation is supported for these releases. ``` shell quickget windows 11 quickemu --vm windows-11.conf ``` - Complete the installation as you normally would. - All relevant drivers and services should be installed automatically. - A local administrator user account is automatically created, with these credentials: - Username: `Quickemu` - Password: `quickemu` Further information is available from the project [wiki](https://github.com/quickemu-project/quickemu/wiki/04-Create-Windows-virtual-machines) ## Configuration Here are the usage instructions: ``` text Usage quickemu --vm ubuntu.conf Arguments --access : Enable remote spice access support. 'local' (default), 'remote', 'clientipaddress' --braille : Enable braille support. Requires SDL. --delete-disk : Delete the disk image and EFI variables --delete-vm : Delete the entire VM and its configuration --display : Select display backend. 'sdl' (default), 'cocoa', 'gtk', 'none', 'spice' or 'spice-app' --fullscreen : Starts VM in full screen mode (Ctl+Alt+f to exit) --ignore-msrs-always : Configure KVM to always ignore unhandled machine-specific registers --kill : Kill the VM process if it is running --offline : Override all network settings and start the VM offline --shortcut : Create a desktop shortcut --snapshot apply : Apply/restore a snapshot. --snapshot create : Create a snapshot. --snapshot delete : Delete a snapshot. --snapshot info : Show disk/snapshot info. --status-quo : Do not commit any changes to disk/snapshot. --viewer : Choose an alternative viewer. @Options: 'spicy' (default), 'remote-viewer', 'none' --width : Set VM screen width; requires '--height' --height : Set VM screen height; requires '--width' --ssh-port : Set SSH port manually --spice-port : Set SPICE port manually --public-dir : Expose share directory. @Options: '' (default: xdg-user-dir PUBLICSHARE), '', 'none' --monitor : Set monitor connection type. @Options: 'socket' (default), 'telnet', 'none' --monitor-telnet-host : Set telnet host for monitor. (default: 'localhost') --monitor-telnet-port : Set telnet port for monitor. (default: '4440') --monitor-cmd : Send command to monitor if available. (Example: system_powerdown) --serial : Set serial connection type. @Options: 'socket' (default), 'telnet', 'none' --serial-telnet-host : Set telnet host for serial. (default: 'localhost') --serial-telnet-port : Set telnet port for serial. (default: '6660') --keyboard : Set keyboard. @Options: 'usb' (default), 'ps2', 'virtio' --keyboard_layout : Set keyboard layout: 'en-us' (default) --mouse : Set mouse. @Options: 'tablet' (default), 'ps2', 'usb', 'virtio' --usb-controller : Set usb-controller. @Options: 'ehci' (default), 'xhci', 'none' --sound-card : Set sound card. @Options: 'intel-hda' (default), 'ac97', 'es1370', 'sb16', 'usb-audio', 'none' --sound-duplex : Set sound card duplex. @Options: 'hda-micro' (default: speaker/mic), 'hda-duplex' (line-in/line-out), 'hda-output' (output-only) --extra_args : Pass additional arguments to qemu --version : Print version ``` ## Desktop shortcuts Desktop shortcuts can be created for a VM, the shortcuts are saved in `~/.local/share/applications`. Here is an example of how to create a shortcut. ``` shell quickemu --vm ubuntu-22.04-desktop.conf --shortcut ``` ## References Useful reference that assisted the development of Quickemu. - General - [QEMU's documentation!](https://qemu.readthedocs.io/en/latest/) - - - macOS - - - - - - - - - - - [OpenCore Configurator](https://mackie100projects.altervista.org) - Windows - - - - - - - TPM - - - 9p & virtiofs - - - - - # AUTHORS Written by Martin Wimpress. # BUGS Submit bug reports online at: # SEE ALSO Full sources at: quickemu_conf(5), quickget(1), quickgui(1) quickemu-4.9.7/docs/quickemu_conf.5000066400000000000000000000255571473451027600172530ustar00rootroot00000000000000.\" Automatically generated by Pandoc 3.3 .\" .TH "QUICKEMU_CONF" "5" "August 2, 2024" "quickemu_conf" "Quickemu Configuration Manual" .SH NAME quickemu_conf \- Options and parameters in the quickemu .conf .SH DESCRIPTION \f[B]quickemu\f[R] will create and run highly optimised desktop virtual machines for Linux, macOS and Windows. It uses sensible defaults, but many configuration options can be overridden in the required configuration file, which will as a minimum specify the path to the installation ISO and QEMU disk for the installed VM .SH OPTIONS These are the options and defaults for the .conf file .IP .EX # Lowercase variables are used in the VM config file only boot=\[dq]efi\[dq] cpu_cores=\[dq]\[dq] disk_img=\[dq]\[dq] disk_size=\[dq]\[dq] display=\[dq]\[dq] extra_args=\[dq]\[dq] fixed_iso=\[dq]\[dq] floppy=\[dq]\[dq] guest_os=\[dq]linux\[dq] img=\[dq]\[dq] iso=\[dq]\[dq] macaddr=\[dq]\[dq] macos_release=\[dq]\[dq] network=\[dq]\[dq] port_forwards=() preallocation=\[dq]off\[dq] ram=\[dq]\[dq] secureboot=\[dq]off\[dq] tpm=\[dq]off\[dq] usb_devices=() viewer=\[dq]spicy\[dq] ssh_port=\[dq]\[dq] spice_port=\[dq]\[dq] public_dir=\[dq]\[dq] monitor=\[dq]socket\[dq] monitor_telnet_port=\[dq]4440\[dq] monitor_telnet_host=\[dq]localhost\[dq] monitor_cmd=\[dq]\[dq] serial=\[dq]socket\[dq] serial_telnet_port=\[dq]6660\[dq] serial_telnet_host=\[dq]localhost\[dq] # options: ehci(USB2.0), xhci(USB3.0) usb_controller=\[dq]ehci\[dq] # options: ps2, usb, virtio keyboard=\[dq]usb\[dq] keyboard_layout=\[dq]en\-us\[dq] # options: ps2, usb, tablet, virtio mouse=\[dq]tablet\[dq] .EE .SH EXAMPLES .IP .EX guest_os=\[dq]linux\[dq] disk_img=\[dq]debian\-bullseye/disk.qcow2\[dq] iso=\[dq]debian\-bullseye/firmware\-11.0.0\-amd64\-DVD\-1.iso\[dq] .EE .PP The default macOS configuration looks like this: .IP .EX guest_os=\[dq]macos\[dq] img=\[dq]macos\-catalina/RecoveryImage.img\[dq] disk_img=\[dq]macos\-catalina/disk.qcow2\[dq] macos_release=\[dq]catalina\[dq] .EE .IP \[bu] 2 \f[CR]guest_os=\[dq]macos\[dq]\f[R] instructs Quickemu to optimise for macOS. .IP \[bu] 2 \f[CR]macos_release=\[dq]catalina\[dq]\f[R] instructs Quickemu to optimise for a particular macOS release. .RS 2 .IP \[bu] 2 For example VirtIO Network and Memory Ballooning are available in Big Sur and newer, but not previous releases. .IP \[bu] 2 And VirtIO Block Media (disks) are supported/stable in Catalina and newer. .RE .PP The default Windows 11 configuration looks like this: .IP .EX guest_os=\[dq]windows\[dq] disk_img=\[dq]windows\-11/disk.qcow2\[dq] iso=\[dq]windows\-11/Win11_EnglishInternational_x64.iso\[dq] fixed_iso=\[dq]windows\-11/virtio\-win.iso\[dq] tpm=\[dq]on\[dq] secureboot=\[dq]on\[dq] .EE .IP \[bu] 2 \f[CR]guest_os=\[dq]windows\[dq]\f[R] instructs \f[CR]quickemu\f[R] to optimise for Windows. .IP \[bu] 2 \f[CR]fixed_iso=\f[R] specifies the ISO image that provides VirtIO drivers. .IP \[bu] 2 \f[CR]tpm=\[dq]on\[dq]\f[R] instructs \f[CR]quickemu\f[R] to create a software emulated TPM device using \f[CR]swtpm\f[R]. .SS BIOS and EFI Since Quickemu 2.1.0 \f[CR]efi\f[R] is the default boot option. If you want to override this behaviour then add the following line to you VM configuration to enable legacy BIOS. .IP \[bu] 2 \f[CR]boot=\[dq]legacy\[dq]\f[R] \- Enable Legacy BIOS boot .SS Tuning CPU cores, RAM & disks By default, Quickemu will calculate the number of CPUs cores and RAM to allocate to a VM based on the specifications of your host computer. You can override this default behaviour and tune the VM configuration to your liking. .PP Add additional lines to your virtual machine configuration: .IP \[bu] 2 \f[CR]cpu_cores=\[dq]4\[dq]\f[R] \- Specify the number of CPU cores allocated to the VM .IP \[bu] 2 \f[CR]ram=\[dq]4G\[dq]\f[R] \- Specify the amount of RAM to allocate to the VM .IP \[bu] 2 \f[CR]disk_size=\[dq]16G\[dq]\f[R] \- Specify the size of the virtual disk allocated to the VM .SS Disk preallocation Preallocation mode (allowed values: \f[CR]off\f[R] (default), \f[CR]metadata\f[R], \f[CR]falloc\f[R], \f[CR]full\f[R]). An image with preallocated metadata is initially larger but can improve performance when the image needs to grow. .PP Specify what disk preallocation should be used, if any, when creating the system disk image by adding a line like this to your VM configuration. .IP \[bu] 2 \f[CR]preallocation=\[dq]metadata\[dq]\f[R] .SS CD\-ROM disks If you want to expose an ISO image from the host to guest add the following line to the VM configuration: .IP \[bu] 2 \f[CR]fixed_iso=\[dq]/path/to/image.iso\[dq]\f[R] .SS Floppy disks If you\[aq]re like \c .UR https://popey.com Alan Pope .UE \c \ you\[aq]ll probably want to mount a floppy disk image in the guest. To do so add the following line to the VM configuration: .IP \[bu] 2 \f[CR]floppy=\[dq]/path/to/floppy.img\[dq]\f[R] .SS File Sharing All File Sharing options will only expose \f[CR]\[ti]/Public\f[R] (or localised variations) for the current user to the guest VMs. .SS Samba 🐧 🍏 🪟 If \f[CR]smbd\f[R] is available on the host, Quickemu will automatically enable the built\-in QEMU support for exposing a Samba share from the host to the guest. .PP You can install the minimal Samba components on Ubuntu using: .IP .EX sudo apt install \-\-no\-install\-recommends samba .EE .PP If everything is set up correctly, the \f[CR]smbd\f[R] address will be printed when the virtual machine is started. For example: .IP .EX \- smbd: On guest: smb://10.0.2.4/qemu .EE .PP If using a Windows guest, right\-click on \[dq]This PC\[dq], click \[dq]Add a network location\[dq], and paste this address, removing \f[CR]smb:\f[R] and replacing forward slashes with backslashes (in this example \f[CR]\[rs]\[rs]10.0.2.4\[rs]qemu\f[R]). .SS SPICE WebDAV 🐧 🪟 .IP \[bu] 2 TBD .SS VirtIO\-9P 🐧 🍏 .IP \[bu] 2 TBD .SS Networking .SS Port forwarding Add an additional line to your virtual machine configuration. For example: .IP \[bu] 2 \f[CR]port_forwards=(\[dq]8123:8123\[dq] \[dq]8888:80\[dq])\f[R] .PP In the example above: .IP \[bu] 2 Port 8123 on the host is forwarded to port 8123 on the guest. .IP \[bu] 2 Port 8888 on the host is forwarded to port 80 on the guest. .SS Disable networking To completely disable all network interfaces in a guest VM add this additional line to your virtual machine configuration: .IP \[bu] 2 \f[CR]network=\[dq]none\[dq]\f[R] .SS Restricted networking You can isolate the guest from the host (and broader network) using the restrict option, which will restrict networking to just the guest and any virtual devices. .PP This can be used to prevent software running inside the guest from phoning home while still providing a network inside the guest. Add this additional line to your virtual machine configuration: .IP \[bu] 2 \f[CR]network=\[dq]restrict\[dq]\f[R] .SS Bridged networking Connect your virtual machine to a preconfigured network bridge. Add an additional line to your virtual machine configuration: .IP \[bu] 2 \f[CR]network=\[dq]br0\[dq]\f[R] .PP If you want to have a persistent MAC address for your bridged network interface in the guest VM you can add \f[CR]macaddr\f[R] to the virtual machine configuration. QEMU requires that the MAC address is in the range: \f[B]52:54:00:AB:00:00 \- 52:54:00:AB:FF:FF\f[R] .PP So you can generate your own MAC addresses with: .IP \[bu] 2 \f[CR]macaddr=\[dq]52:54:00:AB:51:AE\[dq]\f[R] .SS USB redirection Quickemu supports USB redirection via SPICE pass\-through and host pass\-through. Quickemu supports USB redirection via SPICE pass\-through and host pass\-through. .PP \f[B]NOTE!\f[R] When a USB device is redirected from the host, it will not be usable by host operating system until the guest redirection is stopped. Therefore, do not redirect the input devices, such as the keyboard and mouse, as it will be difficult (or impossible) to revert the situation. .SS SPICE redirection (recommended) Using SPICE for USB pass\-through is easiest as it doesn\[aq]t require any elevated permission: .PP Both \f[CR]spicy\f[R] from \c .UR https://www.spice-space.org/spice-gtk.html spice\-gtk .UE \c \ (\f[I]Input \-> Select USB Devices for redirection\f[R]) and \f[CR]remote\-viewer\f[R] from \c .UR https://gitlab.com/virt-viewer/virt-viewer virt\-viewer .UE \c \ (\f[I]File \-> USB device selection\f[R]) support this feature. .IP \[bu] 2 Start Quickemu with \f[CR]\-\-display spice\f[R] and then .IP \[bu] 2 Select \f[CR]Input\f[R] \-> \f[CR]Select USB Device for redirection\f[R] from the menu to choose which device(s) you want to attach to the guest. .IP \[bu] 2 **\f[CR]spicy\f[R] (default) .RS 2 .IP \[bu] 2 **Select \f[CR]Input\f[R] \-> \f[CR]Select USB Device for redirection\f[R] from the menu to choose which device(s) you want to attach to the guest. .RE .IP \[bu] 2 **\f[CR]remote\-viewer\f[R] .RS 2 .IP \[bu] 2 **Select \f[CR]File\f[R] \-> \f[CR]USB device selection\f[R] from the menu to choose which device(s) you want to attach to the guest. .RE .PP To ensure that this functionality works as expected, make sure that you have installed the necessary SPICE Guest Tools on the virtual machine. .SS Enabling SPICE redirection on NixOS On NixOS, if you encounter this error: .IP .EX Error setting facl: Operation not permitted .EE .PP Try setting \c .UR https://search.nixos.org/options?channel=23.11&show=virtualisation.spiceUSBRedirection.enable&from=0&size=50&sort=relevance&type=packages&query=spiceusbredirec the following option .UE \c : .IP .EX virtualisation.spiceUSBRedirection.enable = true; .EE .SS Host redirection (\f[B]NOT Recommended\f[R]) \f[B]USB host redirection is not recommended\f[R], it is provided purely for backwards compatibility to older versions of Quickemu. Using SPICE is preferred, see above. .PP Add an additional line to your virtual machine configuration. For example: .IP \[bu] 2 \f[CR]usb_devices=(\[dq]046d:082d\[dq] \[dq]046d:085e\[dq])\f[R] .PP In the example above: .IP \[bu] 2 The USB device with vendor_id 046d and product_id 082d will be exposed to the guest. .IP \[bu] 2 The USB device with vendor_id 046d and product_id 085e will be exposed to the guest. .PP If the USB devices are not writable, \f[CR]quickemu\f[R] will display the appropriate commands to modify the USB device(s) access permissions, like this: .IP .EX \- USB: Host pass\-through requested: \- Sennheiser Communications EPOS GTW 270 on bus 001 device 005 needs permission changes: sudo chown \-v root:user /dev/bus/usb/001/005 ERROR! USB permission changes are required 👆 .EE .SS TPM Since Quickemu 2.2.0 a software emulated TPM device can be added to guest virtual machines. Just add \f[CR]tpm=\[dq]on\[dq]\f[R] to your VM configuration. \f[CR]quickget\f[R] will automatically add this line to Windows 11 virtual machines. .SH AUTHORS Written by Martin Wimpress. .SH BUGS Submit bug reports online at: \c .UR https://github.com/quickemu-project/quickemu/issues .UE \c .SH SEE ALSO Full sources at: \c .UR https://github.com/quickemu-project/quickemu .UE \c .PP quickget(1), quickemu(1), quickgui(1) .SH AUTHORS Martin Wimpress. quickemu-4.9.7/docs/quickemu_conf.5.md000066400000000000000000000226751473451027600176500ustar00rootroot00000000000000--- author: Martin Wimpress date: August 2, 2024 footer: quickemu_conf header: Quickemu Configuration Manual section: 5 title: QUICKEMU_CONF --- # NAME quickemu_conf - Options and parameters in the quickemu \.conf # DESCRIPTION **quickemu** will create and run highly optimised desktop virtual machines for Linux, macOS and Windows. It uses sensible defaults, but many configuration options can be overridden in the required configuration file, which will as a minimum specify the path to the installation ISO and QEMU disk for the installed VM # OPTIONS These are the options and defaults for the \.conf file ``` shell # Lowercase variables are used in the VM config file only boot="efi" cpu_cores="" disk_img="" disk_size="" display="" extra_args="" fixed_iso="" floppy="" guest_os="linux" img="" iso="" macaddr="" macos_release="" network="" port_forwards=() preallocation="off" ram="" secureboot="off" tpm="off" usb_devices=() viewer="spicy" ssh_port="" spice_port="" public_dir="" monitor="socket" monitor_telnet_port="4440" monitor_telnet_host="localhost" monitor_cmd="" serial="socket" serial_telnet_port="6660" serial_telnet_host="localhost" # options: ehci(USB2.0), xhci(USB3.0) usb_controller="ehci" # options: ps2, usb, virtio keyboard="usb" keyboard_layout="en-us" # options: ps2, usb, tablet, virtio mouse="tablet" ``` # EXAMPLES ``` shell guest_os="linux" disk_img="debian-bullseye/disk.qcow2" iso="debian-bullseye/firmware-11.0.0-amd64-DVD-1.iso" ``` The default macOS configuration looks like this: ``` shell guest_os="macos" img="macos-catalina/RecoveryImage.img" disk_img="macos-catalina/disk.qcow2" macos_release="catalina" ``` - `guest_os="macos"` instructs Quickemu to optimise for macOS. - `macos_release="catalina"` instructs Quickemu to optimise for a particular macOS release. - For example VirtIO Network and Memory Ballooning are available in Big Sur and newer, but not previous releases. - And VirtIO Block Media (disks) are supported/stable in Catalina and newer. The default Windows 11 configuration looks like this: ``` shell guest_os="windows" disk_img="windows-11/disk.qcow2" iso="windows-11/Win11_EnglishInternational_x64.iso" fixed_iso="windows-11/virtio-win.iso" tpm="on" secureboot="on" ``` - `guest_os="windows"` instructs `quickemu` to optimise for Windows. - `fixed_iso=` specifies the ISO image that provides VirtIO drivers. - `tpm="on"` instructs `quickemu` to create a software emulated TPM device using `swtpm`. ### BIOS and EFI Since Quickemu 2.1.0 `efi` is the default boot option. If you want to override this behaviour then add the following line to you VM configuration to enable legacy BIOS. - `boot="legacy"` - Enable Legacy BIOS boot ### Tuning CPU cores, RAM & disks By default, Quickemu will calculate the number of CPUs cores and RAM to allocate to a VM based on the specifications of your host computer. You can override this default behaviour and tune the VM configuration to your liking. Add additional lines to your virtual machine configuration: - `cpu_cores="4"` - Specify the number of CPU cores allocated to the VM - `ram="4G"` - Specify the amount of RAM to allocate to the VM - `disk_size="16G"` - Specify the size of the virtual disk allocated to the VM ### Disk preallocation Preallocation mode (allowed values: `off` (default), `metadata`, `falloc`, `full`). An image with preallocated metadata is initially larger but can improve performance when the image needs to grow. Specify what disk preallocation should be used, if any, when creating the system disk image by adding a line like this to your VM configuration. - `preallocation="metadata"` ### CD-ROM disks If you want to expose an ISO image from the host to guest add the following line to the VM configuration: - `fixed_iso="/path/to/image.iso"` ### Floppy disks If you're like [Alan Pope](https://popey.com) you'll probably want to mount a floppy disk image in the guest. To do so add the following line to the VM configuration: - `floppy="/path/to/floppy.img"` ### File Sharing All File Sharing options will only expose `~/Public` (or localised variations) for the current user to the guest VMs. #### Samba 🐧 🍏 🪟 If `smbd` is available on the host, Quickemu will automatically enable the built-in QEMU support for exposing a Samba share from the host to the guest. You can install the minimal Samba components on Ubuntu using: ``` shell sudo apt install --no-install-recommends samba ``` If everything is set up correctly, the `smbd` address will be printed when the virtual machine is started. For example: - smbd: On guest: smb://10.0.2.4/qemu If using a Windows guest, right-click on "This PC", click "Add a network location", and paste this address, removing `smb:` and replacing forward slashes with backslashes (in this example `\\10.0.2.4\qemu`). #### SPICE WebDAV 🐧 🪟 - TBD #### VirtIO-9P 🐧 🍏 - TBD ### Networking #### Port forwarding Add an additional line to your virtual machine configuration. For example: - `port_forwards=("8123:8123" "8888:80")` In the example above: - Port 8123 on the host is forwarded to port 8123 on the guest. - Port 8888 on the host is forwarded to port 80 on the guest. #### Disable networking To completely disable all network interfaces in a guest VM add this additional line to your virtual machine configuration: - `network="none"` #### Restricted networking You can isolate the guest from the host (and broader network) using the restrict option, which will restrict networking to just the guest and any virtual devices. This can be used to prevent software running inside the guest from phoning home while still providing a network inside the guest. Add this additional line to your virtual machine configuration: - `network="restrict"` #### Bridged networking Connect your virtual machine to a preconfigured network bridge. Add an additional line to your virtual machine configuration: - `network="br0"` If you want to have a persistent MAC address for your bridged network interface in the guest VM you can add `macaddr` to the virtual machine configuration. QEMU requires that the MAC address is in the range: **52:54:00:AB:00:00 - 52:54:00:AB:FF:FF** So you can generate your own MAC addresses with: - `macaddr="52:54:00:AB:51:AE"` ### USB redirection Quickemu supports USB redirection via SPICE pass-through and host pass-through. Quickemu supports USB redirection via SPICE pass-through and host pass-through. **NOTE!** When a USB device is redirected from the host, it will not be usable by host operating system until the guest redirection is stopped. Therefore, do not redirect the input devices, such as the keyboard and mouse, as it will be difficult (or impossible) to revert the situation. #### SPICE redirection (recommended) Using SPICE for USB pass-through is easiest as it doesn't require any elevated permission: Both `spicy` from [spice-gtk](https://www.spice-space.org/spice-gtk.html) (*Input -\> Select USB Devices for redirection*) and `remote-viewer` from [virt-viewer](https://gitlab.com/virt-viewer/virt-viewer) (*File -\> USB device selection*) support this feature. - Start Quickemu with `--display spice` and then - Select `Input` -\> `Select USB Device for redirection` from the menu to choose which device(s) you want to attach to the guest. - \*\*`spicy` (default) - \*\*Select `Input` -\> `Select USB Device for redirection` from the menu to choose which device(s) you want to attach to the guest. - \*\*`remote-viewer` - \*\*Select `File` -\> `USB device selection` from the menu to choose which device(s) you want to attach to the guest. To ensure that this functionality works as expected, make sure that you have installed the necessary SPICE Guest Tools on the virtual machine. ##### Enabling SPICE redirection on NixOS On NixOS, if you encounter this error: Error setting facl: Operation not permitted Try setting [the following option](https://search.nixos.org/options?channel=23.11&show=virtualisation.spiceUSBRedirection.enable&from=0&size=50&sort=relevance&type=packages&query=spiceusbredirec): ``` nix virtualisation.spiceUSBRedirection.enable = true; ``` #### Host redirection (**NOT Recommended**) **USB host redirection is not recommended**, it is provided purely for backwards compatibility to older versions of Quickemu. Using SPICE is preferred, see above. Add an additional line to your virtual machine configuration. For example: - `usb_devices=("046d:082d" "046d:085e")` In the example above: - The USB device with vendor_id 046d and product_id 082d will be exposed to the guest. - The USB device with vendor_id 046d and product_id 085e will be exposed to the guest. If the USB devices are not writable, `quickemu` will display the appropriate commands to modify the USB device(s) access permissions, like this: - USB: Host pass-through requested: - Sennheiser Communications EPOS GTW 270 on bus 001 device 005 needs permission changes: sudo chown -v root:user /dev/bus/usb/001/005 ERROR! USB permission changes are required 👆 ### TPM Since Quickemu 2.2.0 a software emulated TPM device can be added to guest virtual machines. Just add `tpm="on"` to your VM configuration. `quickget` will automatically add this line to Windows 11 virtual machines. # AUTHORS Written by Martin Wimpress. # BUGS Submit bug reports online at: # SEE ALSO Full sources at: quickget(1), quickemu(1), quickgui(1) quickemu-4.9.7/docs/quickget.1000066400000000000000000000475171473451027600162330ustar00rootroot00000000000000.\" Automatically generated by Pandoc 3.3 .\" .TH "QUICKGET" "1" "August 2, 2024" "quickget" "Quickget User Manual" .SH NAME quickget \- download and prepare materials for building a quickemu VM .SH SYNOPSIS \f[B]quickget\f[R] [\f[I]os\f[R]] [\f[I]release\f[R]] [\f[I]edition\f[R]] | [\f[I]OPTION\f[R]]* .SH DESCRIPTION \f[B]quickget\f[R] will download the requisite materials and prepare a configuration for \f[CR]quickemu\f[R] to use to build and run .SH OPTIONS .TP \f[B][OS] [Release] [Edition]\f[R] specify the OS and release (and optional edition) if insufficient input is provided a list of missing options will be reported and the script will exit. Editions may not apply and will be defaulted if not provided. .TP \f[B]\-\-download\f[R] [edition] Download image; no VM configuration .TP \f[B]\-\-create\-config\f[R] [path/url] Create VM config for a OS image .TP \f[B]\-\-open\-homepage\f[R] Open homepage for the OS .TP \f[B]\-\-show\f[R] [os] Show OS information .TP \f[B]\-\-url\f[R] [os] [release] [edition] Show image URL(s) .TP \f[B]\-\-check\f[R] [os] [release] [edition] Check image URL(s) .TP \f[B]\-\-list\f[R] List all supported systems .TP \f[B]\-\-list\-csv\f[R] List everything in csv format .TP \f[B]\-\-list\-json\f[R] List everything in json format .TP \f[B]\-\-version\f[R] Show version .TP \f[B]\-\-help\f[R] Show this help message .SH NOTES .SS Creating Linux guests 🐧 .SS Ubuntu \f[CR]quickget\f[R] will automatically download an Ubuntu release and create the virtual machine configuration. .IP .EX quickget ubuntu 22.04 quickemu \-\-vm ubuntu\-22.04.conf .EE .IP \[bu] 2 Complete the installation as normal. .IP \[bu] 2 Post\-install: .RS 2 .IP \[bu] 2 Install the SPICE agent (\f[CR]spice\-vdagent\f[R]) in the guest to enable copy/paste and USB redirection .RS 2 .IP \[bu] 2 \f[CR]sudo apt install spice\-vdagent\f[R] .RE .IP \[bu] 2 Install the SPICE WebDAV agent (\f[CR]spice\-webdavd\f[R]) in the guest to enable file sharing. .RS 2 .IP \[bu] 2 \f[CR]sudo apt install spice\-webdavd\f[R] .RE .RE .SS Ubuntu daily\-live images \f[CR]quickget\f[R] can also download/refresh daily\-live images via \f[CR]zsync\f[R] for Ubuntu developers and testers. .IP .EX quickget ubuntu daily\-live quickemu \-\-vm ubuntu\-daily\-live.conf .EE .PP You can run \f[CR]quickget ubuntu daily\-live\f[R] to refresh your daily development image as often as you like, it will even automatically switch to a new series. .SS Ubuntu Flavours All the official Ubuntu flavours are supported, just replace \f[CR]ubuntu\f[R] with your preferred flavour. .PP The project \c .UR https://github.com/quickemu-project/quickemu/wiki/02-Create-Linux-virtual-machines wiki .UE \c \ may have further information. .IP \[bu] 2 \f[CR]edubuntu\f[R] (Edubuntu) .IP \[bu] 2 \f[CR]kubuntu\f[R] (Kubuntu) .IP \[bu] 2 \f[CR]lubuntu\f[R] (Lubuntu) .IP \[bu] 2 \f[CR]ubuntu\-budgie\f[R] (Ubuntu Budgie) .IP \[bu] 2 \f[CR]ubuntucinnamon\f[R] (Ubuntu Cinnamon) .IP \[bu] 2 \f[CR]ubuntukylin\f[R] (Ubuntu Kylin) .IP \[bu] 2 \f[CR]ubuntu\-mate\f[R] (Ubuntu MATE) .IP \[bu] 2 \f[CR]ubuntu\-server\f[R] (Ubuntu Server) .IP \[bu] 2 \f[CR]ubuntustudio\f[R] (Ubuntu Studio) .IP \[bu] 2 \f[CR]ubuntu\f[R] (Ubuntu) .IP \[bu] 2 \f[CR]ubuntu\-unity\f[R] (Ubuntu Unity) .IP \[bu] 2 \f[CR]xubuntu\f[R] (Xubuntu) .PP You can also use \f[CR]quickget\f[R] with advanced options : .IP .EX \-\-download [edition] : Download image; no VM configuration \-\-create\-config [path/url] [flags] : Create VM config for an OS image \-\-open\-homepage : Open homepage for the OS \-\-show [os] : Show OS information \-\-version : Show version \-\-help : Show this help message \-\-disable\-unattended : Force quickget not to set up an unattended installation \-\-url [os] [release] [edition] : Show image URL(s) \-\-check [os] [release] [edition] : Check image URL(s) \-\-list : List all supported systems \-\-list\-csv : List everything in csv format \-\-list\-json : List everything in json format .EE .PP Here are some typical uses .IP .EX # show an OS ISO download URL for {os} {release} [edition] quickget \-\-url fedora 38 Silverblue # test if an OS ISO is available for {os} {release} [edition] quickget \-\-check nixos unstable plasma5 # open an OS distribution homepage in a browser quickget \-\-open\-homepage ubuntu\-mate # Only download image file into current directory, without creating VM quickget \-\-download elementary 7.1 .EE .PP The \f[CR]\-\-url\f[R], \f[CR]\-\-check\f[R], and \f[CR]\-\-download\f[R] options are fully functional for all operating systems, including Windows and macOS. .PP Further information is available from the project \c .UR https://github.com/quickemu-project/quickemu/wiki/06-Advanced-quickget-features wiki .UE \c .SS Other Operating Systems \f[CR]quickget\f[R] also supports: .IP \[bu] 2 \f[CR]alma\f[R] (AlmaLinux) .IP \[bu] 2 \f[CR]alpine\f[R] (Alpine Linux) .IP \[bu] 2 \f[CR]android\f[R] (Android x86) .IP \[bu] 2 \f[CR]antix\f[R] (Antix) .IP \[bu] 2 \f[CR]archcraft\f[R] (Archcraft) .IP \[bu] 2 \f[CR]archlinux\f[R] (Arch Linux) .IP \[bu] 2 \f[CR]arcolinux\f[R] (Arco Linux) .IP \[bu] 2 \f[CR]artixlinux\f[R] (Artix Linux) .IP \[bu] 2 \f[CR]athenaos\f[R] (Athena OS) .IP \[bu] 2 \f[CR]batocera\f[R] (Batocera) .IP \[bu] 2 \f[CR]bazzite\f[R] (Bazzite) .IP \[bu] 2 \f[CR]biglinux\f[R] (BigLinux) .IP \[bu] 2 \f[CR]blendos\f[R] (BlendOS) .IP \[bu] 2 \f[CR]bodhi\f[R] (Bodhi) .IP \[bu] 2 \f[CR]bunsenlabs\f[R] (BunsenLabs) .IP \[bu] 2 \f[CR]cachyos\f[R] (CachyOS) .IP \[bu] 2 \f[CR]centos\-stream\f[R] (CentOS Stream) .IP \[bu] 2 \f[CR]chimeralinux\f[R] (Chimera Linux) .IP \[bu] 2 \f[CR]crunchbang++\f[R] (Crunchbangplusplus) .IP \[bu] 2 \f[CR]debian\f[R] (Debian) .IP \[bu] 2 \f[CR]deepin\f[R] (Deepin) .IP \[bu] 2 \f[CR]devuan\f[R] (Devuan) .IP \[bu] 2 \f[CR]dragonflybsd\f[R] (DragonFlyBSD) .IP \[bu] 2 \f[CR]easyos\f[R] (EasyOS) .IP \[bu] 2 \f[CR]elementary\f[R] (elementary OS) .IP \[bu] 2 \f[CR]endeavouros\f[R] (EndeavourOS) .IP \[bu] 2 \f[CR]endless\f[R] (Endless OS) .IP \[bu] 2 \f[CR]fedora\f[R] (Fedora) .IP \[bu] 2 \f[CR]freebsd\f[R] (FreeBSD) .IP \[bu] 2 \f[CR]freedos\f[R] (FreeDOS) .IP \[bu] 2 \f[CR]garuda\f[R] (Garuda Linux) .IP \[bu] 2 \f[CR]gentoo\f[R] (Gentoo) .IP \[bu] 2 \f[CR]ghostbsd\f[R] (GhostBSD) .IP \[bu] 2 \f[CR]gnomeos\f[R] (GNOME OS) .IP \[bu] 2 \f[CR]guix\f[R] (Guix) .IP \[bu] 2 \f[CR]haiku\f[R] (Haiku) .IP \[bu] 2 \f[CR]holoiso\f[R] (HoloISO) .IP \[bu] 2 \f[CR]kali\f[R] (Kali) .IP \[bu] 2 \f[CR]kdeneon\f[R] (KDE Neon) .IP \[bu] 2 \f[CR]kolibrios\f[R] (KolibriOS) .IP \[bu] 2 \f[CR]linuxlite\f[R] (Linux Lite) .IP \[bu] 2 \f[CR]linuxmint\f[R] (Linux Mint) .IP \[bu] 2 \f[CR]lmde\f[R] (Linux Mint Debian Edition) .IP \[bu] 2 \f[CR]mageia\f[R] (Mageia) .IP \[bu] 2 \f[CR]manjaro\f[R] (Manjaro) .IP \[bu] 2 \f[CR]mxlinux\f[R] (MX Linux) .IP \[bu] 2 \f[CR]netboot\f[R] (netboot.xyz) .IP \[bu] 2 \f[CR]netbsd\f[R] (NetBSD) .IP \[bu] 2 \f[CR]nitrux\f[R] (Nitrux) .IP \[bu] 2 \f[CR]nixos\f[R] (NixOS) .IP \[bu] 2 \f[CR]nwg\-shell\f[R] (nwg\-shell) .IP \[bu] 2 \f[CR]openbsd\f[R] (OpenBSD) .IP \[bu] 2 \f[CR]openindiana\f[R] (OpenIndiana) .IP \[bu] 2 \f[CR]opensuse\f[R] (openSUSE) .IP \[bu] 2 \f[CR]oraclelinux\f[R] (Oracle Linux) .IP \[bu] 2 \f[CR]parrotsec\f[R] (Parrot Security) .IP \[bu] 2 \f[CR]peppermint\f[R] (PeppermintOS) .IP \[bu] 2 \f[CR]popos\f[R] (Pop!_OS) .IP \[bu] 2 \f[CR]porteus\f[R] (Porteus) .IP \[bu] 2 \f[CR]primtux\f[R] (PrimTux) .IP \[bu] 2 \f[CR]pureos\f[R] (PureOS) .IP \[bu] 2 \f[CR]reactos\f[R] (ReactOS) .IP \[bu] 2 \f[CR]rebornos\f[R] (RebornOS) .IP \[bu] 2 \f[CR]rockylinux\f[R] (Rocky Linux) .IP \[bu] 2 \f[CR]siduction\f[R] (Siduction) .IP \[bu] 2 \f[CR]slackware\f[R] (Slackware) .IP \[bu] 2 \f[CR]slax\f[R] (Slax) .IP \[bu] 2 \f[CR]slint\f[R] (Slint) .IP \[bu] 2 \f[CR]slitaz\f[R] (SliTaz) .IP \[bu] 2 \f[CR]solus\f[R] (Solus) .IP \[bu] 2 \f[CR]sparkylinux\f[R] (SparkyLinux) .IP \[bu] 2 \f[CR]spirallinux\f[R] (SpiralLinux) .IP \[bu] 2 \f[CR]tails\f[R] (Tails) .IP \[bu] 2 \f[CR]tinycore\f[R] (Tiny Core Linux) .IP \[bu] 2 \f[CR]trisquel\f[R] (Trisquel\-) .IP \[bu] 2 \f[CR]truenas\-core\f[R] (TrueNAS Core) .IP \[bu] 2 \f[CR]truenas\-scale\f[R] (TrueNAS Scale) .IP \[bu] 2 \f[CR]tuxedo\-os\f[R] (Tuxedo OS) .IP \[bu] 2 \f[CR]vanillaos\f[R] (Vanilla OS) .IP \[bu] 2 \f[CR]void\f[R] (Void Linux) .IP \[bu] 2 \f[CR]vxlinux\f[R] (VX Linux) .IP \[bu] 2 \f[CR]zorin\f[R] (Zorin OS) .SS \c .UR https://github.com/quickemu-project/quickemu/wiki/02-Create-Linux-virtual-machines#manually-create-linux-guests Custom Linux guests .UE \c Or you can download a Linux image and manually create a VM configuration. .IP \[bu] 2 Download a .iso image of a Linux distribution .IP \[bu] 2 Create a VM configuration file; for example \f[CR]debian\-bullseye.conf\f[R] .IP .EX guest_os=\[dq]linux\[dq] disk_img=\[dq]debian\-bullseye/disk.qcow2\[dq] iso=\[dq]debian\-bullseye/firmware\-11.0.0\-amd64\-DVD\-1.iso\[dq] .EE .IP \[bu] 2 Use \f[CR]quickemu\f[R] to start the virtual machine: .IP .EX quickemu \-\-vm debian\-bullseye.conf .EE .IP \[bu] 2 Complete the installation as normal. .IP \[bu] 2 Post\-install: .RS 2 .IP \[bu] 2 Install the SPICE agent (\f[CR]spice\-vdagent\f[R]) in the guest to enable copy/paste and USB redirection. .IP \[bu] 2 Install the SPICE WebDAV agent (\f[CR]spice\-webdavd\f[R]) in the guest to enable file sharing. .RE .SS Supporting old Linux distros If you want to run an old Linux , from 2016 or earlier, change the \f[CR]guest_os\f[R] to \f[CR]linux_old\f[R]. This will enable the \f[CR]vmware\-svga\f[R] graphics driver which is better supported on older distros. .SS \c .UR https://github.com/quickemu-project/quickemu/wiki/03-Create-macOS-virtual-machines#automatically-create-macos-guests Creating macOS Guests .UE \c \ 🍏 \f[B]Installing macOS in a VM can be a bit finicky, if you encounter problems, \c .UR https://github.com/quickemu-project/quickemu/discussions check the Discussions .UE \c \ for solutions or ask for help there\f[R] 🛟 .PP \f[CR]quickget\f[R] automatically downloads a macOS recovery image and creates a virtual machine configuration. .IP .EX quickget macos big\-sur quickemu \-\-vm macos\-big\-sur.conf .EE .PP macOS \f[CR]mojave\f[R], \f[CR]catalina\f[R], \f[CR]big\-sur\f[R], \f[CR]monterey\f[R], \f[CR]ventura\f[R] and \f[CR]sonoma\f[R] are supported. .IP \[bu] 2 Use cursor keys and enter key to select the \f[B]macOS Base System\f[R] .IP \[bu] 2 From \f[B]macOS Utilities\f[R] .RS 2 .IP \[bu] 2 Click \f[B]Disk Utility\f[R] and \f[B]Continue\f[R] .RS 2 .IP \[bu] 2 Select \f[CR]QEMU HARDDISK Media\f[R] (\[ti]103.08GB) from the list (on Big Sur and above use \f[CR]Apple Inc. VirtIO Block Device\f[R]) and click \f[B]Erase\f[R]. .IP \[bu] 2 Enter a \f[CR]Name:\f[R] for the disk .IP \[bu] 2 If you are installing macOS Mojave or later (Catalina, Big Sur, Monterey, Ventura and Sonoma), choose any of the APFS options as the filesystem. MacOS Extended may not work. .RE .IP \[bu] 2 Click \f[B]Erase\f[R]. .IP \[bu] 2 Click \f[B]Done\f[R]. .IP \[bu] 2 Close Disk Utility .RE .IP \[bu] 2 From \f[B]macOS Utilities\f[R] .RS 2 .IP \[bu] 2 Click \f[B]Reinstall macOS\f[R] and \f[B]Continue\f[R] .RE .IP \[bu] 2 Complete the installation as you normally would. .RS 2 .IP \[bu] 2 On the first reboot use cursor keys and enter key to select \f[B]macOS Installer\f[R] .IP \[bu] 2 On the subsequent reboots use cursor keys and enter key to select the disk you named .RE .IP \[bu] 2 Once you have finished installing macOS you will be presented with an the out\-of\-the\-box first\-start wizard to configure various options and set up your username and password .IP \[bu] 2 OPTIONAL: After you have concluded the out\-of\-the\-box wizard, you may want to enable the TRIM feature that the computer industry created for SSD disks. This feature in our macOS installation will allow QuickEmu to compact (shrink) your macOS disk image whenever you delete files inside the Virtual Machine. Without this step your macOS disk image will only ever get larger and will not shrink even when you delete lots of data inside macOS. .RS 2 .IP \[bu] 2 To enable TRIM, open the Terminal application and type the following command followed by pressing enter to tell macos to use the TRIM command on the hard disk when files are deleted: .RE .IP .EX sudo trimforce enable .EE .PP You will be prompted to enter your account\[aq]s password to gain the privilege needed. Once you\[aq]ve entered your password and pressed enter the command will request confirmation in the form of two questions that require you to type y (for a \[dq]yes\[dq] response) followed by enter to confirm. .PP If you press enter without first typing y the system will consider that a negative response as though you said \[dq]no\[dq]: .IP .EX IMPORTANT NOTICE: This tool force\-enables TRIM for all relevant attached devices, even though such devices may not have been validated for data integrity while using TRIM. Use of this tool to enable TRIM may result in unintended data loss or data corruption. It should not be used in a commercial operating environment or with important data. Before using this tool, you should back up all of your data and regularly back up data while TRIM is enabled. This tool is provided on an \[dq]as is\[dq] basis. APPLE MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF NON\-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING THIS TOOL OR ITS USE ALONE OR IN COMBINATION WITH YOUR DEVICES, SYSTEMS, OR SERVICES. BY USING THIS TOOL TO ENABLE TRIM, YOU AGREE THAT, TO THE EXTENT PERMITTED BY APPLICABLE LAW, USE OF THE TOOL IS AT YOUR SOLE RISK AND THAT THE ENTIRE RISK AS TO SATISFACTORY QUALITY, PERFORMANCE, ACCURACY AND EFFORT IS WITH YOU. Are you sure you with to proceed (y/N)? .EE .PP And a second confirmation once you\[aq]ve confirmed the previous one: .IP .EX Your system will immediately reboot when this is complete. Is this OK (y/N)? .EE .PP As the last message states, your system will automatically reboot as soon as the command completes. .PP The default macOS configuration looks like this: .IP .EX guest_os=\[dq]macos\[dq] img=\[dq]macos\- big\-sur/RecoveryImage.img\[dq] disk_img=\[dq]macos\- big\-sur/disk.qcow2\[dq] macos_release=\[dq] big\-sur\[dq] .EE .IP \[bu] 2 \f[CR]guest_os=\[dq]macos\[dq]\f[R] instructs Quickemu to optimise for macOS. .IP \[bu] 2 \f[CR]macos_release=\[dq] big\-sur\[dq]\f[R] instructs Quickemu to optimise for a particular macOS release. .RS 2 .IP \[bu] 2 For example VirtIO Network and Memory Ballooning are available in Big Sur and newer, but not previous releases. .IP \[bu] 2 And VirtIO Block Media (disks) are supported/stable in Catalina and newer. .RE .SH macOS compatibility There are some considerations when running macOS via Quickemu. .IP \[bu] 2 Supported macOS releases: .RS 2 .IP \[bu] 2 Mojave .IP \[bu] 2 Catalina .IP \[bu] 2 Big Sur .IP \[bu] 2 Monterey .IP \[bu] 2 Ventura .IP \[bu] 2 Sonoma .RE .IP \[bu] 2 \f[CR]quickemu\f[R] will automatically download the required \c .UR https://github.com/acidanthera/OpenCorePkg OpenCore .UE \c \ bootloader and OVMF firmware from \c .UR https://github.com/kholia/OSX-KVM OSX\-KVM .UE \c \&. .IP \[bu] 2 Optimised by default, but no GPU acceleration is available. .RS 2 .IP \[bu] 2 Host CPU vendor is detected and guest CPU is optimised accordingly. .IP \[bu] 2 \c .UR https://www.kraxel.org/blog/2019/06/macos-qemu-guest/ VirtIO Block Media .UE \c \ is used for the system disk where supported. .IP \[bu] 2 \c .UR http://philjordan.eu/osx-virt/ VirtIO \f[CR]usb\-tablet\f[R] .UE \c \ is used for the mouse. .IP \[bu] 2 VirtIO Network (\f[CR]virtio\-net\f[R]) is supported and enabled on macOS Big Sur and newer, but earlier releases use \f[CR]vmxnet3\f[R]. .IP \[bu] 2 VirtIO Memory Ballooning is supported and enabled on macOS Big Sur and newer but disabled for other support macOS releases. .RE .IP \[bu] 2 USB host and SPICE pass\-through is: .RS 2 .IP \[bu] 2 UHCI (USB 2.0) on macOS Catalina and earlier. .IP \[bu] 2 XHCI (USB 3.0) on macOS Big Sur and newer. .RE .IP \[bu] 2 Display resolution can be changed via \f[CR]quickemu\f[R] using \f[CR]\-\-width\f[R] and \f[CR]\-\-height\f[R] command line arguments. .IP \[bu] 2 \f[B]Full Duplex audio requires \c .UR https://github.com/chris1111/VoodooHDA-OC VoodooHDA OC .UE \c \ or pass\-through a USB audio\-device to the macOS guest VM\f[R]. .RS 2 .IP \[bu] 2 NOTE! \c .UR https://disable-gatekeeper.github.io/ Gatekeeper .UE \c \ and \c .UR https://developer.apple.com/documentation/security/disabling_and_enabling_system_integrity_protection System Integrity Protection (SIP) .UE \c \ need to be disabled to install VoodooHDA OC .RE .IP \[bu] 2 File sharing between guest and host is available via \c .UR https://wiki.qemu.org/Documentation/9psetup virtio\-9p .UE \c \ and \c .UR https://gitlab.gnome.org/GNOME/phodav/-/merge_requests/24 SPICE webdavd .UE \c \&. .IP \[bu] 2 Copy/paste via SPICE agent is \f[B]not available on macOS\f[R]. .SH macOS App Store If you see \f[I]\[dq]Your device or computer could not be verified\[dq]\f[R] when you try to login to the App Store, make sure that your wired ethernet device is \f[CR]en0\f[R]. Use \f[CR]ifconfig\f[R] in a terminal to verify this. .PP If the wired ethernet device is not \f[CR]en0\f[R], then then go to \f[I]System Preferences\f[R] \-> \f[I]Network\f[R], delete all the network devices and apply the changes. Next, open a terminal and run the following: .IP .EX sudo rm /Library/Preferences/SystemConfiguration/NetworkInterfaces.plist .EE .PP Now reboot, and the App Store should work. .PP There may be further advice and information about macOS guests in the project \c .UR https://github.com/quickemu-project/quickemu/wiki/03-Create-macOS-virtual-machines#automatically-create-macos-guests wiki .UE \c \&. .SS \c .UR https://github.com/quickemu-project/quickemu/wiki/04-Create-Windows-virtual-machines Creating Windows guests .UE \c \ 🪟 \f[CR]quickget\f[R] can download \c .UR https://www.microsoft.com/software-download/windows10 \f[B]Windows 10\f[R] .UE \c \ and \c .UR https://www.microsoft.com/software-download/windows11 \f[B]Windows 11\f[R] .UE \c \ automatically and create an optimised virtual machine configuration. This configuration also includes the \c .UR https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/ VirtIO drivers for Windows .UE \c \&. .PP \f[B]Windows 8.1\f[R] is also supported but doesn\[aq]t feature any automated installation or driver optimisation. .PP \f[CR]quickget\f[R] can also download \c .UR https://www.microsoft.com/en-us/evalcenter/download-windows-10-enterprise Windows 10 LTSC .UE \c \ and Windows Server \c .UR https://www.microsoft.com/en-us/evalcenter/download-windows-server-2012-r2 2012\-r2 .UE \c , \c .UR https://www.microsoft.com/en-us/evalcenter/download-windows-server-2016 2016 .UE \c , \c .UR https://www.microsoft.com/en-us/evalcenter/download-windows-server-2019 2019 .UE \c , and \c .UR https://www.microsoft.com/en-us/evalcenter/download-windows-server-2022 2022 .UE \c \&. No automated installation is supported for these releases. .IP .EX quickget windows 11 quickemu \-\-vm windows\-11.conf .EE .IP \[bu] 2 Complete the installation as you normally would. .IP \[bu] 2 All relevant drivers and services should be installed automatically. .IP \[bu] 2 A local administrator user account is automatically created, with these credentials: .RS 2 .IP \[bu] 2 Username: \f[CR]Quickemu\f[R] .IP \[bu] 2 Password: \f[CR]quickemu\f[R] .RE .PP Further information is available from the project \c .UR https://github.com/quickemu-project/quickemu/wiki/04-Create-Windows-virtual-machines wiki .UE \c .SH AUTHORS Written by Martin Wimpress. .SH BUGS Submit bug reports online at: \c .UR https://github.com/quickemu-project/quickemu/issues .UE \c .SH SEE ALSO Full sources at: \c .UR https://github.com/quickemu-project/quickemu .UE \c .PP quickemu(1), quickemu_conf(5), quickgui(1) .SH AUTHORS Martin Wimpress. quickemu-4.9.7/docs/quickget.1.md000066400000000000000000000406411473451027600166210ustar00rootroot00000000000000--- author: Martin Wimpress date: August 2, 2024 footer: quickget header: Quickget User Manual section: 1 title: QUICKGET --- # NAME quickget - download and prepare materials for building a quickemu VM # SYNOPSIS **quickget** \[*os*\] \[*release*\] \[*edition*\] \| \[*OPTION*\]\* # DESCRIPTION **quickget** will download the requisite materials and prepare a configuration for `quickemu` to use to build and run # OPTIONS **\[OS\] \[Release\] \[Edition\]** : specify the OS and release (and optional edition) if insufficient input is provided a list of missing options will be reported and the script will exit. Editions may not apply and will be defaulted if not provided. **--download** \[edition\] : Download image; no VM configuration **--create-config** \[path/url\] : Create VM config for a OS image **--open-homepage** : Open homepage for the OS **--show** \[os\] : Show OS information **--url** \[os\] \[release\] \[edition\] : Show image URL(s) **--check** \[os\] \[release\] \[edition\] : Check image URL(s) **--list** : List all supported systems **--list-csv** : List everything in csv format **--list-json** : List everything in json format **--version** : Show version **--help** : Show this help message # NOTES ## Creating Linux guests 🐧 ### Ubuntu `quickget` will automatically download an Ubuntu release and create the virtual machine configuration. ``` shell quickget ubuntu 22.04 quickemu --vm ubuntu-22.04.conf ``` - Complete the installation as normal. - Post-install: - Install the SPICE agent (`spice-vdagent`) in the guest to enable copy/paste and USB redirection - `sudo apt install spice-vdagent` - Install the SPICE WebDAV agent (`spice-webdavd`) in the guest to enable file sharing. - `sudo apt install spice-webdavd` ### Ubuntu daily-live images `quickget` can also download/refresh daily-live images via `zsync` for Ubuntu developers and testers. ``` shell quickget ubuntu daily-live quickemu --vm ubuntu-daily-live.conf ``` You can run `quickget ubuntu daily-live` to refresh your daily development image as often as you like, it will even automatically switch to a new series. ### Ubuntu Flavours All the official Ubuntu flavours are supported, just replace `ubuntu` with your preferred flavour. The project [wiki](https://github.com/quickemu-project/quickemu/wiki/02-Create-Linux-virtual-machines) may have further information. - `edubuntu` (Edubuntu) - `kubuntu` (Kubuntu) - `lubuntu` (Lubuntu) - `ubuntu-budgie` (Ubuntu Budgie) - `ubuntucinnamon` (Ubuntu Cinnamon) - `ubuntukylin` (Ubuntu Kylin) - `ubuntu-mate` (Ubuntu MATE) - `ubuntu-server` (Ubuntu Server) - `ubuntustudio` (Ubuntu Studio) - `ubuntu` (Ubuntu) - `ubuntu-unity` (Ubuntu Unity) - `xubuntu` (Xubuntu) You can also use `quickget` with advanced options : ``` text --download [edition] : Download image; no VM configuration --create-config [path/url] [flags] : Create VM config for an OS image --open-homepage : Open homepage for the OS --show [os] : Show OS information --version : Show version --help : Show this help message --disable-unattended : Force quickget not to set up an unattended installation --url [os] [release] [edition] : Show image URL(s) --check [os] [release] [edition] : Check image URL(s) --list : List all supported systems --list-csv : List everything in csv format --list-json : List everything in json format ``` Here are some typical uses ``` shell # show an OS ISO download URL for {os} {release} [edition] quickget --url fedora 38 Silverblue # test if an OS ISO is available for {os} {release} [edition] quickget --check nixos unstable plasma5 # open an OS distribution homepage in a browser quickget --open-homepage ubuntu-mate # Only download image file into current directory, without creating VM quickget --download elementary 7.1 ``` The `--url`, `--check`, and `--download` options are fully functional for all operating systems, including Windows and macOS. Further information is available from the project [wiki](https://github.com/quickemu-project/quickemu/wiki/06-Advanced-quickget-features) ### Other Operating Systems `quickget` also supports: - `alma` (AlmaLinux) - `alpine` (Alpine Linux) - `android` (Android x86) - `antix` (Antix) - `archcraft` (Archcraft) - `archlinux` (Arch Linux) - `arcolinux` (Arco Linux) - `artixlinux` (Artix Linux) - `athenaos` (Athena OS) - `batocera` (Batocera) - `bazzite` (Bazzite) - `biglinux` (BigLinux) - `blendos` (BlendOS) - `bodhi` (Bodhi) - `bunsenlabs` (BunsenLabs) - `cachyos` (CachyOS) - `centos-stream` (CentOS Stream) - `chimeralinux` (Chimera Linux) - `crunchbang++` (Crunchbangplusplus) - `debian` (Debian) - `deepin` (Deepin) - `devuan` (Devuan) - `dragonflybsd` (DragonFlyBSD) - `easyos` (EasyOS) - `elementary` (elementary OS) - `endeavouros` (EndeavourOS) - `endless` (Endless OS) - `fedora` (Fedora) - `freebsd` (FreeBSD) - `freedos` (FreeDOS) - `garuda` (Garuda Linux) - `gentoo` (Gentoo) - `ghostbsd` (GhostBSD) - `gnomeos` (GNOME OS) - `guix` (Guix) - `haiku` (Haiku) - `holoiso` (HoloISO) - `kali` (Kali) - `kdeneon` (KDE Neon) - `kolibrios` (KolibriOS) - `linuxlite` (Linux Lite) - `linuxmint` (Linux Mint) - `lmde` (Linux Mint Debian Edition) - `mageia` (Mageia) - `manjaro` (Manjaro) - `mxlinux` (MX Linux) - `netboot` (netboot.xyz) - `netbsd` (NetBSD) - `nitrux` (Nitrux) - `nixos` (NixOS) - `nwg-shell` (nwg-shell) - `openbsd` (OpenBSD) - `openindiana` (OpenIndiana) - `opensuse` (openSUSE) - `oraclelinux` (Oracle Linux) - `parrotsec` (Parrot Security) - `peppermint` (PeppermintOS) - `popos` (Pop!\_OS) - `porteus` (Porteus) - `primtux` (PrimTux) - `pureos` (PureOS) - `reactos` (ReactOS) - `rebornos` (RebornOS) - `rockylinux` (Rocky Linux) - `siduction` (Siduction) - `slackware` (Slackware) - `slax` (Slax) - `slint` (Slint) - `slitaz` (SliTaz) - `solus` (Solus) - `sparkylinux` (SparkyLinux) - `spirallinux` (SpiralLinux) - `tails` (Tails) - `tinycore` (Tiny Core Linux) - `trisquel` (Trisquel-) - `truenas-core` (TrueNAS Core) - `truenas-scale` (TrueNAS Scale) - `tuxedo-os` (Tuxedo OS) - `vanillaos` (Vanilla OS) - `void` (Void Linux) - `vxlinux` (VX Linux) - `zorin` (Zorin OS) ### [Custom Linux guests](https://github.com/quickemu-project/quickemu/wiki/02-Create-Linux-virtual-machines#manually-create-linux-guests) Or you can download a Linux image and manually create a VM configuration. - Download a .iso image of a Linux distribution - Create a VM configuration file; for example `debian-bullseye.conf` ``` shell guest_os="linux" disk_img="debian-bullseye/disk.qcow2" iso="debian-bullseye/firmware-11.0.0-amd64-DVD-1.iso" ``` - Use `quickemu` to start the virtual machine: ``` shell quickemu --vm debian-bullseye.conf ``` - Complete the installation as normal. - Post-install: - Install the SPICE agent (`spice-vdagent`) in the guest to enable copy/paste and USB redirection. - Install the SPICE WebDAV agent (`spice-webdavd`) in the guest to enable file sharing. ## Supporting old Linux distros If you want to run an old Linux , from 2016 or earlier, change the `guest_os` to `linux_old`. This will enable the `vmware-svga` graphics driver which is better supported on older distros. ## [Creating macOS Guests](https://github.com/quickemu-project/quickemu/wiki/03-Create-macOS-virtual-machines#automatically-create-macos-guests) 🍏 **Installing macOS in a VM can be a bit finicky, if you encounter problems, [check the Discussions](https://github.com/quickemu-project/quickemu/discussions) for solutions or ask for help there** 🛟 `quickget` automatically downloads a macOS recovery image and creates a virtual machine configuration. ``` shell quickget macos big-sur quickemu --vm macos-big-sur.conf ``` macOS `mojave`, `catalina`, `big-sur`, `monterey`, `ventura` and `sonoma` are supported. - Use cursor keys and enter key to select the **macOS Base System** - From **macOS Utilities** - Click **Disk Utility** and **Continue** - Select `QEMU HARDDISK Media` (~103.08GB) from the list (on Big Sur and above use `Apple Inc. VirtIO Block Device`) and click **Erase**. - Enter a `Name:` for the disk - If you are installing macOS Mojave or later (Catalina, Big Sur, Monterey, Ventura and Sonoma), choose any of the APFS options as the filesystem. MacOS Extended may not work. - Click **Erase**. - Click **Done**. - Close Disk Utility - From **macOS Utilities** - Click **Reinstall macOS** and **Continue** - Complete the installation as you normally would. - On the first reboot use cursor keys and enter key to select **macOS Installer** - On the subsequent reboots use cursor keys and enter key to select the disk you named - Once you have finished installing macOS you will be presented with an the out-of-the-box first-start wizard to configure various options and set up your username and password - OPTIONAL: After you have concluded the out-of-the-box wizard, you may want to enable the TRIM feature that the computer industry created for SSD disks. This feature in our macOS installation will allow QuickEmu to compact (shrink) your macOS disk image whenever you delete files inside the Virtual Machine. Without this step your macOS disk image will only ever get larger and will not shrink even when you delete lots of data inside macOS. - To enable TRIM, open the Terminal application and type the following command followed by pressing enter to tell macos to use the TRIM command on the hard disk when files are deleted: ``` shell sudo trimforce enable ``` You will be prompted to enter your account's password to gain the privilege needed. Once you've entered your password and pressed enter the command will request confirmation in the form of two questions that require you to type y (for a "yes" response) followed by enter to confirm. If you press enter without first typing y the system will consider that a negative response as though you said "no": ``` plain IMPORTANT NOTICE: This tool force-enables TRIM for all relevant attached devices, even though such devices may not have been validated for data integrity while using TRIM. Use of this tool to enable TRIM may result in unintended data loss or data corruption. It should not be used in a commercial operating environment or with important data. Before using this tool, you should back up all of your data and regularly back up data while TRIM is enabled. This tool is provided on an "as is" basis. APPLE MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING THIS TOOL OR ITS USE ALONE OR IN COMBINATION WITH YOUR DEVICES, SYSTEMS, OR SERVICES. BY USING THIS TOOL TO ENABLE TRIM, YOU AGREE THAT, TO THE EXTENT PERMITTED BY APPLICABLE LAW, USE OF THE TOOL IS AT YOUR SOLE RISK AND THAT THE ENTIRE RISK AS TO SATISFACTORY QUALITY, PERFORMANCE, ACCURACY AND EFFORT IS WITH YOU. Are you sure you with to proceed (y/N)? ``` And a second confirmation once you've confirmed the previous one: ``` plain Your system will immediately reboot when this is complete. Is this OK (y/N)? ``` As the last message states, your system will automatically reboot as soon as the command completes. The default macOS configuration looks like this: ``` shell guest_os="macos" img="macos- big-sur/RecoveryImage.img" disk_img="macos- big-sur/disk.qcow2" macos_release=" big-sur" ``` - `guest_os="macos"` instructs Quickemu to optimise for macOS. - `macos_release=" big-sur"` instructs Quickemu to optimise for a particular macOS release. - For example VirtIO Network and Memory Ballooning are available in Big Sur and newer, but not previous releases. - And VirtIO Block Media (disks) are supported/stable in Catalina and newer. # macOS compatibility There are some considerations when running macOS via Quickemu. - Supported macOS releases: - Mojave - Catalina - Big Sur - Monterey - Ventura - Sonoma - `quickemu` will automatically download the required [OpenCore](https://github.com/acidanthera/OpenCorePkg) bootloader and OVMF firmware from [OSX-KVM](https://github.com/kholia/OSX-KVM). - Optimised by default, but no GPU acceleration is available. - Host CPU vendor is detected and guest CPU is optimised accordingly. - [VirtIO Block Media](https://www.kraxel.org/blog/2019/06/macos-qemu-guest/) is used for the system disk where supported. - [VirtIO `usb-tablet`](http://philjordan.eu/osx-virt/) is used for the mouse. - VirtIO Network (`virtio-net`) is supported and enabled on macOS Big Sur and newer, but earlier releases use `vmxnet3`. - VirtIO Memory Ballooning is supported and enabled on macOS Big Sur and newer but disabled for other support macOS releases. - USB host and SPICE pass-through is: - UHCI (USB 2.0) on macOS Catalina and earlier. - XHCI (USB 3.0) on macOS Big Sur and newer. - Display resolution can be changed via `quickemu` using `--width` and `--height` command line arguments. - **Full Duplex audio requires [VoodooHDA OC](https://github.com/chris1111/VoodooHDA-OC) or pass-through a USB audio-device to the macOS guest VM**. - NOTE! [Gatekeeper](https://disable-gatekeeper.github.io/) and [System Integrity Protection (SIP)](https://developer.apple.com/documentation/security/disabling_and_enabling_system_integrity_protection) need to be disabled to install VoodooHDA OC - File sharing between guest and host is available via [virtio-9p](https://wiki.qemu.org/Documentation/9psetup) and [SPICE webdavd](https://gitlab.gnome.org/GNOME/phodav/-/merge_requests/24). - Copy/paste via SPICE agent is **not available on macOS**. # macOS App Store If you see *"Your device or computer could not be verified"* when you try to login to the App Store, make sure that your wired ethernet device is `en0`. Use `ifconfig` in a terminal to verify this. If the wired ethernet device is not `en0`, then then go to *System Preferences* -\> *Network*, delete all the network devices and apply the changes. Next, open a terminal and run the following: ``` shell sudo rm /Library/Preferences/SystemConfiguration/NetworkInterfaces.plist ``` Now reboot, and the App Store should work. There may be further advice and information about macOS guests in the project [wiki](https://github.com/quickemu-project/quickemu/wiki/03-Create-macOS-virtual-machines#automatically-create-macos-guests). ## [Creating Windows guests](https://github.com/quickemu-project/quickemu/wiki/04-Create-Windows-virtual-machines) 🪟 `quickget` can download [**Windows 10**](https://www.microsoft.com/software-download/windows10) and [**Windows 11**](https://www.microsoft.com/software-download/windows11) automatically and create an optimised virtual machine configuration. This configuration also includes the [VirtIO drivers for Windows](https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/). **Windows 8.1** is also supported but doesn't feature any automated installation or driver optimisation. `quickget` can also download [Windows 10 LTSC](https://www.microsoft.com/en-us/evalcenter/download-windows-10-enterprise) and Windows Server [2012-r2](https://www.microsoft.com/en-us/evalcenter/download-windows-server-2012-r2), [2016](https://www.microsoft.com/en-us/evalcenter/download-windows-server-2016), [2019](https://www.microsoft.com/en-us/evalcenter/download-windows-server-2019), and [2022](https://www.microsoft.com/en-us/evalcenter/download-windows-server-2022). No automated installation is supported for these releases. ``` shell quickget windows 11 quickemu --vm windows-11.conf ``` - Complete the installation as you normally would. - All relevant drivers and services should be installed automatically. - A local administrator user account is automatically created, with these credentials: - Username: `Quickemu` - Password: `quickemu` Further information is available from the project [wiki](https://github.com/quickemu-project/quickemu/wiki/04-Create-Windows-virtual-machines) # AUTHORS Written by Martin Wimpress. # BUGS Submit bug reports online at: # SEE ALSO Full sources at: quickemu(1), quickemu_conf(5), quickgui(1) quickemu-4.9.7/flake.lock000066400000000000000000000024251473451027600153260ustar00rootroot00000000000000{ "nodes": { "flake-schemas": { "locked": { "lastModified": 1721999734, "narHash": "sha256-G5CxYeJVm4lcEtaO87LKzOsVnWeTcHGKbKxNamNWgOw=", "rev": "0a5c42297d870156d9c57d8f99e476b738dcd982", "revCount": 75, "type": "tarball", "url": "https://api.flakehub.com/f/pinned/DeterminateSystems/flake-schemas/0.1.5/0190ef2f-61e0-794b-ba14-e82f225e55e6/source.tar.gz" }, "original": { "type": "tarball", "url": "https://flakehub.com/f/DeterminateSystems/flake-schemas/%2A.tar.gz" } }, "nixpkgs": { "locked": { "lastModified": 1735264675, "narHash": "sha256-MgdXpeX2GuJbtlBrH9EdsUeWl/yXEubyvxM1G+yO4Ak=", "rev": "d49da4c08359e3c39c4e27c74ac7ac9b70085966", "revCount": 712007, "type": "tarball", "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.2411.712007%2Brev-d49da4c08359e3c39c4e27c74ac7ac9b70085966/01940ca0-b117-7d0e-b1ef-d579ee6d2f13/source.tar.gz" }, "original": { "type": "tarball", "url": "https://flakehub.com/f/NixOS/nixpkgs/%2A.tar.gz" } }, "root": { "inputs": { "flake-schemas": "flake-schemas", "nixpkgs": "nixpkgs" } } }, "root": "root", "version": 7 } quickemu-4.9.7/flake.nix000066400000000000000000000024561473451027600152000ustar00rootroot00000000000000{ description = "Quickemu flake"; inputs = { flake-schemas.url = "https://flakehub.com/f/DeterminateSystems/flake-schemas/*.tar.gz"; nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/*.tar.gz"; }; outputs = { self, flake-schemas, nixpkgs, }: let # Define supported systems and a helper function for generating system-specific outputs supportedSystems = [ "x86_64-linux" "x86_64-darwin" "aarch64-darwin" "aarch64-linux" ]; forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f { system = system; pkgs = import nixpkgs { inherit system; }; }); in { # Define schemas for the flake's outputs schemas = flake-schemas.schemas; # Define overlays for each supported system overlays = forEachSupportedSystem ({pkgs, system, ...}: { default = final: prev: { quickemu = final.callPackage ./package.nix { }; }; }); # Define packages for each supported system packages = forEachSupportedSystem ({pkgs, system, ...}: rec { quickemu = pkgs.callPackage ./package.nix { }; default = quickemu; }); # Define devShells for each supported system devShells = forEachSupportedSystem ({pkgs, system, ...}: { default = pkgs.callPackage ./devshell.nix { }; }); }; } quickemu-4.9.7/package.nix000066400000000000000000000044551473451027600155120ustar00rootroot00000000000000{ lib , fetchFromGitHub , installShellFiles , makeWrapper , stdenv , testers , cdrtools , curl , gawk , glxinfo , gnugrep , gnused , jq , pciutils , procps , python3 , qemu_full , samba , socat , spice-gtk , swtpm , unzip , usbutils , util-linux , xdg-user-dirs , xrandr , zsync , OVMF , OVMFFull , quickemu }: let runtimePaths = [ cdrtools curl gawk gnugrep gnused jq pciutils procps python3 qemu_full samba socat swtpm unzip util-linux xrandr zsync OVMF OVMFFull ] ++ lib.optionals stdenv.isLinux [ glxinfo usbutils xdg-user-dirs ]; versionMatches = builtins.match '' .* readonly[[:blank:]]VERSION="([[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+)" .* '' (builtins.readFile ./quickemu); in stdenv.mkDerivation rec { pname = "quickemu"; version = builtins.concatStringsSep "" versionMatches; src = lib.cleanSource ./.; postPatch = '' sed -i \ -e '/OVMF_CODE_4M.secboot.fd/s|ovmfs=(|ovmfs=("${OVMFFull.firmware}","${OVMFFull.variables}" |' \ -e '/OVMF_CODE_4M.fd/s|ovmfs=(|ovmfs=("${OVMF.firmware}","${OVMF.variables}" |' \ -e '/cp "''${VARS_IN}" "''${VARS_OUT}"/a chmod +w "''${VARS_OUT}"' \ -e 's,\$(command -v smbd),${samba}/bin/smbd,' \ quickemu ''; nativeBuildInputs = [ makeWrapper installShellFiles ]; installPhase = '' runHook preInstall installManPage docs/quickget.1 docs/quickemu.1 docs/quickemu_conf.5 install -Dm755 -t "$out/bin" chunkcheck quickemu quickget quickreport # spice-gtk needs to be put in suffix so that when virtualisation.spiceUSBRedirection # is enabled, the wrapped spice-client-glib-usb-acl-helper is used for f in chunkcheck quickget quickemu quickreport; do wrapProgram $out/bin/$f \ --prefix PATH : "${lib.makeBinPath runtimePaths}" \ --suffix PATH : "${lib.makeBinPath [ spice-gtk ]}" done runHook postInstall ''; passthru.tests = testers.testVersion { package = quickemu; }; meta = { description = "Quickly create and run optimised Windows, macOS and Linux virtual machines"; homepage = "https://github.com/quickemu-project/quickemu"; mainProgram = "quickemu"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ fedx-sudo flexiondotorg ]; }; } quickemu-4.9.7/quickemu000077500000000000000000002453031473451027600151470ustar00rootroot00000000000000#!/usr/bin/env bash export LC_ALL=C if ((BASH_VERSINFO[0] < 4)); then echo "Sorry, you need bash 4.0 or newer to run this script." exit 1 fi function ignore_msrs_always() { # Make sure the host has /etc/modprobe.d if [ -d /etc/modprobe.d ]; then # Skip if ignore_msrs is already enabled, assumes initramfs has been rebuilt if ! grep -lq 'ignore_msrs=Y' /etc/modprobe.d/kvm-quickemu.conf >/dev/null 2>&1; then echo "options kvm ignore_msrs=Y" | sudo tee /etc/modprobe.d/kvm-quickemu.conf sudo update-initramfs -k all -u fi else echo "ERROR! /etc/modprobe.d was not found, I don't know how to configure this system." exit 1 fi } function ignore_msrs_alert() { local ignore_msrs="" if [ "${OS_KERNEL}" == "Darwin" ]; then return elif [ -e /sys/module/kvm/parameters/ignore_msrs ]; then ignore_msrs=$(cat /sys/module/kvm/parameters/ignore_msrs) if [ "${ignore_msrs}" == "N" ]; then echo " - MSR: WARNING! Ignoring unhandled Model-Specific Registers is disabled." echo echo " echo 1 | sudo tee /sys/module/kvm/parameters/ignore_msrs" echo echo " If you are unable to run macOS or Windows VMs then run the above 👆" echo " This will enable ignoring of unhandled MSRs until you reboot the host." echo " You can make this change permanent by running: 'quickemu --ignore-msrs-always'" fi fi } function delete_shortcut() { local SHORTCUT_DIR="${HOME}/.local/share/applications" if [ -e "${SHORTCUT_DIR}/${VMNAME}.desktop" ]; then rm "${SHORTCUT_DIR}/${VMNAME}.desktop" echo " - Deleted ${SHORTCUT_DIR}/${VMNAME}.desktop" fi } function delete_disk() { echo "Deleting ${VMNAME} virtual hard disk" if [ -e "${disk_img}" ]; then rm "${disk_img}" >/dev/null 2>&1 # Remove any EFI vars, but not for macOS rm "${VMDIR}"/OVMF_VARS*.fd >/dev/null 2>&1 rm "${VMDIR}/${VMNAME}-vars.fd" >/dev/null 2>&1 echo " - Deleted ${disk_img}" delete_shortcut else echo " - ${disk_img} not found. Doing nothing." fi } function delete_vm() { echo "Deleting ${VMNAME} completely" if [ -d "${VMDIR}" ]; then rm -rf "${VMDIR}" rm "${VM}" echo " - Deleted ${VM} and ${VMDIR}/" delete_shortcut else echo " - ${VMDIR} not found. Doing nothing." fi } function kill_vm() { echo "Killing ${VMNAME}" if [ -z "${VM_PID}" ]; then echo " - ${VMNAME} is not running." rm -f "${VMDIR}/${VMNAME}.pid" elif [ -n "${VM_PID}" ]; then if kill -9 "${VM_PID}" > /dev/null 2>&1; then echo " - ${VMNAME} (${VM_PID}) killed." rm -f "${VMDIR}/${VMNAME}.pid" else echo " - ${VMNAME} (${VM_PID}) was not killed." fi elif [ ! -r "${VMDIR}/${VMNAME}.pid" ]; then echo " - ${VMNAME} has no ${VMDIR}/${VMNAME}.pid" fi } function snapshot_apply() { echo "Snapshot apply to ${disk_img}" local TAG="${1}" if [ -z "${TAG}" ]; then echo " - ERROR! No snapshot tag provided." exit fi if [ -e "${disk_img}" ]; then if ${QEMU_IMG} snapshot -q -a "${TAG}" "${disk_img}"; then echo " - Applied snapshot '${TAG}' to ${disk_img}" else echo " - ERROR! Failed to apply snapshot '${TAG}' to ${disk_img}" fi else echo " - NOTE! ${disk_img} not found. Doing nothing." fi } function snapshot_create() { echo "Snapshotting ${disk_img}" local TAG="${1}" if [ -z "${TAG}" ]; then echo "- ERROR! No snapshot tag provided." exit fi if [ -e "${disk_img}" ]; then if ${QEMU_IMG} snapshot -q -c "${TAG}" "${disk_img}"; then echo " - Created snapshot '${TAG}' for ${disk_img}" else echo " - ERROR! Failed to create snapshot '${TAG}' for ${disk_img}" fi else echo " - NOTE! ${disk_img} not found. Doing nothing." fi } function snapshot_delete() { echo "Snapshot removal ${disk_img}" local TAG="${1}" if [ -z "${TAG}" ]; then echo " - ERROR! No snapshot tag provided." exit fi if [ -e "${disk_img}" ]; then if ${QEMU_IMG} snapshot -q -d "${TAG}" "${disk_img}"; then echo " - Deleted snapshot '${TAG}' from ${disk_img}" else echo " - ERROR! Failed to delete snapshot '${TAG}' from ${disk_img}" fi else echo " - NOTE! ${disk_img} not found. Doing nothing." fi } function snapshot_info() { echo if [ -e "${disk_img}" ]; then ${QEMU_IMG} info "${disk_img}" fi } function get_port() { local PORT_START=$1 local PORT_RANGE=$((PORT_START+$2)) local PORT for ((PORT = PORT_START; PORT <= PORT_RANGE; PORT++)); do # Make sure port scans do not block too long. timeout 0.1s bash -c "echo >/dev/tcp/127.0.0.1/${PORT}" >/dev/null 2>&1 if [ ${?} -eq 1 ]; then echo "${PORT}" break fi done } function configure_usb() { local DEVICE="" local USB_BUS="" local USB_DEV="" local USB_NAME="" local VENDOR_ID="" local PRODUCT_ID="" local USB_NOT_READY=0 # Have any USB devices been requested for pass-through? if (( ${#usb_devices[@]} )); then echo " - USB: Host pass-through requested:" for DEVICE in "${usb_devices[@]}"; do VENDOR_ID=$(echo "${DEVICE}" | cut -d':' -f1) PRODUCT_ID=$(echo "${DEVICE}" | cut -d':' -f2) USB_BUS=$(lsusb -d "${VENDOR_ID}:${PRODUCT_ID}" | cut -d' ' -f2) USB_DEV=$(lsusb -d "${VENDOR_ID}:${PRODUCT_ID}" | cut -d' ' -f4 | cut -d':' -f1) USB_NAME=$(lsusb -d "${VENDOR_ID}:${PRODUCT_ID}" | cut -d' ' -f7-) if [ -z "${USB_NAME}" ]; then echo " ! USB device ${VENDOR_ID}:${PRODUCT_ID} not found. Check your configuration" continue elif [ -w "/dev/bus/usb/${USB_BUS}/${USB_DEV}" ]; then echo " o ${USB_NAME} on bus ${USB_BUS} device ${USB_DEV} is accessible." else echo " x ${USB_NAME} on bus ${USB_BUS} device ${USB_DEV} needs permission changes:" echo " sudo chown -v root:${USER} /dev/bus/usb/${USB_BUS}/${USB_DEV}" USB_NOT_READY=1 fi USB_PASSTHROUGH="${USB_PASSTHROUGH} -device usb-host,bus=hostpass.0,vendorid=0x${VENDOR_ID},productid=0x${PRODUCT_ID}" done if [ "${USB_NOT_READY}" -eq 1 ]; then echo " ERROR! USB permission changes are required 👆" exit 1 fi fi } # get the number of processing units function get_nproc() { if command -v nproc &>/dev/null; then nproc elif command -v sysctl &>/dev/null; then sysctl -n hw.ncpu else echo "ERROR! Unable to determine the number of processing units." exit 1 fi } # macOS and Linux compatible get_cpu_info function function get_cpu_info() { local INFO_NAME="${1}" if [ "${OS_KERNEL}" == "Darwin" ]; then if [ "^Model name:" == "${INFO_NAME}" ]; then sysctl -n machdep.cpu.brand_string elif [ "Socket" == "${INFO_NAME}" ]; then sysctl -n hw.packages elif [ "Vendor" == "${INFO_NAME}" ]; then if [ "${ARCH_HOST}" == "arm64" ]; then sysctl -n machdep.cpu.brand_string | cut -d' ' -f1 else sysctl -n machdep.cpu.vendor | sed 's/ //g' fi else echo "ERROR! Could not find macOS translation for ${INFO_NAME}" exit 1 fi else if [ "^Model name:" == "${INFO_NAME}" ]; then for MODEL_NAME in $(IFS=$'\n' lscpu | grep "${INFO_NAME}" | cut -d':' -f2 | sed -e 's/^[[:space:]]*//'); do echo -n "${MODEL_NAME} " done else lscpu | grep -E "${INFO_NAME}" | cut -d':' -f2 | sed 's/ //g' | sort -u fi fi } # returns an enabled or disable CPU flag for QEMU, based on the host CPU # capabilities, or nothing if the flag is not supported # converts the flags appropriately from macOS and Linux to QEMU function configure_cpu_flag() { local HOST_CPU_FLAG="${1}" # Convert the flag to lowercase for QEMU local QEMU_CPU_FLAG=${HOST_CPU_FLAG,,} if check_cpu_flag "${HOST_CPU_FLAG}"; then # Replace _ with - to make it compatible with QEMU QEMU_CPU_FLAG="${HOST_CPU_FLAG//_/-}" QEMU_CPU_FLAG="${QEMU_CPU_FLAG//4_/4\.}" # macOS uses different flag names if [ "${OS_KERNEL}" == "Darwin" ]; then case "${HOST_CPU_FLAG}" in avx) QEMU_CPU_FLAG="AVX1.0";; esac fi echo ",+${QEMU_CPU_FLAG}" else # Fully disable any QEMU flags that are not supported by the host CPU if [ "${HOST_CPU_VENDOR}" == "AuthenticAMD" ]; then case ${HOST_CPU_FLAG} in pcid) echo ",-${QEMU_CPU_FLAG}";; esac fi fi } # checks if a CPU flag is supported by the host CPU on Linux and macOS function check_cpu_flag() { local HOST_CPU_FLAG="" if [ "${OS_KERNEL}" == "Darwin" ]; then # Make the macOS compatible: uppercase, replace _ with . and replace X2APIC with x2APIC HOST_CPU_FLAG="${1^^}" HOST_CPU_FLAG="${HOST_CPU_FLAG//_/.}" HOST_CPU_FLAG="${HOST_CPU_FLAG//X2APIC/x2APIC}" if [ "${HOST_CPU_FLAG}" == "AVX" ]; then HOST_CPU_FLAG="AVX1.0" fi if sysctl -n machdep.cpu.features | grep -o "${HOST_CPU_FLAG}" > /dev/null; then return 0 else return 1 fi else HOST_CPU_FLAG="${1}" if lscpu | grep -o "^Flags\b.*: .*\b${HOST_CPU_FLAG}\b" > /dev/null; then return 0 else return 1 fi fi } function efi_vars() { local VARS_IN="" local VARS_OUT="" VARS_IN="${1}" VARS_OUT="${2}" if [ ! -e "${VARS_OUT}" ]; then if [ -e "${VARS_IN}" ]; then cp "${VARS_IN}" "${VARS_OUT}" else echo "ERROR! ${VARS_IN} was not found. Please install edk2." exit 1 fi fi } function configure_cpu() { HOST_CPU_CORES=$(get_nproc) HOST_CPU_MODEL=$(get_cpu_info '^Model name:') HOST_CPU_SOCKETS=$(get_cpu_info 'Socket') HOST_CPU_VENDOR=$(get_cpu_info 'Vendor') if [ "${HOST_CPU_SOCKETS}" = "-" ]; then HOST_CPU_SOCKETS=1 fi CPU_MODEL="host" QEMU_ACCEL="tcg" # Configure appropriately for the host platform if [ "${OS_KERNEL}" == "Darwin" ]; then MANUFACTURER=$(ioreg -l | grep -e Manufacturer | grep -v iMan | cut -d'"' -f4 | sort -u) CPU_KVM_UNHALT="" QEMU_ACCEL="hvf" # QEMU for macOS from Homebrew does not support SMM SMM="off" else if [ -r /sys/class/dmi/id/sys_vendor ]; then MANUFACTURER=$(head -n 1 /sys/class/dmi/id/sys_vendor) fi CPU_KVM_UNHALT=",kvm_pv_unhalt" GUEST_TWEAKS+=" -global kvm-pit.lost_tick_policy=discard" QEMU_ACCEL="kvm" fi if [ "${ARCH_VM}" == "aarch64" ]; then # Support to run aarch64 VMs (best guess; untested) # https://qemu-project.gitlab.io/qemu/system/arm/virt.html case ${ARCH_HOST} in arm64|aarch64) CPU_MODEL="max" MACHINE_TYPE="virt,highmem=off";; esac elif [ "${ARCH_VM}" != "${ARCH_HOST}" ]; then # If the architecture of the VM is different from the host, disable acceleration CPU_MODEL="qemu64" CPU_KVM_UNHALT="" QEMU_ACCEL="tcg" fi # TODO: More robust detection of running in a VM # - macOS check for CPU flag: vmx # - Linux AMD check for CPU flag: svm # - Linux Intel check for CPU flag: vmx case ${MANUFACTURER,,} in qemu|virtualbox) CPU_MODEL="qemu64" QEMU_ACCEL="tcg" HYPERVISOR="${MANUFACTURER,,}";; *) HYPERVISOR="";; esac if [ -z "${HYPERVISOR}" ]; then # A CPU with Intel VT-x / AMD SVM support is required if [ "${HOST_CPU_VENDOR}" == "GenuineIntel" ]; then if ! check_cpu_flag vmx; then echo "ERROR! Intel VT-x support is required." exit 1 fi elif [ "${HOST_CPU_VENDOR}" == "AuthenticAMD" ]; then if ! check_cpu_flag svm; then echo "ERROR! AMD SVM support is required." exit 1 fi fi fi CPU="-cpu ${CPU_MODEL}" # Make any OS specific adjustments if [ "${guest_os}" == "freedos" ] || [ "${guest_os}" == "windows" ] || [ "${guest_os}" == "windows-server" ]; then # SMM is not available on QEMU for macOS via Homebrew if [ "${OS_KERNEL}" == "Linux" ]; then SMM="on" fi fi case ${guest_os} in batocera|freedos|haiku|solaris) MACHINE_TYPE="pc";; kolibrios|reactos) CPU="-cpu qemu32" MACHINE_TYPE="pc";; macos) # If the host has an Intel CPU, passes the host CPU model features, model, stepping, exactly to the guest. # Disable huge pages (,-pdpe1gb) on macOS to prevent crashes # - https://stackoverflow.com/questions/60231203/qemu-qcow2-mmu-gva-to-gpa-crash-in-mac-os-x if [ "${HOST_CPU_VENDOR}" == "GenuineIntel" ] && [ -z "${HYPERVISOR}" ]; then CPU_MODEL="host" CPU="-cpu ${CPU_MODEL},-pdpe1gb,+hypervisor" else CPU_MODEL="Haswell-v2" CPU="-cpu ${CPU_MODEL},vendor=GenuineIntel,-pdpe1gb,+avx,+sse,+sse2,+ssse3,vmware-cpuid-freq=on" fi # A CPU with fma is required for Metal support # A CPU with invtsc is required for macOS to boot case ${macos_release} in ventura|sonoma) # A CPU with AVX2 support is required for >= macOS Ventura if check_cpu_flag sse4_2 && check_cpu_flag avx2; then if [ "${HOST_CPU_VENDOR}" != "GenuineIntel" ] && [ -z "${HYPERVISOR}" ]; then CPU+=",+avx2,+sse4.2" fi else echo "ERROR! macOS ${macos_release} requires a CPU with SSE 4.2 and AVX2 support." echo " Try macOS Monterey or Big Sur." exit 1 fi;; catalina|big-sur|monterey) # A CPU with SSE4.2 support is required for >= macOS Catalina if check_cpu_flag sse4_2; then if [ "${HOST_CPU_VENDOR}" != "GenuineIntel" ] && [ -z "${HYPERVISOR}" ]; then CPU+=",+sse4.2" fi else echo "ERROR! macOS ${macos_release} requires a CPU with SSE 4.2 support." exit 1 fi;; *) # A CPU with SSE4.1 support is required for >= macOS Sierra if check_cpu_flag sse4_1; then if [ "${HOST_CPU_VENDOR}" != "GenuineIntel" ] && [ -z "${HYPERVISOR}" ]; then CPU+=",+sse4.1" fi else echo "ERROR! macOS ${macos_release} requires a CPU with SSE 4.1 support." exit 1 fi;; esac if [ "${HOST_CPU_VENDOR}" != "GenuineIntel" ] && [ -z "${HYPERVISOR}" ]; then for FLAG in abm adx aes amd-ssbd apic arat bmi1 bmi2 clflush cmov cx8 cx16 de \ eist erms f16c fma fp87 fsgsbase fxsr invpcid invtsc lahf_lm lm \ mca mce mmx movbe mpx msr mtrr nx pae pat pcid pge pse popcnt pse36 \ rdrand rdtscp sep smep syscall tsc tsc_adjust vaes vbmi2 vmx vpclmulqdq \ x2apic xgetbv1 xsave xsaveopt; do CPU+=$(configure_cpu_flag "${FLAG}") done fi # Disable S3 support in the VM to prevent macOS suspending during install GUEST_TWEAKS+=" -global ICH9-LPC.disable_s3=1 -device isa-applesmc,osk=$(echo "bheuneqjbexolgurfrjbeqfthneqrqcyrnfrqbagfgrny(p)NccyrPbzchgreVap" | tr 'A-Za-z' 'N-ZA-Mn-za-m')" # Disable High Precision Timer if [ "${QEMU_VER_SHORT}" -ge 70 ]; then MACHINE_TYPE+=",hpet=off" else GUEST_TWEAKS+=" -no-hpet" fi ;; windows|windows-server) if [ "${QEMU_VER_SHORT}" -gt 60 ]; then CPU="-cpu ${CPU_MODEL},+hypervisor,+invtsc,l3-cache=on,migratable=no,hv_passthrough" else CPU="-cpu ${CPU_MODEL},+hypervisor,+invtsc,l3-cache=on,migratable=no,hv_frequencies${CPU_KVM_UNHALT},hv_reenlightenment,hv_relaxed,hv_spinlocks=8191,hv_stimer,hv_synic,hv_time,hv_vapic,hv_vendor_id=1234567890ab,hv_vpindex" fi # Disable S3 support in the VM to ensure Windows can boot with SecureBoot enabled # - https://wiki.archlinux.org/title/QEMU#VM_does_not_boot_when_using_a_Secure_Boot_enabled_OVMF GUEST_TWEAKS+=" -global ICH9-LPC.disable_s3=1" # Disable High Precision Timer if [ "${QEMU_VER_SHORT}" -ge 70 ]; then MACHINE_TYPE+=",hpet=off" else GUEST_TWEAKS+=" -no-hpet" fi ;; esac if [ "${HOST_CPU_VENDOR}" == "AuthenticAMD" ] && [ "${guest_os}" != "macos" ]; then CPU+=",topoext" fi if [ -z "${cpu_cores}" ]; then if [ "${HOST_CPU_CORES}" -ge 32 ]; then GUEST_CPU_CORES="16" elif [ "${HOST_CPU_CORES}" -ge 16 ]; then GUEST_CPU_CORES="8" elif [ "${HOST_CPU_CORES}" -ge 8 ]; then GUEST_CPU_CORES="4" elif [ "${HOST_CPU_CORES}" -ge 4 ]; then GUEST_CPU_CORES="2" else GUEST_CPU_CORES="1" fi else GUEST_CPU_CORES="${cpu_cores}" fi # macOS guests cannot boot with most core counts not powers of 2. # Find the nearest but lowest power of 2 using a predefined table if [ "${guest_os}" == "macos" ]; then local POWERS=(1 2 4 8 16 32 64 128 256 512 1024) for (( i=${#POWERS[@]}-1; i>=0; i-- )); do if [ "${POWERS[i]}" -le "${GUEST_CPU_CORES}" ]; then GUEST_CPU_CORES="${POWERS[i]}" break fi done fi if [ "${OS_KERNEL}" == "Darwin" ]; then # Get the number of physical cores physicalcpu=$(sysctl -n hw.physicalcpu) # Get the number of logical processors logicalcpu=$(sysctl -n hw.logicalcpu) # Check if Hyper-Threading is enabled if [ "${logicalcpu}" -gt "${physicalcpu}" ]; then HOST_CPU_SMT="on" else HOST_CPU_SMT="off" fi elif [ -e /sys/devices/system/cpu/smt/control ]; then HOST_CPU_SMT=$(cat /sys/devices/system/cpu/smt/control) fi # Account for Hyperthreading/SMT. if [ "${GUEST_CPU_CORES}" -ge 2 ]; then case ${HOST_CPU_SMT} in on) GUEST_CPU_THREADS=2 GUEST_CPU_LOGICAL_CORES=$(( GUEST_CPU_CORES / GUEST_CPU_THREADS ));; *) GUEST_CPU_THREADS=1 GUEST_CPU_LOGICAL_CORES=${GUEST_CPU_CORES};; esac else GUEST_CPU_THREADS=1 GUEST_CPU_LOGICAL_CORES=${GUEST_CPU_CORES} fi SMP="-smp cores=${GUEST_CPU_LOGICAL_CORES},threads=${GUEST_CPU_THREADS},sockets=${HOST_CPU_SOCKETS}" echo " - CPU: ${HOST_CPU_MODEL}" echo " - CPU VM: ${CPU_MODEL%%,*}, ${HOST_CPU_SOCKETS} Socket(s), ${GUEST_CPU_LOGICAL_CORES} Core(s), ${GUEST_CPU_THREADS} Thread(s)" if [ "${guest_os}" == "macos" ] || [ "${guest_os}" == "windows" ] || [ "${guest_os}" == "windows-server" ]; then # Display MSRs alert if the guest is macOS or windows ignore_msrs_alert fi } function configure_ram() { local OS_PRETTY_NAME="" RAM_VM="2G" if [ -z "${ram}" ]; then local RAM_HOST="" if [ "${OS_KERNEL}" == "Darwin" ]; then RAM_HOST=$(($(sysctl -n hw.memsize) / (1048576*1024))) else # Determine the number of gigabytes of RAM in the host by extracting the first numerical value from the output. RAM_HOST=$(free --giga | tr ' ' '\n' | grep -m 1 "[0-9]" ) fi if [ "${RAM_HOST}" -ge 128 ]; then RAM_VM="32G" elif [ "${RAM_HOST}" -ge 64 ]; then RAM_VM="16G" elif [ "${RAM_HOST}" -ge 16 ]; then RAM_VM="8G" elif [ "${RAM_HOST}" -ge 8 ]; then RAM_VM="4G" fi else RAM_VM="${ram}" fi echo " - RAM VM: ${RAM_VM} RAM" case "${guest_os}" in windows|windows-server) OS_PRETTY_NAME="Windows" min_ram="4" ;; macos) OS_PRETTY_NAME="macOS" min_ram="8" ;; esac if [ -n "${min_ram}" ] && [ "${RAM_VM//G/}" -lt "${min_ram}" ]; then if [ -z "${ram}" ]; then echo " ERROR! The guest virtual machine has been allocated insufficient RAM to run ${OS_PRETTY_NAME}." echo " You can override the guest RAM allocation by adding 'ram=${min_ram}G' to ${VM}" exit 1 else echo " WARNING! You have allocated less than the recommended amount of RAM to run ${OS_PRETTY_NAME}." fi fi } function configure_bios() { # Always Boot macOS using EFI if [ "${guest_os}" == "macos" ]; then boot="efi" if [ -e "${VMDIR}/OVMF_CODE.fd" ] && [ -e "${VMDIR}/OVMF_VARS-1024x768.fd" ]; then EFI_CODE="${VMDIR}/OVMF_CODE.fd" EFI_VARS="${VMDIR}/OVMF_VARS-1024x768.fd" elif [ -e "${VMDIR}/OVMF_CODE.fd" ] && [ -e "${VMDIR}/OVMF_VARS-1920x1080.fd" ]; then EFI_CODE="${VMDIR}/OVMF_CODE.fd" EFI_VARS="${VMDIR}/OVMF_VARS-1920x1080.fd" else MAC_MISSING="Firmware" fi if [ -e "${VMDIR}/OpenCore.qcow2" ]; then MAC_BOOTLOADER="${VMDIR}/OpenCore.qcow2" elif [ -e "${VMDIR}/ESP.qcow2" ]; then # Backwards compatibility for Clover MAC_BOOTLOADER="${VMDIR}/ESP.qcow2" else MAC_MISSING="Bootloader" fi if [ -n "${MAC_MISSING}" ]; then echo "ERROR! macOS ${MAC_MISSING} was not found." echo " Use 'quickget' to download the required files." exit 1 fi BOOT_STATUS="EFI (macOS), OVMF ($(basename "${EFI_CODE}")), SecureBoot (${secureboot})." elif [[ "${boot}" == *"efi"* ]]; then EFI_VARS="${VMDIR}/OVMF_VARS.fd" # Preserve backward compatibility if [ -e "${VMDIR}/${VMNAME}-vars.fd" ]; then mv "${VMDIR}/${VMNAME}-vars.fd" "${EFI_VARS}" elif [ -e "${VMDIR}/OVMF_VARS_4M.fd" ]; then mv "${VMDIR}/OVMF_VARS_4M.fd" "${EFI_VARS}" fi # OVMF_CODE_4M.fd is for booting guests in non-Secure Boot mode. # While this image technically supports Secure Boot, it does so # without requiring SMM support from QEMU # OVMF_CODE.secboot.fd is like OVMF_CODE_4M.fd, but will abort if QEMU # does not support SMM. local SHARE_PATH="/usr/share" if [ "${OS_KERNEL}" == "Darwin" ]; then # Do not assume brew; quickemu could have been installed via Nix if command -v brew &>/dev/null; then SHARE_PATH="$(brew --prefix qemu)/share" fi fi # https://bugzilla.redhat.com/show_bug.cgi?id=1929357#c5 # TODO: Check if macOS should use 'edk2-i386-vars.fd' if [ -n "${EFI_CODE}" ] || [ ! -e "${EFI_CODE}" ]; then case ${secureboot} in on) # shellcheck disable=SC2054,SC2140 ovmfs=("${SHARE_PATH}/OVMF/OVMF_CODE_4M.secboot.fd","${SHARE_PATH}/OVMF/OVMF_VARS_4M.fd" \ "${SHARE_PATH}/edk2/ovmf/OVMF_CODE.secboot.fd","${SHARE_PATH}/edk2/ovmf/OVMF_VARS.fd" \ "${SHARE_PATH}/OVMF/x64/OVMF_CODE.secboot.fd","${SHARE_PATH}/OVMF/x64/OVMF_VARS.fd" \ "${SHARE_PATH}/edk2-ovmf/OVMF_CODE.secboot.fd","${SHARE_PATH}/edk2-ovmf/OVMF_VARS.fd" \ "${SHARE_PATH}/qemu/ovmf-x86_64-smm-ms-code.bin","${SHARE_PATH}/qemu/ovmf-x86_64-smm-ms-vars.bin" \ "${SHARE_PATH}/qemu/edk2-x86_64-secure-code.fd","${SHARE_PATH}/qemu/edk2-x86_64-code.fd" \ "${SHARE_PATH}/edk2-ovmf/x64/OVMF_CODE.secboot.fd","${SHARE_PATH}/edk2-ovmf/x64/OVMF_VARS.fd" \ "${SHARE_PATH}/edk2/x64/OVMF_CODE.secboot.4m.fd","${SHARE_PATH}/edk2/x64/OVMF_VARS.4m.fd" );; *) # shellcheck disable=SC2054,SC2140 ovmfs=("${SHARE_PATH}/OVMF/OVMF_CODE_4M.fd","${SHARE_PATH}/OVMF/OVMF_VARS_4M.fd" \ "${SHARE_PATH}/edk2/ovmf/OVMF_CODE.fd","${SHARE_PATH}/edk2/ovmf/OVMF_VARS.fd" \ "${SHARE_PATH}/OVMF/OVMF_CODE.fd","${SHARE_PATH}/OVMF/OVMF_VARS.fd" \ "${SHARE_PATH}/OVMF/x64/OVMF_CODE.fd","${SHARE_PATH}/OVMF/x64/OVMF_VARS.fd" \ "${SHARE_PATH}/edk2-ovmf/OVMF_CODE.fd","${SHARE_PATH}/edk2-ovmf/OVMF_VARS.fd" \ "${SHARE_PATH}/qemu/ovmf-x86_64-4m-code.bin","${SHARE_PATH}/qemu/ovmf-x86_64-4m-vars.bin" \ "${SHARE_PATH}/qemu/edk2-x86_64-code.fd","${SHARE_PATH}/qemu/edk2-x86_64-code.fd" \ "${SHARE_PATH}/edk2-ovmf/x64/OVMF_CODE.fd","${SHARE_PATH}/edk2-ovmf/x64/OVMF_VARS.fd" \ "${SHARE_PATH}/edk2/x64/OVMF_CODE.4m.fd","${SHARE_PATH}/edk2/x64/OVMF_VARS.4m.fd" );; esac # Attempt each EFI_CODE file one by one, selecting the corresponding code and vars # when an existing file is found. _IFS=$IFS IFS="," for f in "${ovmfs[@]}"; do # shellcheck disable=SC2086 set -- ${f}; if [ -e "${1}" ]; then EFI_CODE="${1}" EFI_EXTRA_VARS="${2}" fi done IFS=$_IFS fi if [ -z "${EFI_CODE}" ] || [ ! -e "${EFI_CODE}" ]; then if [ "${secureboot}" == "on" ]; then echo "ERROR! SecureBoot was requested but no SecureBoot capable firmware was found." else echo "ERROR! EFI boot requested but no EFI firmware found." fi echo " Please install OVMF firmware." exit 1 fi if [ -n "${EFI_EXTRA_VARS}" ]; then if [ ! -e "${EFI_EXTRA_VARS}" ]; then echo " - EFI: ERROR! EFI_EXTRA_VARS file ${EFI_EXTRA_VARS} does not exist." exit 1 fi efi_vars "${EFI_EXTRA_VARS}" "${EFI_VARS}" fi # Make sure EFI_VARS references an actual, writeable, file if [ ! -f "${EFI_VARS}" ] || [ ! -w "${EFI_VARS}" ]; then echo " - EFI: ERROR! ${EFI_VARS} is not a regular file or not writeable." echo " Deleting ${EFI_VARS}. Please re-run quickemu." rm -f "${EFI_VARS}" exit 1 fi # If EFI_CODE references a symlink, resolve it to the real file. if [ -L "${EFI_CODE}" ]; then echo " - EFI: WARNING! ${EFI_CODE} is a symlink." echo -n " Resolving to... " EFI_CODE=$(realpath "${EFI_CODE}") echo "${EFI_CODE}" fi BOOT_STATUS="EFI (${guest_os^}), OVMF (${EFI_CODE}), SecureBoot (${secureboot})." else BOOT_STATUS="Legacy BIOS (${guest_os^})" boot="legacy" secureboot="off" fi echo " - BOOT: ${BOOT_STATUS}" } function configure_os_quirks() { if [ "${guest_os}" == "batocera" ] || [ "${guest_os}" == "freedos" ] || [ "${guest_os}" == "haiku" ] || [ "${guest_os}" == "kolibrios" ]; then NET_DEVICE="rtl8139" fi if [ "${guest_os}" == "freebsd" ] || [ "${guest_os}" == "ghostbsd" ]; then mouse="usb" fi case ${guest_os} in windows-server) NET_DEVICE="e1000";; *bsd|linux*|windows) NET_DEVICE="virtio-net";; freedos) sound_card="sb16";; *solaris) usb_controller="xhci" sound_card="ac97";; reactos) NET_DEVICE="e1000" keyboard="ps2";; macos) # Tune QEMU optimisations based on the macOS release, or fallback to lowest # common supported options if none is specified. # * VirtIO Block Media doesn't work in High Sierra (at all) or the Mojave (Recovery Image) # * VirtIO Network is supported since Big Sur # * VirtIO Memory Balloning is supported since Big Sur (https://pmhahn.github.io/virtio-balloon/) # * VirtIO RNG is supported since Big Sur, but exposed to all guests by default. case ${macos_release} in big-sur|monterey|ventura|sonoma) BALLOON="-device virtio-balloon" MAC_DISK_DEV="virtio-blk-pci" NET_DEVICE="virtio-net" USB_HOST_PASSTHROUGH_CONTROLLER="nec-usb-xhci" GUEST_TWEAKS+=" -global nec-usb-xhci.msi=off" sound_card="${sound_card:-usb-audio}" usb_controller="xhci";; *) # Backwards compatibility if no macos_release is specified. # Also safe catch all for High Sierra and Mojave BALLOON="" if [ "${macos_release}" == "catalina" ]; then MAC_DISK_DEV="virtio-blk-pci" else MAC_DISK_DEV="ide-hd,bus=ahci.2" fi NET_DEVICE="vmxnet3" USB_HOST_PASSTHROUGH_CONTROLLER="usb-ehci";; esac ;; *) NET_DEVICE="rtl8139";; esac } function configure_storage() { local create_options="" echo " - Disk: ${disk_img} (${disk_size})" if [ ! -f "${disk_img}" ]; then # If there is no disk image, create a new image. mkdir -p "${VMDIR}" 2>/dev/null case ${preallocation} in off|metadata|falloc|full) true;; *) echo "ERROR! ${preallocation} is an unsupported disk preallocation option." exit 1;; esac case ${disk_format} in qcow2) create_options="lazy_refcounts=on,preallocation=${preallocation},nocow=on";; raw) create_options="preallocation=${preallocation}";; *) true;; esac # https://blog.programster.org/qcow2-performance if ! ${QEMU_IMG} create -q -f "${disk_format}" -o "${create_options=}" "${disk_img}" "${disk_size}"; then echo "ERROR! Failed to create ${disk_img} using ${disk_format} format." exit 1 fi if [ -z "${iso}" ] && [ -z "${img}" ]; then echo "ERROR! You haven't specified a .iso or .img image to boot from." exit 1 fi echo " Just created, booting from ${iso}${img}" DISK_USED="no" elif [ -e "${disk_img}" ]; then # If the VM is not running, check for disk related issues. if [ -z "${VM_PID}" ]; then # Check there isn't already a process attached to the disk image. if ! ${QEMU_IMG} info "${disk_img}" >/dev/null; then echo " Failed to get \"write\" lock. Is another process using the disk?" exit 1 fi else if ! ${QEMU_IMG} check -q "${disk_img}"; then echo " Disk integrity check failed. Please run qemu-img check --help." echo "${QEMU_IMG}" check "${disk_img}" exit 1 fi fi # Only check disk image size if preallocation is off if [ "${preallocation}" == "off" ]; then DISK_CURR_SIZE=$(${STAT} -c%s "${disk_img}") if [ "${DISK_CURR_SIZE}" -le "${DISK_MIN_SIZE}" ]; then echo " Looks unused, booting from ${iso}${img}" if [ -z "${iso}" ] && [ -z "${img}" ]; then echo "ERROR! You haven't specified a .iso or .img image to boot from." exit 1 fi else DISK_USED="yes" fi else DISK_USED="yes" fi fi if [ "${DISK_USED}" == "yes" ] && [ "${guest_os}" != "kolibrios" ]; then # If there is a disk image that appears to be used do not boot from installation media. iso="" img="" fi # Has the status quo been requested? if [ "${STATUS_QUO}" == "-snapshot" ]; then if [ -z "${img}" ] && [ -z "${iso}" ]; then echo " Existing disk state will be preserved, no writes will be committed." fi fi if [ -n "${iso}" ] && [ -e "${iso}" ]; then echo " - Boot ISO: ${iso}" elif [ -n "${img}" ] && [ -e "${img}" ]; then echo " - Recovery: ${img}" fi if [ -n "${fixed_iso}" ] && [ -e "${fixed_iso}" ]; then echo " - CD-ROM: ${fixed_iso}" fi } function configure_display() { # Determine which audio driver use between Pulseaudio or ALSA local AUDIO_DRIVER="pa" if ! command -v pacmd >/dev/null 2>&1 ; then AUDIO_DRIVER="alsa" fi # Setup the appropriate audio device based on the display output # https://www.kraxel.org/blog/2020/01/qemu-sound-audiodev/ case ${display} in cocoa) AUDIO_DEV="coreaudio,id=audio0";; none|spice|spice-app) AUDIO_DEV="spice,id=audio0";; *) AUDIO_DEV="${AUDIO_DRIVER},id=audio0";; esac # Determine a sane resolution for Linux guests. local X_RES="1280" local Y_RES="800" if [ -n "${width}" ] && [ -n "${height}" ]; then local X_RES="${width}" local Y_RES="${height}" fi # https://www.kraxel.org/blog/2019/09/display-devices-in-qemu/ case ${guest_os} in *bsd) DISPLAY_DEVICE="VGA";; linux_old|solaris) DISPLAY_DEVICE="vmware-svga";; linux) case ${display} in none|spice|spice-app) DISPLAY_DEVICE="virtio-gpu";; *) DISPLAY_DEVICE="virtio-vga";; esac;; macos) # qxl-vga and VGA supports seamless mouse and sane resolutions if only # one scanout is used. '-vga none' is added to the QEMU command line # to avoid having two scanouts. DISPLAY_DEVICE="VGA";; windows|windows-server) # virtio-gpu "works" with gtk but is limited to 1024x1024 and exhibits other issues # https://kevinlocke.name/bits/2021/12/10/windows-11-guest-virtio-libvirt/#video case ${display} in gtk|none|spice) DISPLAY_DEVICE="qxl-vga";; cocoa|sdl|spice-app) DISPLAY_DEVICE="virtio-vga";; esac;; *) DISPLAY_DEVICE="qxl-vga";; esac # Map Quickemu $display to QEMU -display case ${display} in gtk) DISPLAY_RENDER="${display},grab-on-hover=on,zoom-to-fit=off,gl=${gl}";; none|spice) DISPLAY_RENDER="none";; sdl) DISPLAY_RENDER="${display},gl=${gl}";; spice-app) DISPLAY_RENDER="${display},gl=${gl}";; *) DISPLAY_RENDER="${display}";; esac # https://www.kraxel.org/blog/2021/05/virtio-gpu-qemu-graphics-update/ if [ "${gl}" == "on" ] && [ "${DISPLAY_DEVICE}" == "virtio-vga" ]; then if [ "${QEMU_VER_SHORT}" -ge 61 ]; then DISPLAY_DEVICE="${DISPLAY_DEVICE}-gl" else DISPLAY_DEVICE="${DISPLAY_DEVICE},virgl=on" fi echo -n " - Display: ${display^^}, ${DISPLAY_DEVICE}, GL (${gl}), VirGL (on)" else echo -n " - Display: ${display^^}, ${DISPLAY_DEVICE}, GL (${gl}), VirGL (off)" fi # Build the video configuration VIDEO="-device ${DISPLAY_DEVICE}" # Try and coerce the display resolution for Linux guests only. if [ "${DISPLAY_DEVICE}" != "vmware-svga" ]; then VIDEO="${VIDEO},xres=${X_RES},yres=${Y_RES}" echo " @ (${X_RES} x ${Y_RES})" else echo " " fi # Allocate VRAM to VGA devices case ${DISPLAY_DEVICE} in bochs-display) VIDEO="${VIDEO},vgamem=67108864";; qxl|qxl-vga) VIDEO="${VIDEO},ram_size=65536,vram_size=65536,vgamem_mb=64";; ati-vga|cirrus-vga|VGA|vmware-svga) VIDEO="${VIDEO},vgamem_mb=256";; esac # Configure multiscreen if max_outputs was provided in the .conf file if [ -n "${max_outputs}" ]; then VIDEO="${VIDEO},max_outputs=${max_outputs}" fi # Run QEMU with '-vga none' to avoid having two scanouts, one for VGA and # another for virtio-vga-gl. This works around a GTK assertion failure and # allows seamless mouse in macOS when using the qxl-vga device. # https://www.collabora.com/news-and-blog/blog/2021/11/26/venus-on-qemu-enabling-new-virtual-vulkan-driver/ # https://github.com/quickemu-project/quickemu/issues/222 VGA="-vga none" # Add fullscreen options VIDEO="${VGA} ${VIDEO} ${FULLSCREEN}" } function configure_audio() { # Build the sound hardware configuration case ${sound_card} in ich9-intel-hda|intel-hda) SOUND="-device ${sound_card} -device ${sound_duplex},audiodev=audio0";; usb-audio) SOUND="-device ${sound_card},audiodev=audio0";; ac97|es1370|sb16) SOUND="-device ${sound_card},audiodev=audio0";; none) SOUND="";; esac echo " - Sound: ${sound_card} (${sound_duplex})" } function configure_ports() { echo -n "" > "${VMDIR}/${VMNAME}.ports" if [ -z "${ssh_port}" ]; then # Find a free port to expose ssh to the guest ssh_port=$(get_port 22220 9) fi if [ -n "${ssh_port}" ]; then echo "ssh,${ssh_port}" >> "${VMDIR}/${VMNAME}.ports" NET="${NET},hostfwd=tcp::${ssh_port}-:22" echo " - ssh: On host: ssh user@localhost -p ${ssh_port}" else echo " - ssh: All ssh ports have been exhausted." fi # Have any port forwards been requested? if (( ${#port_forwards[@]} )); then echo " - PORTS: Port forwards requested:" for FORWARD in "${port_forwards[@]}"; do HOST_PORT=$(echo "${FORWARD}" | cut -d':' -f1) GUEST_PORT=$(echo "${FORWARD}" | cut -d':' -f2) echo " - ${HOST_PORT} => ${GUEST_PORT}" NET="${NET},hostfwd=tcp::${HOST_PORT}-:${GUEST_PORT}" NET="${NET},hostfwd=udp::${HOST_PORT}-:${GUEST_PORT}" done fi if [ "${display}" == "none" ] || [ "${display}" == "spice" ] || [ "${display}" == "spice-app" ]; then SPICE="disable-ticketing=on" # gl=on can be use with 'spice' too, but only over local connections (not tcp ports) if [ "${display}" == "spice-app" ]; then SPICE+=",gl=${gl}" fi # TODO: Don't use ports so local-only connections can be used with gl=on if [ -z "${spice_port}" ]; then # Find a free port for spice spice_port=$(get_port 5930 9) fi # ALLOW REMOTE ACCESS TO SPICE OVER LAN RATHER THAN JUST LOCALHOST if [ -z "${ACCESS}" ]; then SPICE_ADDR="127.0.0.1" else if [ "${ACCESS}" == "remote" ]; then SPICE_ADDR="" elif [ "${ACCESS}" == "local" ]; then SPICE_ADDR="127.0.0.1" else SPICE_ADDR="${ACCESS}" fi fi if [ -z "${spice_port}" ]; then echo " - SPICE: All SPICE ports have been exhausted." if [ "${display}" == "none" ] || [ "${display}" == "spice" ] || [ "${display}" == "spice-app" ]; then echo " ERROR! Requested SPICE display, but no SPICE ports are free." exit 1 fi else if [ "${display}" == "spice-app" ]; then echo " - SPICE: Enabled" else echo "spice,${spice_port}" >> "${VMDIR}/${VMNAME}.ports" echo -n " - SPICE: On host: spicy --title \"${VMNAME}\" --port ${spice_port}" if [ "${guest_os}" != "macos" ] && [ -n "${PUBLIC}" ]; then echo -n " --spice-shared-dir ${PUBLIC}" fi echo "${FULLSCREEN}" SPICE="${SPICE},port=${spice_port},addr=${SPICE_ADDR}" fi fi fi } function configure_file_sharing() { if [ -n "${PUBLIC}" ]; then # WebDAV case ${guest_os} in macos) if [ "${display}" == "none" ] || [ "${display}" == "spice" ] || [ "${display}" == "spice-app" ]; then # Reference: https://gitlab.gnome.org/GNOME/phodav/-/issues/5 echo " - WebDAV: On guest: build spice-webdavd (https://gitlab.gnome.org/GNOME/phodav/-/merge_requests/24)" echo " - WebDAV: On guest: Finder -> Connect to Server -> http://localhost:9843/" fi;; *) echo " - WebDAV: On guest: dav://localhost:9843/";; esac # 9P if [ "${guest_os}" != "windows" ] || [ "${guest_os}" == "windows-server" ]; then echo -n " - 9P: On guest: " if [ "${guest_os}" == "linux" ]; then echo "sudo mount -t 9p -o trans=virtio,version=9p2000.L,msize=104857600 ${PUBLIC_TAG} ~/$(basename "${PUBLIC}")" elif [ "${guest_os}" == "macos" ]; then # PUBLICSHARE needs to be world writeable for seamless integration with # macOS. Test if it is world writeable, and prompt what to do if not. echo "sudo mount_9p ${PUBLIC_TAG}" if [ "${PUBLIC_PERMS}" != "drwxrwxrwx" ]; then echo " - 9P: On host: chmod 777 ${PUBLIC}" echo " Required for macOS integration 👆" fi fi fi # SMB # We need to search in NixOS compatible paths as well as the standard location # since /usr/sbin/smbd may not be in the PATH. if [ -x "$(command -v smbd)" ] || [ -x "/usr/sbin/smbd" ]; then NET+=",smb=${PUBLIC}" echo " - smbd: On guest: smb://10.0.2.4/qemu" fi fi } function configure_tpm() { # Start TPM if [ "${tpm}" == "on" ]; then local tpm_args=() # shellcheck disable=SC2054 tpm_args+=(socket --ctrl type=unixio,path="${VMDIR}/${VMNAME}.swtpm-sock" --terminate --tpmstate dir="${VMDIR}" --tpm2) echo "${SWTPM} ${tpm_args[*]} &" >> "${VMDIR}/${VMNAME}.sh" ${SWTPM} "${tpm_args[@]}" >> "${VMDIR}/${VMNAME}.log" & echo " - TPM: ${VMDIR}/${VMNAME}.swtpm-sock (${!})" sleep 0.25 fi } function vm_boot() { AUDIO_DEV="" BALLOON="-device virtio-balloon" BOOT_STATUS="" CPU="" DISK_USED="" DISPLAY_DEVICE="" DISPLAY_RENDER="" EFI_CODE="" EFI_VARS="" GUEST_CPU_CORES="" GUEST_CPU_LOGICAL_CORES="" GUEST_CPU_THREADS="" HOST_CPU_CORES="" HOST_CPU_SMT="" HOST_CPU_SOCKETS="" HOST_CPU_VENDOR="" GUEST_TWEAKS="" KERNEL_NAME="Unknown" KERNEL_NODE="" KERNEL_VER="?" OS_RELEASE="Unknown OS" MACHINE_TYPE="${MACHINE_TYPE:-q35}" MAC_BOOTLOADER="" MAC_MISSING="" MAC_DISK_DEV="${MAC_DISK_DEV:-ide-hd,bus=ahci.2}" NET_DEVICE="${NET_DEVICE:-virtio-net}" SOUND="" SPICE="" SMM="${SMM:-off}" local TEMP_PORT="" USB_HOST_PASSTHROUGH_CONTROLLER="qemu-xhci" VGA="" VIDEO="" KERNEL_NAME="$(uname -s)" KERNEL_NODE="$(uname -n | cut -d'.' -f 1)" KERNEL_VER="$(uname -r)" if [ "${OS_KERNEL}" == "Darwin" ]; then # Get macOS product name and version using swvers if [ -x "$(command -v sw_vers)" ]; then OS_RELEASE="$(sw_vers -productName) $(sw_vers -productVersion)" fi elif [ -e /etc/os-release ]; then OS_RELEASE=$(grep PRETTY_NAME /etc/os-release | cut -d'"' -f2) fi echo "Quickemu ${VERSION} using ${QEMU} v${QEMU_VER_LONG}" echo " - Host: ${OS_RELEASE} running ${KERNEL_NAME} ${KERNEL_VER} ${KERNEL_NODE}" # Force to lowercase. boot=${boot,,} guest_os=${guest_os,,} args=() # Set the hostname of the VM NET="user,hostname=${VMNAME}" configure_cpu configure_ram configure_bios configure_os_quirks configure_storage configure_display configure_audio configure_ports configure_file_sharing configure_usb configure_tpm echo "#!/usr/bin/env bash" > "${VMDIR}/${VMNAME}.sh" # Changing process name is not supported on macOS if [ "${OS_KERNEL}" == "Linux" ]; then # shellcheck disable=SC2054,SC2206,SC2140 args+=(-name ${VMNAME},process=${VMNAME}) fi # shellcheck disable=SC2054,SC2206,SC2140 args+=(-machine ${MACHINE_TYPE},smm=${SMM},vmport=off,accel=${QEMU_ACCEL} ${GUEST_TWEAKS} ${CPU} ${SMP} -m ${RAM_VM} ${BALLOON} -pidfile "${VMDIR}/${VMNAME}.pid") if [ "${guest_os}" == "windows" ] || [ "${guest_os}" == "windows-server" ] || [ "${guest_os}" == "reactos" ] || [ "${guest_os}" == "freedos" ]; then # shellcheck disable=SC2054 args+=(-rtc base=localtime,clock=host,driftfix=slew) else # shellcheck disable=SC2054 args+=(-rtc base=utc,clock=host) fi # shellcheck disable=SC2206 args+=(${VIDEO} -display ${DISPLAY_RENDER}) # Only enable SPICE is using SPICE display if [ "${display}" == "none" ] || [ "${display}" == "spice" ] || [ "${display}" == "spice-app" ]; then # shellcheck disable=SC2054 args+=(-spice "${SPICE}" -device virtio-serial-pci -chardev socket,id=agent0,path="${VMDIR}/${VMNAME}-agent.sock",server=on,wait=off -device virtserialport,chardev=agent0,name=org.qemu.guest_agent.0 -chardev spicevmc,id=vdagent0,name=vdagent -device virtserialport,chardev=vdagent0,name=com.redhat.spice.0 -chardev spiceport,id=webdav0,name=org.spice-space.webdav.0 -device virtserialport,chardev=webdav0,name=org.spice-space.webdav.0) fi # shellcheck disable=SC2054 args+=(-device virtio-rng-pci,rng=rng0 -object rng-random,id=rng0,filename=/dev/urandom) # macOS doesn't support SPICE if [ "${OS_KERNEL}" == "Linux" ]; then # shellcheck disable=SC2054 args+=(-device "${USB_HOST_PASSTHROUGH_CONTROLLER}",id=spicepass -chardev spicevmc,id=usbredirchardev1,name=usbredir -device usb-redir,chardev=usbredirchardev1,id=usbredirdev1 -chardev spicevmc,id=usbredirchardev2,name=usbredir -device usb-redir,chardev=usbredirchardev2,id=usbredirdev2 -chardev spicevmc,id=usbredirchardev3,name=usbredir -device usb-redir,chardev=usbredirchardev3,id=usbredirdev3 -device pci-ohci,id=smartpass -device usb-ccid) if ${QEMU} -device help | grep -q "passthrough smartcard"; then # shellcheck disable=SC2054 args+=(-chardev spicevmc,id=ccid,name=smartcard -device ccid-card-passthru,chardev=ccid) else echo " - WARNING! ${QEMU} or SPICE was not compiled with support for smartcard devices" fi fi # setup usb-controller if [ "${usb_controller}" == "ehci" ]; then # shellcheck disable=SC2054 args+=(-device usb-ehci,id=input) elif [ "${usb_controller}" == "xhci" ]; then # shellcheck disable=SC2054 args+=(-device qemu-xhci,id=input) elif [ "${usb_controller}" == "none" ]; then # add nothing : else echo " - WARNING! Unknown usb-controller value: '${usb_controller}'" fi # setup keyboard # @INFO: must be set after usb-controller if [ "${keyboard}" == "usb" ]; then # shellcheck disable=SC2054 args+=(-device usb-kbd,bus=input.0) elif [ "${keyboard}" == "virtio" ]; then # shellcheck disable=SC2054 args+=(-device virtio-keyboard) elif [ "${keyboard}" == "ps2" ]; then # add nothing, default is ps/2 keyboard : else echo " - WARNING! Unknown keyboard value: '${keyboard}'; Fallback to ps2" fi # setup keyboard_layout # @INFO: When using the VNC display, you must use the -k parameter to set the keyboard layout if you are not using en-us. if [ -n "${keyboard_layout}" ]; then args+=(-k "${keyboard_layout}") fi # Braille requires SDL, so disable for macOS if [ -n "${BRAILLE}" ] && [ "${OS_KERNEL}" == "Linux" ]; then if ${QEMU} -chardev help | grep -q braille; then # shellcheck disable=SC2054 #args+=(-chardev braille,id=brltty # -device usb-braille,id=usbbrl,chardev=brltty) args+=(-usbdevice braille) else echo " - WARNING! ${QEMU} does not support -chardev braille " fi fi # setup mouse # @INFO: must be set after usb-controller if [ "${mouse}" == "usb" ]; then # shellcheck disable=SC2054 args+=(-device usb-mouse,bus=input.0) elif [ "${mouse}" == "tablet" ]; then # shellcheck disable=SC2054 args+=(-device usb-tablet,bus=input.0) elif [ "${mouse}" == "virtio" ]; then # shellcheck disable=SC2054 args+=(-device virtio-mouse) elif [ "${mouse}" == "ps2" ]; then # add nothing, default is ps/2 mouse : else echo " - WARNING! Unknown mouse value: '${mouse}'; Falling back to ps2" fi # setup audio # @INFO: must be set after usb-controller; in case usb-audio is used # shellcheck disable=SC2206 args+=(-audiodev ${AUDIO_DEV} ${SOUND}) # $bridge backwards compatibility for Quickemu <= 4.0 if [ -n "${bridge}" ]; then network="${bridge}" fi if [ "${network}" == "none" ]; then # Disable all networking echo " - Network: Disabled" args+=(-nic none) elif [ "${network}" == "restrict" ]; then echo " - Network: Restricted (${NET_DEVICE})" # shellcheck disable=SC2054,SC2206 args+=(-device ${NET_DEVICE},netdev=nic -netdev ${NET},restrict=y,id=nic) elif [ -n "${network}" ]; then # Enable bridge mode networking echo " - Network: Bridged (${network})" # If a persistent MAC address is provided, use it. local MAC="" if [ -n "${macaddr}" ]; then MAC=",mac=${macaddr}" fi # shellcheck disable=SC2054,SC2206 args+=(-nic bridge,br=${network},model=virtio-net-pci${MAC}) else echo " - Network: User (${NET_DEVICE})" # shellcheck disable=SC2054,SC2206 args+=(-device ${NET_DEVICE},netdev=nic -netdev ${NET},id=nic) fi # Add the disks # - https://turlucode.com/qemu-disk-io-performance-comparison-native-or-threads-windows-10-version/ if [[ "${boot}" == *"efi"* ]]; then # shellcheck disable=SC2054 args+=(-global driver=cfi.pflash01,property=secure,value=on -drive if=pflash,format=raw,unit=0,file="${EFI_CODE}",readonly=on -drive if=pflash,format=raw,unit=1,file="${EFI_VARS}") fi if [ -n "${iso}" ] && [ "${guest_os}" == "freedos" ]; then # FreeDOS reboots after partitioning the disk, and QEMU tries to boot from disk after first restart # This flag sets the boot order to cdrom,disk. It will persist until powering down the VM args+=(-boot order=dc) elif [ -n "${iso}" ] && [ "${guest_os}" == "kolibrios" ]; then # Since there is bug (probably) in KolibriOS: cdrom indexes 0 or 1 make system show an extra unexisting iso, so we use index=2 # shellcheck disable=SC2054 args+=(-drive media=cdrom,index=2,file="${iso}") iso="" elif [ -n "${iso}" ] && [ "${guest_os}" == "reactos" ]; then # https://reactos.org/wiki/QEMU # shellcheck disable=SC2054 args+=(-boot order=d -drive if=ide,index=2,media=cdrom,file="${iso}") iso="" elif [ -n "${iso}" ] && [ "${guest_os}" == "windows" ] && [ -e "${VMDIR}/unattended.iso" ]; then # Attach the unattended configuration to Windows guests when booting from ISO # shellcheck disable=SC2054 args+=(-drive media=cdrom,index=2,file="${VMDIR}/unattended.iso") fi if [ -n "${floppy}" ]; then # shellcheck disable=SC2054 args+=(-drive if=floppy,format=raw,file="${floppy}") fi if [ -n "${iso}" ]; then # shellcheck disable=SC2054 args+=(-drive media=cdrom,index=0,file="${iso}") fi if [ -n "${fixed_iso}" ]; then # shellcheck disable=SC2054 args+=(-drive media=cdrom,index=1,file="${fixed_iso}") fi if [ "${guest_os}" == "macos" ]; then # shellcheck disable=SC2054 args+=(-device ahci,id=ahci -device ide-hd,bus=ahci.0,drive=BootLoader,bootindex=0 -drive id=BootLoader,if=none,format=qcow2,file="${MAC_BOOTLOADER}") if [ -n "${img}" ]; then # shellcheck disable=SC2054 args+=(-device ide-hd,bus=ahci.1,drive=RecoveryImage -drive id=RecoveryImage,if=none,format=raw,file="${img}") fi # shellcheck disable=SC2054,SC2206 args+=(-device ${MAC_DISK_DEV},drive=SystemDisk -drive id=SystemDisk,if=none,format=qcow2,file="${disk_img}" ${STATUS_QUO}) elif [ "${guest_os}" == "kolibrios" ]; then # shellcheck disable=SC2054,SC2206 args+=(-device ahci,id=ahci -device ide-hd,bus=ahci.0,drive=SystemDisk -drive id=SystemDisk,if=none,format=qcow2,file="${disk_img}" ${STATUS_QUO}) elif [ "${guest_os}" == "batocera" ] ; then # shellcheck disable=SC2054,SC2206 args+=(-device virtio-blk-pci,drive=BootDisk -drive id=BootDisk,if=none,format=raw,file="${img}" -device virtio-blk-pci,drive=SystemDisk -drive id=SystemDisk,if=none,format=qcow2,file="${disk_img}" ${STATUS_QUO}) elif [ "${guest_os}" == "reactos" ]; then # https://reactos.org/wiki/QEMU # shellcheck disable=SC2054,SC2206 args+=(-drive if=ide,index=0,media=disk,file="${disk_img}") elif [ "${guest_os}" == "windows-server" ]; then # shellcheck disable=SC2054,SC2206 args+=(-device ide-hd,drive=SystemDisk -drive id=SystemDisk,if=none,format=qcow2,file="${disk_img}" ${STATUS_QUO}) else # shellcheck disable=SC2054,SC2206 args+=(-device virtio-blk-pci,drive=SystemDisk -drive id=SystemDisk,if=none,format=${disk_format},file="${disk_img}" ${STATUS_QUO}) fi # https://wiki.qemu.org/Documentation/9psetup # https://askubuntu.com/questions/772784/9p-libvirt-qemu-share-modes if [ "${guest_os}" != "windows" ] || [ "${guest_os}" == "windows-server" ] && [ -n "${PUBLIC}" ]; then # shellcheck disable=SC2054 args+=(-fsdev local,id=fsdev0,path="${PUBLIC}",security_model=mapped-xattr -device virtio-9p-pci,fsdev=fsdev0,mount_tag="${PUBLIC_TAG}") fi if [ -n "${USB_PASSTHROUGH}" ]; then # shellcheck disable=SC2054,SC2206 args+=(-device ${USB_HOST_PASSTHROUGH_CONTROLLER},id=hostpass ${USB_PASSTHROUGH}) fi if [ "${tpm}" == "on" ] && [ -S "${VMDIR}/${VMNAME}.swtpm-sock" ]; then # shellcheck disable=SC2054 args+=(-chardev socket,id=chrtpm,path="${VMDIR}/${VMNAME}.swtpm-sock" -tpmdev emulator,id=tpm0,chardev=chrtpm -device tpm-tis,tpmdev=tpm0) fi if [ "${monitor}" == "none" ]; then args+=(-monitor none) echo " - Monitor: (off)" elif [ "${monitor}" == "telnet" ]; then # Find a free port to expose monitor-telnet to the guest TEMP_PORT="$(get_port "${monitor_telnet_port}" 9)" if [ -z "${TEMP_PORT}" ]; then echo " - Monitor: All Monitor-Telnet ports have been exhausted." else monitor_telnet_port="${TEMP_PORT}" # shellcheck disable=SC2054 args+=(-monitor telnet:"${monitor_telnet_host}:${monitor_telnet_port}",server,nowait) echo " - Monitor: On host: telnet ${monitor_telnet_host} ${monitor_telnet_port}" echo "monitor-telnet,${monitor_telnet_port},${monitor_telnet_host}" >> "${VMDIR}/${VMNAME}.ports" fi elif [ "${monitor}" == "socket" ]; then # shellcheck disable=SC2054,SC2206 args+=(-monitor unix:${SOCKET_MONITOR},server,nowait) if command -v socat &>/dev/null; then echo " - Monitor: On host: socat -,echo=0,icanon=0 unix-connect:${SOCKET_MONITOR}" elif command -v nc &>/dev/null; then echo " - Monitor: On host: nc -U \"${SOCKET_MONITOR}\"" fi else echo "ERROR! \"${monitor}\" is an unknown monitor option." exit 1 fi if [ "${serial}" == "none" ]; then args+=(-serial none) echo " - Serial: (off)" elif [ "${serial}" == "telnet" ]; then # Find a free port to expose serial-telnet to the guest TEMP_PORT="$(get_port "${serial_telnet_port}" 9)" if [ -z "${TEMP_PORT}" ]; then echo " - Serial: All Serial Telnet ports have been exhausted." else serial_telnet_port="${TEMP_PORT}" # shellcheck disable=SC2054,SC2206 args+=(-serial telnet:${serial_telnet_host}:${serial_telnet_port},server,nowait) echo " - Serial: On host: telnet ${serial_telnet_host} ${serial_telnet_port}" echo "serial-telnet,${serial_telnet_port},${serial_telnet_host}" >> "${VMDIR}/${VMNAME}.ports" fi elif [ "${serial}" == "socket" ]; then # shellcheck disable=SC2054,SC2206 args+=(-serial unix:${SOCKET_SERIAL},server,nowait) if command -v socat &>/dev/null; then echo " - Serial: On host: socat -,echo=0,icanon=0 unix-connect:${SOCKET_SERIAL}" elif command -v nc &>/dev/null; then echo " - Serial: On host: nc -U \"${SOCKET_SERIAL}\"" fi else echo "ERROR! \"${serial}\" is an unknown serial option." exit 1 fi if [ -n "${extra_args}" ]; then # shellcheck disable=SC2206 args+=(${extra_args}) fi # The OSK parameter contains parenthesis, they need to be escaped in the shell # scripts. The vendor name, Quickemu Project, contains a space. It needs to be # double-quoted. SHELL_ARGS="${args[*]}" SHELL_ARGS="${SHELL_ARGS//\(/\\(}" SHELL_ARGS="${SHELL_ARGS//)/\\)}" SHELL_ARGS="${SHELL_ARGS//Quickemu Project/\"Quickemu Project\"}" if [ -z "${VM_PID}" ]; then echo "${QEMU}" "${SHELL_ARGS}" "2>/dev/null" >> "${VMDIR}/${VMNAME}.sh" sed -i -e 's/ -/ \\\n -/g' "${VMDIR}/${VMNAME}.sh" ${QEMU} "${args[@]}" &> "${VMDIR}/${VMNAME}.log" & VM_PID=$! sleep 0.25 if kill -0 "${VM_PID}" 2>/dev/null; then echo " - Process: Started ${VM} as ${VMNAME} (${VM_PID})" else echo " - Process: ERROR! Failed to start ${VM} as ${VMNAME}" rm -f "${VMDIR}/${VMNAME}.pid" echo && cat "${VMDIR}/${VMNAME}.log" exit 1 fi fi } function start_viewer { errno=0 if [ "${viewer}" != "none" ]; then # If output is 'none' then SPICE was requested. if [ "${display}" == "spice" ]; then if [ "${viewer}" == "remote-viewer" ]; then # show via viewer: remote-viewer if [ -n "${PUBLIC}" ]; then echo " - Viewer: ${viewer} --title \"${VMNAME}\" --spice-shared-dir \"${PUBLIC}\" ${FULLSCREEN} \"spice://localhost:${spice_port}\" >/dev/null 2>&1 &" ${viewer} --title "${VMNAME}" --spice-shared-dir "${PUBLIC}" ${FULLSCREEN} "spice://localhost:${spice_port}" >/dev/null 2>&1 & errno=$? else echo " - Viewer: ${viewer} --title \"${VMNAME}\" ${FULLSCREEN} \"spice://localhost:${spice_port}\" >/dev/null 2>&1 &" ${viewer} --title "${VMNAME}" ${FULLSCREEN} "spice://localhost:${spice_port}" >/dev/null 2>&1 & errno=$? fi elif [ "${viewer}" == "spicy" ]; then # show via viewer: spicy if [ -n "${PUBLIC}" ]; then echo " - Viewer: ${viewer} --title \"${VMNAME}\" --port \"${spice_port}\" --spice-shared-dir \"${PUBLIC}\" \"${FULLSCREEN}\" >/dev/null 2>&1 &" ${viewer} --title "${VMNAME}" --port "${spice_port}" --spice-shared-dir "${PUBLIC}" "${FULLSCREEN}" >/dev/null 2>&1 & errno=$? else echo " - Viewer: ${viewer} --title \"${VMNAME}\" --port \"${spice_port}\" \"${FULLSCREEN}\" >/dev/null 2>&1 &" ${viewer} --title "${VMNAME}" --port "${spice_port}" "${FULLSCREEN}" >/dev/null 2>&1 & errno=$? fi fi if [ ${errno} -ne 0 ]; then echo "WARNING! Could not start viewer (${viewer}) Err: ${errno}" fi fi fi } function shortcut_create { local dirname="${HOME}/.local/share/applications" local filename="${HOME}/.local/share/applications/${VMNAME}.desktop" echo "Creating ${VMNAME} desktop shortcut file" if [ ! -d "${dirname}" ]; then mkdir -p "${dirname}" fi cat << EOF > "${filename}" [Desktop Entry] Version=1.0 Type=Application Terminal=false Exec=$(basename "${0}") --vm ${VM} ${SHORTCUT_OPTIONS} Path=${VMPATH} Name=${VMNAME} Icon=qemu EOF echo " - ${filename} created." } function usage() { echo " _ _" echo " __ _ _ _(_) ___| | _____ _ __ ___ _ _" echo " / _' | | | | |/ __| |/ / _ \ '_ ' _ \| | | |" echo "| (_| | |_| | | (__| < __/ | | | | | |_| |" echo " \__, |\__,_|_|\___|_|\_\___|_| |_| |_|\__,_|" echo " |_| v${VERSION}, using qemu ${QEMU_VER_LONG}" echo "--------------------------------------------------------------------------------" echo " Project - https://github.com/quickemu-project/quickemu" echo " Discord - https://wimpysworld.io/discord" echo "--------------------------------------------------------------------------------" echo echo "Usage" echo " ${LAUNCHER} --vm ubuntu.conf " echo echo "Arguments" echo " --access : Enable remote spice access support. 'local' (default), 'remote', 'clientipaddress'" echo " --braille : Enable braille support. Requires SDL." echo " --delete-disk : Delete the disk image and EFI variables" echo " --delete-vm : Delete the entire VM and its configuration" echo " --display : Select display backend. 'sdl' (default), 'cocoa', 'gtk', 'none', 'spice' or 'spice-app'" echo " --fullscreen : Starts VM in full screen mode (Ctl+Alt+f to exit)" echo " --ignore-msrs-always : Configure KVM to always ignore unhandled machine-specific registers" echo " --kill : Kill the VM process if it is running" echo " --offline : Override all network settings and start the VM offline" echo " --shortcut : Create a desktop shortcut" echo " --snapshot apply : Apply/restore a snapshot." echo " --snapshot create : Create a snapshot." echo " --snapshot delete : Delete a snapshot." echo " --snapshot info : Show disk/snapshot info." echo " --status-quo : Do not commit any changes to disk/snapshot." echo " --viewer : Choose an alternative viewer. @Options: 'spicy' (default), 'remote-viewer', 'none'" echo " --width : Set VM screen width; requires '--height'" echo " --height : Set VM screen height; requires '--width'" echo " --ssh-port : Set SSH port manually" echo " --spice-port : Set SPICE port manually" echo " --public-dir : Expose share directory. @Options: '' (default: xdg-user-dir PUBLICSHARE), '', 'none'" echo " --monitor : Set monitor connection type. @Options: 'socket' (default), 'telnet', 'none'" echo " --monitor-telnet-host : Set telnet host for monitor. (default: 'localhost')" echo " --monitor-telnet-port : Set telnet port for monitor. (default: '4440')" echo " --monitor-cmd : Send command to monitor if available. (Example: system_powerdown)" echo " --serial : Set serial connection type. @Options: 'socket' (default), 'telnet', 'none'" echo " --serial-telnet-host : Set telnet host for serial. (default: 'localhost')" echo " --serial-telnet-port : Set telnet port for serial. (default: '6660')" echo " --keyboard : Set keyboard. @Options: 'usb' (default), 'ps2', 'virtio'" echo " --keyboard_layout : Set keyboard layout: 'en-us' (default)" echo " --mouse : Set mouse. @Options: 'tablet' (default), 'ps2', 'usb', 'virtio'" echo " --usb-controller : Set usb-controller. @Options: 'ehci' (default), 'xhci', 'none'" echo " --sound-card : Set sound card. @Options: 'intel-hda' (default), 'ac97', 'es1370', 'sb16', 'usb-audio', 'none'" echo " --sound-duplex : Set sound card duplex. @Options: 'hda-micro' (default: speaker/mic), 'hda-duplex' (line-in/line-out), 'hda-output' (output-only)" echo " --extra_args : Pass additional arguments to qemu" echo " --version : Print version" } function display_param_check() { # Braille support requires SDL. Override $display if braille was requested. if [ -n "${BRAILLE}" ]; then display="sdl" fi if [ "${OS_KERNEL}" == "Darwin" ]; then if [ "${display}" != "cocoa" ] && [ "${display}" != "none" ]; then echo "ERROR! Requested output '${display}' but only 'cocoa' and 'none' are avalible on macOS." exit 1 fi else if [ "${display}" != "gtk" ] && [ "${display}" != "none" ] && [ "${display}" != "sdl" ] && [ "${display}" != "spice" ] && [ "${display}" != "spice-app" ]; then echo "ERROR! Requested output '${display}' is not recognised." exit 1 fi fi # Set the default 3D acceleration. if [ -z "${gl}" ]; then if command -v glxinfo &>/dev/null; then GLSL_VER=$(glxinfo | grep "OpenGL ES GLSL" | awk '{print $NF}') case ${GLSL_VER} in 1*|2*) gl="off";; *) gl="on";; esac else gl="on" fi fi # Disable GL for cocoa # Enable grab-on-hover for SDL: https://github.com/quickemu-project/quickemu/issues/541 case "${display}" in cocoa) gl="off";; sdl) export SDL_MOUSE_FOCUS_CLICKTHROUGH=1;; esac } function ports_param_check() { if [ -n "${ssh_port}" ] && ! is_numeric "${ssh_port}"; then echo "ERROR: ssh_port must be a number!" exit 1 fi if [ -n "${spice_port}" ] && ! is_numeric "${spice_port}"; then echo "ERROR: spice_port must be a number!" exit 1 fi if [ -n "${monitor_telnet_port}" ] && ! is_numeric "${monitor_telnet_port}"; then echo "ERROR: telnet port must be a number!" exit 1 fi if [ -n "${serial_telnet_port}" ] && ! is_numeric "${serial_telnet_port}"; then echo "ERROR: serial port must be a number!" exit 1 fi } function sound_card_param_check() { if [ "${sound_card}" != "ac97" ] && [ "${sound_card}" != "es1370" ] && [ "${sound_card}" != "ich9-intel-hda" ] && [ "${sound_card}" != "intel-hda" ] && [ "${sound_card}" != "sb16" ] && [ "${sound_card}" != "usb-audio" ] && [ "${sound_card}" != "none" ]; then echo "ERROR! Requested sound card '${sound_card}' is not recognised." exit 1 fi # USB audio requires xhci controller if [ "${sound_card}" == "usb-audio" ]; then usb_controller="xhci"; fi #name "hda-duplex", bus HDA, desc "HDA Audio Codec, duplex (line-out, line-in)" #name "hda-micro", bus HDA, desc "HDA Audio Codec, duplex (speaker, microphone)" #name "hda-output", bus HDA, desc "HDA Audio Codec, output-only (line-out)" if [ "${sound_duplex}" != "hda-duplex" ] && [ "${sound_duplex}" != "hda-micro" ] && [ "${sound_duplex}" != "hda-output" ]; then echo "ERROR! Requested sound duplex '${sound_duplex}' is not recognised." exit 1 fi } function tpm_param_check() { if [ "${tpm}" == "on" ]; then SWTPM=$(command -v swtpm) if [ ! -e "${SWTPM}" ]; then echo "ERROR! TPM is enabled, but swtpm was not found." exit 1 fi fi } function viewer_param_check() { if [ "${OS_KERNEL}" == "Darwin" ]; then return fi if [ "${viewer}" != "none" ] && [ "${viewer}" != "spicy" ] && [ "${viewer}" != "remote-viewer" ]; then echo "ERROR! Requested viewer '${viewer}' is not recognised." exit 1 fi if [ "${viewer}" == "spicy" ] && ! command -v spicy &>/dev/null; then echo "ERROR! Requested 'spicy' as viewer, but 'spicy' is not installed." exit 1 elif [ "${viewer}" == "remote-viewer" ] && ! command -v remote-viewer &>/dev/null; then echo "ERROR! Requested 'remote-viewer' as viewer, but 'remote-viewer' is not installed." exit 1 fi } function fileshare_param_check() { if [ "${PUBLIC}" == "none" ]; then PUBLIC="" else # PUBLICSHARE is the only directory exposed to guest VMs for file # sharing via 9P, spice-webdavd and Samba. This path is not configurable. if [ -z "${PUBLIC}" ]; then if command -v xdg-user-dir &>/dev/null; then PUBLIC=$(xdg-user-dir PUBLICSHARE) elif [ -d "${HOME}/Public" ]; then PUBLIC="${HOME}/Public" fi fi if [ ! -d "${PUBLIC}" ]; then echo " - WARNING! Public directory: '${PUBLIC}' doesn't exist!" else PUBLIC_TAG="Public-${USER,,}" PUBLIC_PERMS=$(${STAT} -c "%A" "${PUBLIC}") fi fi } function parse_ports_from_file { local FILE="${VMDIR}/${VMNAME}.ports" local host_name="" local port_name="" local port_number="" # Loop over each line in the file while IFS= read -r CONF || [ -n "${CONF}" ]; do # parse ports port_name=$(echo "${CONF}" | cut -d',' -f 1) port_number=$(echo "${CONF}" | cut -d',' -f 2) host_name=$(echo "${CONF}" | awk 'FS="," {print $3,"."}') if [ "${port_name}" == "ssh" ]; then ssh_port="${port_number}" elif [ "${port_name}" == "spice" ]; then spice_port="${port_number}" elif [ "${port_name}" == "monitor-telnet" ]; then monitor_telnet_port="${port_number}" monitor_telnet_host="${host_name}" elif [ "${port_name}" == "serial-telnet" ]; then serial_telnet_port="${port_number}" serial_telnet_host="${host_name}" fi done < "${FILE}" } function is_numeric { [[ "$1" =~ ^[0-9]+$ ]] } function monitor_send_cmd { local MSG="${1}" if [ -z "${MSG}" ]; then echo "WARNING! Send to QEMU-Monitor: Message empty!" return 1 fi case "${monitor}" in socket) echo -e " - Sending: via socket ${MSG}" echo -e "${MSG}" | socat -,shut-down unix-connect:"${SOCKET_MONITOR}" > /dev/null 2>&1;; telnet) echo -e " - Sending: via telnet ${MSG}" echo -e "${MSG}" | socat - tcp:"${monitor_telnet_host}":"${monitor_telnet_port}" > /dev/null 2>&1;; *) echo "WARNING! No qemu-monitor channel available - Couldn't send message to monitor!" return 1;; esac return 0 } ### MAIN # Lowercase variables are used in the VM config file only boot="efi" cpu_cores="" disk_format="${disk_format:-qcow2}" disk_img="${disk_img:-}" disk_size="${disk_size:-16G}" display="${display:-sdl}" extra_args="${extra_args:-}" fixed_iso="" floppy="" guest_os="linux" img="" iso="" macaddr="" macos_release="" network="" port_forwards=() preallocation="off" ram="" secureboot="off" tpm="off" usb_devices=() viewer="${viewer:-spicy}" width="${width:-}" height="${height:-}" ssh_port="${ssh_port:-}" spice_port="${spice_port:-}" monitor="${monitor:-socket}" monitor_telnet_port="${monitor_telnet_port:-4440}" monitor_telnet_host="${monitor_telnet_host:-localhost}" serial="${serial:-socket}" serial_telnet_port="${serial_telnet_port:-6660}" serial_telnet_host="${serial_telnet_host:-localhost}" # options: ehci (USB2.0), xhci (USB3.0) usb_controller="${usb_controller:-ehci}" keyboard="${keyboard:-usb}" keyboard_layout="${keyboard_layout:-en-us}" mouse="${mouse:-tablet}" sound_card="${sound_card:-intel-hda}" sound_duplex="${sound_duplex:-hda-micro}" ACCESS="" ACTIONS=() BRAILLE="" FULLSCREEN="" MONITOR_CMD="" PUBLIC="" PUBLIC_PERMS="" PUBLIC_TAG="" SHORTCUT_OPTIONS="" SNAPSHOT_ACTION="" SNAPSHOT_TAG="" SOCKET_MONITOR="" SOCKET_SERIAL="" STATUS_QUO="" USB_PASSTHROUGH="" VM="" VMDIR="" VMNAME="" VMPATH="" # shellcheck disable=SC2155 readonly LAUNCHER=$(basename "${0}") readonly DISK_MIN_SIZE=$((197632 * 8)) readonly VERSION="4.9.7" # TODO: Make this run the native architecture binary ARCH_VM="x86_64" ARCH_HOST=$(uname -m) QEMU=$(command -v qemu-system-${ARCH_VM}) QEMU_IMG=$(command -v qemu-img) if [ ! -x "${QEMU}" ] || [ ! -x "${QEMU_IMG}" ]; then echo "ERROR! QEMU not found. Please make sure 'qemu-system-${ARCH_VM}' and 'qemu-img' are installed." exit 1 fi # Check for gnu tools on macOS STAT="stat" if command -v gstat &>/dev/null; then STAT="gstat" fi OS_KERNEL=$(uname -s) if [ "${OS_KERNEL}" == "Darwin" ]; then display="cocoa" fi QEMU_VER_LONG=$(${QEMU_IMG} --version | head -n 1 | awk '{print $3}') QEMU_VER_SHORT=$(echo "${QEMU_VER_LONG//./}" | cut -c1-2) if [ "${QEMU_VER_SHORT}" -lt 60 ]; then echo "ERROR! QEMU 6.0.0 or newer is required, detected ${QEMU_VER_LONG}." exit 1 fi # Take command line arguments if [ $# -lt 1 ]; then usage exit 1 else while [ $# -gt 0 ]; do case "${1}" in -access|--access) SHORTCUT_OPTIONS+="--access ${2} " ACCESS="${2}" shift 2;; -braille|--braille) SHORTCUT_OPTIONS+="--braille " BRAILLE="on" shift;; -delete|--delete|-delete-disk|--delete-disk) ACTIONS+=(delete_disk) shift;; -delete-vm|--delete-vm) ACTIONS+=(delete_vm) shift;; -display|--display) SHORTCUT_OPTIONS+="--display ${2} " display="${2}" display_param_check shift 2;; -fullscreen|--fullscreen|-full-screen|--full-screen) SHORTCUT_OPTIONS+="--fullscreen " FULLSCREEN="--full-screen" shift;; -ignore-msrs-always|--ignore-msrs-always) ignore_msrs_always exit;; -kill|--kill) ACTIONS+=(kill_vm) shift;; -offline|--offline) SHORTCUT_OPTIONS+="--offline " network="none" shift;; -snapshot|--snapshot) if [ -z "${2}" ]; then echo "ERROR! '--snapshot' needs an action to perform." exit 1 fi SNAPSHOT_ACTION="${2}" if [ -z "${3}" ] && [ "${SNAPSHOT_ACTION}" != "info" ]; then echo "ERROR! '--snapshot ${SNAPSHOT_ACTION}' needs a tag." exit 1 fi SNAPSHOT_TAG="${3}" if [ "${SNAPSHOT_ACTION}" == "info" ]; then shift 2 else shift 3 fi;; -status-quo|--status-quo) STATUS_QUO="-snapshot" shift;; -shortcut|--shortcut) ACTIONS+=(shortcut_create) shift;; -vm|--vm) VM="${2}" shift 2;; -viewer|--viewer) SHORTCUT_OPTIONS+="--viewer ${2} " viewer="${2}" shift 2;; -width|--width) SHORTCUT_OPTIONS+="--width ${2} " width="${2}" shift 2;; -height|--height) SHORTCUT_OPTIONS+="--height ${2} " height="${2}" shift 2;; -ssh-port|--ssh-port) SHORTCUT_OPTIONS+="--ssh-port ${2} " ssh_port="${2}" shift 2;; -spice-port|--spice-port) SHORTCUT_OPTIONS+="--spice-port ${2} " spice_port="${2}" shift 2;; -public-dir|--public-dir) SHORTCUT_OPTIONS+="--public-dir ${2} " PUBLIC="${2}" shift 2;; -monitor|--monitor) SHORTCUT_OPTIONS+="--monitor ${2} " monitor="${2}" shift 2;; -monitor-cmd|--monitor-cmd) SHORTCUT_OPTIONS+="--monitor-cmd ${2} " MONITOR_CMD="${2}" shift 2;; -monitor-telnet-host|--monitor-telnet-host) SHORTCUT_OPTIONS+="--monitor-telnet-host ${2} " monitor_telnet_host="${2}" shift 2;; -monitor-telnet-port|--monitor-telnet-port) SHORTCUT_OPTIONS+="--monitor-telnet-port ${2} " monitor_telnet_port="${2}" shift 2;; -serial|--serial) SHORTCUT_OPTIONS+="--serial ${2} " serial="${2}" shift 2;; -serial-telnet-host|--serial-telnet-host) SHORTCUT_OPTIONS+="--serial-telnet-host ${2} " serial_telnet_host="${2}" shift 2;; -serial-telnet-port|--serial-telnet-port) SHORTCUT_OPTIONS+="--serial-telnet-port ${2} " serial_telnet_port="${2}" shift 2;; -keyboard|--keyboard) SHORTCUT_OPTIONS+="--keyboard ${2} " keyboard="${2}" shift 2;; -keyboard_layout|--keyboard_layout) SHORTCUT_OPTIONS+="--keyboard_layout ${2} " keyboard_layout="${2}" shift 2;; -mouse|--mouse) SHORTCUT_OPTIONS+="--mouse ${2} " mouse="${2}" shift 2;; -usb-controller|--usb-controller) SHORTCUT_OPTIONS+="--usb-controller ${2} " usb_controller="${2}" shift 2;; -extra_args|--extra_args) SHORTCUT_OPTIONS+="--extra_args ${2} " extra_args+="${2}" shift 2;; -sound-card|--sound-card) SHORTCUT_OPTIONS+="--sound-card ${2} " sound_card="${2}" shift 2;; -sound-duplex|--sound-duplex) SHORTCUT_OPTIONS+="--sound-duplex ${2} " sound_duplex="${2}" shift 2;; -version|--version) echo "${VERSION}" exit;; -h|--h|-help|--help) usage exit 0;; *) echo "ERROR! \"${1}\" is not a supported parameter." usage exit 1;; esac done fi if [ -n "${VM}" ] && [ -e "${VM}" ]; then # shellcheck source=/dev/null source "${VM}" VMDIR=$(dirname "${disk_img}") # directory the VM disk and state files are stored VMNAME=$(basename "${VM}" .conf) # name of the VM VMPATH=$(realpath "$(dirname "${VM}")") # path to the top-level VM directory SOCKET_MONITOR="${VMDIR}/${VMNAME}-monitor.socket" SOCKET_SERIAL="${VMDIR}/${VMNAME}-serial.socket" # if disk_img is not configured, do the right thing. if [ -z "${disk_img}" ]; then disk_img="${VMDIR}/disk.${disk_format}" fi # Fixes running VMs when PWD is not relative to the VM directory # https://github.com/quickemu-project/quickemu/pull/875 if [ ! -f "${disk_img}" ]; then pushd "${VMPATH}" >/dev/null || exit fi # Check if VM is already running VM_PID="" if [ -r "${VMDIR}/${VMNAME}.pid" ]; then VM_PID=$(head -n 1 "${VMDIR}/${VMNAME}.pid") if ! kill -0 "${VM_PID}" > /dev/null 2>&1; then #VM is not running, cleaning up. VM_PID="" rm -f "${VMDIR}/${VMNAME}.pid" fi fi # Iterate over any actions and exit. if [ ${#ACTIONS[@]} -ge 1 ]; then for ACTION in "${ACTIONS[@]}"; do ${ACTION} done exit fi if [ -n "${SNAPSHOT_ACTION}" ]; then case ${SNAPSHOT_ACTION} in apply) snapshot_apply "${SNAPSHOT_TAG}" snapshot_info exit;; create) snapshot_create "${SNAPSHOT_TAG}" snapshot_info exit;; delete) snapshot_delete "${SNAPSHOT_TAG}" snapshot_info exit;; info) echo "Snapshot information ${disk_img}" snapshot_info exit;; *) echo "ERROR! \"${SNAPSHOT_ACTION}\" is not a supported snapshot action." usage exit 1;; esac fi else echo "ERROR! Virtual machine configuration not found." usage exit 1 fi display_param_check ports_param_check sound_card_param_check tpm_param_check viewer_param_check fileshare_param_check if [ -z "${VM_PID}" ]; then vm_boot start_viewer # If the VM being started is an uninstalled Windows VM then auto-skip the press-any key prompt. if [ -n "${iso}" ] && [[ "${guest_os}" == "windows"* ]]; then # shellcheck disable=SC2034 for LOOP in {1..5}; do sleep 1 monitor_send_cmd "sendkey ret" done fi else echo "${VMNAME}" echo " - Process: Already running ${VM} as ${VMNAME} (${VM_PID})" parse_ports_from_file start_viewer fi if [ -n "${MONITOR_CMD}" ]; then monitor_send_cmd "${MONITOR_CMD}" fi # vim:tabstop=4:shiftwidth=4:expandtab quickemu-4.9.7/quickget000077500000000000000000004240471473451027600151440ustar00rootroot00000000000000#!/usr/bin/env bash # SC2317: Command appears to be unreachable. Check usage (or ignore if invoked indirectly). # - https://www.shellcheck.net/wiki/SC2317 # - Disable globally because many functions are called indirectly # shellcheck disable=SC2317 export LC_ALL=C function cleanup() { if [ -n "$(jobs -p)" ]; then kill "$(jobs -p)" 2>/dev/null fi } function os_info() { local SIMPLE_NAME="" local INFO="" SIMPLE_NAME="${1}" case ${SIMPLE_NAME} in #name) INFO="PrettyName|Credentials|Homepage|Info";; alma) INFO="AlmaLinux|-|https://almalinux.org/|Community owned and governed, forever-free enterprise Linux distribution, focused on long-term stability, providing a robust production-grade platform. AlmaLinux OS is binary compatible with RHEL®.";; alpine) INFO="Alpine Linux|-|https://alpinelinux.org/|Security-oriented, lightweight Linux distribution based on musl libc and busybox.";; android) INFO="Android x86|-|https://www.android-x86.org/|Port Android Open Source Project to x86 platform.";; antix) INFO="Antix|-|https://antixlinux.com/|Fast, lightweight and easy to install systemd-free linux live CD distribution based on Debian Stable for Intel-AMD x86 compatible systems.";; archcraft) INFO="Archcraft|-|https://archcraft.io/|Yet another minimal Linux distribution, based on Arch Linux.";; archlinux) INFO="Arch Linux|-|https://archlinux.org/|Lightweight and flexible Linux® distribution that tries to Keep It Simple.";; arcolinux) INFO="Arco Linux|-|https://arcolinux.com/|Is all about becoming an expert in linux.";; artixlinux) INFO="Artix Linux|-|https://artixlinux.org/|The Art of Linux. Simple. Fast. Systemd-free.";; athenaos) INFO="Athena OS|-|https://athenaos.org/|Offer a different experience than the most used pentesting distributions by providing only tools that fit with the user needs and improving the access to hacking resources and learning materials.";; batocera) INFO="Batocera|-|https://batocera.org/|Retro-gaming distribution with the aim of turning any computer/nano computer into a gaming console during a game or permanently.";; bazzite) INFO="Bazzite|-|https://github.com/ublue-os/bazzite/|Container native gaming and a ready-to-game SteamOS like.";; biglinux) INFO="BigLinux|-|https://www.biglinux.com.br/|Is the right choice if you want to have an easy and enriching experience with Linux. It has been perfected over more than 19 years, following our motto: 'In search of the perfect system'.";; blendos) INFO="BlendOS|-|https://blendos.co/|A seamless blend of all Linux distributions. Allows you to have an immutable, atomic and declarative Arch Linux system, with application support from several Linux distributions & Android.";; bodhi) INFO="Bodhi|-|https://www.bodhilinux.com/|Lightweight distribution featuring the fast & fully customizable Moksha Desktop.";; bunsenlabs) INFO="BunsenLabs|-|https://www.bunsenlabs.org/|Light-weight and easily customizable Openbox desktop. The project is a community continuation of CrunchBang Linux.";; cachyos) INFO="CachyOS|-|https://cachyos.org/|Designed to deliver lightning-fast speeds and stability, ensuring a smooth and enjoyable computing experience every time you use it.";; centos-stream) INFO="CentOS Stream|-|https://www.centos.org/centos-stream/|Continuously delivered distro that tracks just ahead of Red Hat Enterprise Linux (RHEL) development, positioned as a midstream between Fedora Linux and RHEL.";; chimeralinux) INFO="Chimera Linux|anon:chimera root:chimera|https://chimera-linux.org/|Modern, general-purpose non-GNU Linux distribution.";; crunchbang++) INFO="Crunchbangplusplus|-|https://www.crunchbangplusplus.org/|The classic minimal crunchbang feel, now with debian 12 bookworm.";; debian) INFO="Debian|-|https://www.debian.org/|Complete Free Operating System with perfect level of ease of use and stability.";; deepin) INFO="Deepin|-|https://www.deepin.org/|Beautiful UI design, intimate human-computer interaction, and friendly community environment make you feel at home.";; devuan) INFO="Devuan|-|https://www.devuan.org/|Fork of Debian without systemd that allows users to reclaim control over their system by avoiding unnecessary entanglements and ensuring Init Freedom.";; dragonflybsd) INFO="DragonFlyBSD|-|https://www.dragonflybsd.org/|Provides an opportunity for the BSD base to grow in an entirely different direction from the one taken in the FreeBSD, NetBSD, and OpenBSD series.";; easyos) INFO="EasyOS|-|https://easyos.org/|Experimental distribution designed from scratch to support containers.";; edubuntu) INFO="Edubuntu|-|https://www.edubuntu.org/|Stable, secure and privacy concious option for schools.";; elementary) INFO="elementary OS|-|https://elementary.io/|Thoughtful, capable, and ethical replacement for Windows and macOS.";; endeavouros) INFO="EndeavourOS|-|https://endeavouros.com/|Provides an Arch experience without the hassle of installing it manually for both x86_64 and ARM systems.";; endless) INFO="Endless OS|-|https://www.endlessos.org/os|Completely Free, User-Friendly Operating System Packed with Educational Tools, Games, and More.";; fedora) INFO="Fedora|-|https://www.fedoraproject.org/|Innovative platform for hardware, clouds, and containers, built with love by you.";; freebsd) INFO="FreeBSD|-|https://www.freebsd.org/|Operating system used to power modern servers, desktops, and embedded platforms.";; freedos) INFO="FreeDOS|-|https://freedos.org/|DOS-compatible operating system that you can use to play classic DOS games, run legacy business software, or develop embedded systems.";; garuda) INFO="Garuda Linux|-|https://garudalinux.org/|Feature rich and easy to use Linux distribution.";; gentoo) INFO="Gentoo|-|https://www.gentoo.org/|Highly flexible, source-based Linux distribution.";; ghostbsd) INFO="GhostBSD|-|https://www.ghostbsd.org/|Simple, elegant desktop BSD Operating System.";; gnomeos) INFO="GNOME OS|-|https://os.gnome.org/|Alpha nightly bleeding edge distro of GNOME";; guix) INFO="Guix|-|https://guix.gnu.org/|Distribution of the GNU operating system developed by the GNU Project—which respects the freedom of computer users.";; haiku) INFO="Haiku|-|https://www.haiku-os.org/|Specifically targets personal computing. Inspired by the BeOS, Haiku is fast, simple to use, easy to learn and yet very powerful.";; holoiso) INFO="HoloISO|-|https://github.com/HoloISO/holoiso|Bring the Steam Decks SteamOS Holo redistribution and provide a close-to-official SteamOS experience.";; kali) INFO="Kali|-|https://www.kali.org/|The most advanced Penetration Testing Distribution.";; kdeneon) INFO="KDE Neon|-|https://neon.kde.org/|Latest and greatest of KDE community software packaged on a rock-solid base.";; kolibrios) INFO="KolibriOS|-|https://kolibrios.org/en/|Tiny yet incredibly powerful and fast operating system.";; kubuntu) INFO="Kubuntu|-|https://kubuntu.org/|Free, complete, and open-source alternative to Microsoft Windows and Mac OS X which contains everything you need to work, play, or share.";; linuxlite) INFO="Linux Lite|-|https://www.linuxliteos.com/|Your first simple, fast and free stop in the world of Linux.";; linuxmint) INFO="Linux Mint|-|https://linuxmint.com/|Designed to work out of the box and comes fully equipped with the apps most people need.";; lmde) INFO="Linux Mint Debian Edition|-|https://www.linuxmint.com/download_lmde.php|Aims to be as similar as possible to Linux Mint, but without using Ubuntu. The package base is provided by Debian instead.";; lubuntu) INFO="Lubuntu|-|https://lubuntu.me/|Complete Operating System that ships the essential apps and services for daily use: office applications, PDF reader, image editor, music and video players, etc. Using lightwave lxde/lxqt.";; maboxlinux) INFO="Mabox Linux|-|https://maboxlinux.org/|Lightweight, functional and easy to customize Openbox desktop";; mageia) INFO="Mageia|-|https://www.mageia.org/|Stable, secure operating system for desktop & server.";; manjaro) INFO="Manjaro|-|https://manjaro.org/|Versatile, free, and open-source Linux operating system designed with a strong focus on safeguarding user privacy and offering extensive control over hardware.";; mxlinux) INFO="MX Linux|-|https://mxlinux.org/|Designed to combine elegant and efficient desktops with high stability and solid performance.";; netboot) INFO="netboot.xyz|-|https://netboot.xyz/|Your favorite operating systems in one place.";; netbsd) INFO="NetBSD|-|https://www.netbsd.org/|Free, fast, secure, and highly portable Unix-like Open Source operating system. It is available for a wide range of platforms, from large-scale servers and powerful desktop systems to handheld and embedded devices.";; nitrux) INFO="Nitrux|-|https://nxos.org/|Powered by Debian, KDE Plasma and Frameworks, and AppImages.";; nixos) INFO="NixOS|-|https://nixos.org/|Linux distribution based on Nix package manager, tool that takes a unique approach to package management and system configuration.";; nwg-shell) INFO="nwg-shell|nwg:nwg|https://nwg-piotr.github.io/nwg-shell/|Arch Linux ISO with nwg-shell for sway and Hyprland";; macos) INFO="macOS|-|https://www.apple.com/macos/|Work and play on your Mac are even more powerful. Elevate your presence on video calls. Access information in all-new ways. Boost gaming performance. And discover even more ways to personalize your Mac.";; openbsd) INFO="OpenBSD|-|https://www.openbsd.org/|FREE, multi-platform 4.4BSD-based UNIX-like operating system. Our efforts emphasize portability, standardization, correctness, proactive security and integrated cryptography.";; openindiana) INFO="OpenIndiana|-|https://www.openindiana.org/|Community supported illumos-based operating system.";; opensuse) INFO="openSUSE|-|https://www.opensuse.org/|The makers choice for sysadmins, developers and desktop users.";; oraclelinux) INFO="Oracle Linux|-|https://www.oracle.com/linux/|Linux with everything required to deploy, optimize, and manage applications on-premises, in the cloud, and at the edge.";; parrotsec) INFO="Parrot Security|parrot:parrot|https://www.parrotsec.org/|Provides a huge arsenal of tools, utilities and libraries that IT and security professionals can use to test and assess the security of their assets in a reliable, compliant and reproducible way.";; peppermint) INFO="PeppermintOS|-|https://peppermintos.com/|Provides a user with the opportunity to build the system that best fits their needs. While at the same time providing a functioning OS with minimum hassle out of the box.";; popos) INFO="Pop!_OS|-|https://pop.system76.com/|Operating system for STEM and creative professionals who use their computer as a tool to discover and create.";; porteus) INFO="Porteus|-|http://www.porteus.org/|Complete linux operating system that is optimized to run from CD, USB flash drive, hard drive, or other bootable storage media.";; primtux) INFO="PrimTux|-|https://primtux.fr/|A complete and customizable GNU/Linux operating system intended for primary school students and suitable even for older hardware.";; proxmox-ve) INFO="Proxmox VE|-|https://proxmox.com/en/proxmox-virtual-environment/|Proxmox Virtual Environment is a complete, open-source server management platform for enterprise virtualization.";; pureos) INFO="PureOS|-|https://www.pureos.net/|A fully free/libre and open source GNU/Linux operating system, endorsed by the Free Software Foundation.";; reactos) INFO="ReactOS|-|https://reactos.org/|Imagine running your favorite Windows applications and drivers in an open-source environment you can trust.";; rebornos) INFO="RebornOS|-|https://rebornos.org/|Aiming to make Arch Linux as user friendly as possible by providing interface solutions to things you normally have to do in a terminal.";; rockylinux) INFO="Rocky Linux|-|https://rockylinux.org/|Open-source enterprise operating system designed to be 100% bug-for-bug compatible with Red Hat Enterprise Linux®.";; siduction) INFO="Siduction|-|https://siduction.org/|Operating system based on the Linux kernel and the GNU project. In addition, there are applications and libraries from Debian.";; slackware) INFO="Slackware|-|http://www.slackware.com/|Advanced Linux operating system, designed with the twin goals of ease of use and stability as top priorities.";; slax) INFO="Slax|-|https://www.slax.org/|Compact, fast, and modern Linux operating system that combines sleek design with modular approach. With the ability to run directly from a USB flash drive without the need for installation, Slax is truly portable and fits easily in your pocket.";; slint) INFO="Slint|-|https://slint.fr/|Slint is an easy-to-use, versatile, blind-friendly Linux distribution for 64-bit computers. Slint is based on Slackware and borrows tools from Salix. Maintainer: Didier Spaier.";; slitaz) INFO="SliTaz|-|https://www.slitaz.org/en/|Simple, fast and low resource Linux OS for servers & desktops.";; solus) INFO="Solus|-|https://getsol.us/|Designed for home computing. Every tweak enables us to deliver a cohesive computing experience.";; sparkylinux) INFO="SparkyLinux|-|https://sparkylinux.org/|Fast, lightweight and fully customizable operating system which offers several versions for different use cases.";; spirallinux) INFO="SpiralLinux|-|https://spirallinux.github.io/|Selection of Linux spins built from Debian GNU/Linux, with a focus on simplicity and out-of-the-box usability across all the major desktop environments.";; tails) INFO="Tails|-|https://tails.net/|Portable operating system that protects against surveillance and censorship.";; tinycore) INFO="Tiny Core Linux|-|http://www.tinycorelinux.net/|Highly modular based system with community build extensions.";; trisquel) INFO="Trisquel-|https://trisquel.info/|Fully free operating system for home users, small enterprises and educational centers.";; truenas-core) INFO="TrueNAS Core|-|https://www.truenas.com/truenas-core/|World’s most popular storage OS because it gives you the power to build your own professional-grade storage system to use in a variety of data-intensive applications without any software costs.";; truenas-scale) INFO="TrueNAS Scale|-|https://www.truenas.com/truenas-scale/|Open Source Hyperconverged Infrastructure (HCI) solution. In addition to powerful scale-out storage capabilities, SCALE adds Linux Containers and VMs (KVM) so apps run closer to data.";; tuxedo-os) INFO="Tuxedo OS|-|https://www.tuxedocomputers.com/en/|KDE Ubuntu LTS designed to go with their Linux hardware.";; ubuntu) INFO="Ubuntu|-|https://ubuntu.com/|Complete desktop Linux operating system, freely available with both community and professional support.";; ubuntu-budgie) INFO="Ubuntu Budgie|-|https://ubuntubudgie.org/|Community developed distribution, integrating the Budgie Desktop Environment with Ubuntu at its core.";; ubuntucinnamon) INFO="Ubuntu Cinnamon|-|https://ubuntucinnamon.org/|Community-driven, featuring Linux Mint’s Cinnamon Desktop with Ubuntu at the core, packed fast and full of features, here is the most traditionally modern desktop you will ever love.";; ubuntukylin) INFO="Ubuntu Kylin|-|https://ubuntukylin.com/|Universal desktop operating system for personal computers, laptops, and embedded devices. It is dedicated to bringing a smarter user experience to users all over the world.";; ubuntu-mate) INFO="Ubuntu MATE|-|https://ubuntu-mate.org/|Stable, easy-to-use operating system with a configurable desktop environment. It is ideal for those who want the most out of their computers and prefer a traditional desktop metaphor. Using Mate desktop.";; ubuntu-server) INFO="Ubuntu Server|-|https://ubuntu.com/server|Brings economic and technical scalability to your datacentre, public or private. Whether you want to deploy an OpenStack cloud, a Kubernetes cluster or a 50,000-node render farm, Ubuntu Server delivers the best value scale-out performance available.";; ubuntustudio) INFO="Ubuntu Studio|-|https://ubuntustudio.org/|Comes preinstalled with a selection of the most common free multimedia applications available, and is configured for best performance for various purposes: Audio, Graphics, Video, Photography and Publishing.";; ubuntu-unity) INFO="Ubuntu Unity|-|https://ubuntuunity.org/|Flavor of Ubuntu featuring the Unity7 desktop environment (the default desktop environment used by Ubuntu from 2010-2017).";; vanillaos) INFO="Vanilla OS|-|https://vanillaos.org/|Designed to be a reliable and productive operating system for your daily work.";; void) INFO="Void Linux|anon:voidlinux|https://voidlinux.org/|General purpose operating system. Its package system allows you to quickly install, update and remove software; software is provided in binary packages or can be built directly from sources.";; vxlinux) INFO="VX Linux|-|https://vxlinux.org/|Pre-configured, secure systemd-free Plasma desktop with focus on convenience, performance and simplicity. Based on the excellent Void Linux.";; windows) INFO="Windows|-|https://www.microsoft.com/en-us/windows/|Whether you’re gaming, studying, running a business, or running a household, Windows helps you get it done.";; windows-server) INFO="Windows Server|-|https://www.microsoft.com/en-us/windows-server/|Platform for building an infrastructure of connected applications, networks, and web services.";; xubuntu) INFO="Xubuntu|-|https://xubuntu.org/|Elegant and easy to use operating system. Xubuntu comes with Xfce, which is a stable, light and configurable desktop environment.";; zorin) INFO="Zorin OS|-|https://zorin.com/os/|Alternative to Windows and macOS designed to make your computer faster, more powerful, secure, and privacy-respecting.";; esac echo "${INFO}" } function show_os_info() { echo echo -e "$(os_info "${1}" | cut -d'|' -f 1)" echo -e " - Credentials:\t$(os_info "${1}" | cut -d'|' -f 2)" echo -e " - Website:\t$(os_info "${1}" | cut -d'|' -f 3)" echo -e " - Description:\t$(os_info "${1}" | cut -d'|' -f 4)" } function pretty_name() { os_info "${1}" | cut -d'|' -f 1 } # Just in case quickget want use it function os_homepage() { os_info "${1}" | cut -d'|' -f 3 } function error_specify_os() { echo "ERROR! You must specify an operating system." echo "- Supported Operating Systems:" os_support | fmt -w 80 echo -e "\nTo see all possible arguments, use:\n quickget -h or quickget --help" exit 1 } function os_supported() { if [[ ! "$(os_support)" =~ ${OS} ]]; then echo -e "ERROR! ${OS} is not a supported OS.\n" os_support | fmt -w 80 exit 1 fi } function error_specify_release() { show_os_info "${OS}" case ${OS} in *ubuntu-server*) echo -en " - Releases:\t" releases_ubuntu-server ;; *ubuntu*) echo -en " - Releases:\t" releases_ubuntu ;; *windows*) echo -en " - Releases:\t" "releases_${OS}" echo -en " - Languages:\t" "languages_${OS}" echo "${I18NS[@]}" ;; *) echo -en " - Releases:\t" "releases_${OS}" | fmt -w 80 if [[ $(type -t "editions_${OS}") == function ]]; then echo -en " - Editions:\t" "editions_${OS}" | fmt -w 80 fi ;; esac echo -e "\nERROR! You must specify a release." exit 1 } function error_not_supported_release() { if [[ ! "${RELEASES[*]}" =~ ${RELEASE} ]]; then echo -e "ERROR! ${DISPLAY_NAME} ${RELEASE} is not a supported release.\n" echo -n ' - Supported releases: ' "releases_${OS}" exit 1 fi } function error_not_supported_lang() { echo -e "ERROR! ${I18N} is not a supported $(pretty_name "${OS}") language\n" echo -n ' - Editions: ' for I18N in "${I18NS[@]}"; do echo -n "${I18N} " done exit 1 } function error_not_supported_argument() { echo "ERROR! Not supported argument" echo "To see all possible arguments, use:" echo " quickget -h or quickget --help" exit 1 } function handle_missing() { # Handle odd missing Fedora combinations case "${OS}" in fedora) # First we need to handle the Beta naming kludge if [[ "${RELEASE}" == *"_Beta" ]]; then NRELEASE="${RELEASE/_Beta/}" else NRELEASE="${RELEASE}" fi if [[ "${NRELEASE}" -lt 40 && "${EDITION}" == "Onyx" ]] || [[ "${NRELEASE}" -lt 40 && "${EDITION}" == "Sericea" ]]; then echo "ERROR! Unsupported combination" echo " Fedora ${RELEASE} ${EDITION} is not available, please choose another Release or Edition" exit 1 fi;; esac } function validate_release() { local DISPLAY_NAME="" local RELEASE_GENERATOR="" local RELEASES="" DISPLAY_NAME="$(pretty_name "${OS}")" case ${OS} in *ubuntu-server*) RELEASE_GENERATOR="releases_ubuntu-server";; *ubuntu*) RELEASE_GENERATOR="releases_ubuntu";; *) RELEASE_GENERATOR="${1}";; esac RELEASES=$(${RELEASE_GENERATOR}) error_not_supported_release } function list_json() { # Reference: https://stackoverflow.com/a/67359273 list_csv | jq -R 'split(",") as $h|reduce inputs as $in ([]; . += [$in|split(",")|. as $a|reduce range(0,length) as $i ({};.[$h[$i]]=$a[$i])])' exit 0 } function list_csv() { CSV_DATA="$(csv_data)" echo "Display Name,OS,Release,Option,Downloader,PNG,SVG" sort -t',' -k2,2 <<<"${CSV_DATA}" exit 0 } function csv_data() { local DISPLAY_NAME local DL="" local DOWNLOADER local FUNC local OPTION local OS local PNG local RELEASE local SVG local HAS_ZSYNC=0 # Check if zsync is available if command -v zsync &>/dev/null; then HAS_ZSYNC=1 fi for OS in $(os_support); do local EDITIONS="" DISPLAY_NAME="$(pretty_name "${OS}")" case ${OS} in *ubuntu-server*) FUNC="ubuntu-server";; *ubuntu*) FUNC="ubuntu";; *) FUNC="${OS}";; esac PNG="https://quickemu-project.github.io/quickemu-icons/png/${FUNC}/${FUNC}-quickemu-white-pinkbg.png" SVG="https://quickemu-project.github.io/quickemu-icons/svg/${FUNC}/${FUNC}-quickemu-white-pinkbg.svg" if [[ $(type -t "editions_${OS}") == function ]]; then EDITIONS=$(editions_"${OS}") fi for RELEASE in $("releases_${FUNC}"); do if [[ "${OS}" == *"ubuntu"* ]] && [[ ${RELEASE} == *"daily"* ]] && [ ${HAS_ZSYNC} -eq 1 ]; then DOWNLOADER="zsync" else DOWNLOADER="${DL}" fi # If the OS has an editions_() function, use it. if [[ ${EDITIONS} ]]; then for OPTION in ${EDITIONS}; do echo "${DISPLAY_NAME},${OS},${RELEASE},${OPTION},${DOWNLOADER},${PNG},${SVG}" done elif [[ "${OS}" == "windows"* ]]; then "languages_${OS}" for I18N in "${I18NS[@]}"; do echo "${DISPLAY_NAME},${OS},${RELEASE},${I18N},${DOWNLOADER},${PNG},${SVG}" done else echo "${DISPLAY_NAME},${OS},${RELEASE},,${DOWNLOADER},${PNG},${SVG}" fi done & done wait } function list_supported() { list_csv | cut -d ',' -f2,3,4 | tr ',' ' ' exit 0 } function test_result() { local OS="${1}" local RELEASE="${2}" local EDITION="${3:-}" local URL="${4:-}" local RESULT="${5:-}" if [ -n "${EDITION}" ]; then OS="${OS}-${RELEASE}-${EDITION}" else OS="${OS}-${RELEASE}" fi if [ -n "${RESULT}" ]; then # Pad the OS string for consistent output OS=$(printf "%-35s" "${OS}") echo -e "${RESULT}: ${OS} ${URL}" else OS=$(printf "%-36s" "${OS}:") echo -e "${OS} ${URL}" fi } function test_all() { OS="${1}" os_supported local CHECK="" local FUNC="${OS}" if [[ "${OS}" == *ubuntu* && "${OS}" != "ubuntu-server" ]]; then FUNC="ubuntu" fi local URL="" for RELEASE in $("releases_${FUNC}"); do if [[ $(type -t "editions_${OS}") == function ]]; then for EDITION in $(editions_"${OS}"); do validate_release releases_"${OS}" URL=$(get_"${OS}" | cut -d' ' -f1 | head -n 1) if [ "${OPERATION}" == "show" ]; then test_result "${OS}" "${RELEASE}" "${EDITION}" "${URL}" elif [ "${OPERATION}" == "test" ]; then CHECK=$(web_check "${URL}" && echo "PASS" || echo "FAIL") test_result "${OS}" "${RELEASE}" "${EDITION}" "${URL}" "${CHECK}" fi done elif [[ "${OS}" == "windows"* ]]; then "languages_${OS}" for I18N in "${I18NS[@]}"; do validate_release releases_"${OS}" if [ "${OPERATION}" == "show" ]; then test_result "${OS}" "${RELEASE}" "${I18N}" "" elif [ "${OPERATION}" == "test" ]; then test_result "${OS}" "${RELEASE}" "${I18N}" "${URL}" "SKIP" fi done elif [[ "${OS}" == "macos" ]]; then validate_release releases_macos (get_macos) elif [ "${OS}" == "ubuntu-server" ]; then validate_release releases_ubuntu-server (get_ubuntu-server) elif [[ "${OS}" == *ubuntu* ]]; then validate_release releases_ubuntu (get_ubuntu) else validate_release releases_"${OS}" URL=$(get_"${OS}" | cut -d' ' -f1 | head -n 1) if [ "${OPERATION}" == "show" ]; then test_result "${OS}" "${RELEASE}" "${EDITION}" "${URL}" elif [ "${OPERATION}" == "test" ]; then CHECK=$(web_check "${URL}" && echo "PASS" || echo "FAIL") test_result "${OS}" "${RELEASE}" "${EDITION}" "${URL}" "${CHECK}" fi fi done } function os_support() { echo alma \ alpine \ android \ antix \ archcraft \ archlinux \ arcolinux \ artixlinux \ athenaos \ batocera \ bazzite \ biglinux \ blendos \ bodhi \ bunsenlabs \ cachyos \ centos-stream \ chimeralinux \ crunchbang++ \ debian \ deepin \ devuan \ dragonflybsd \ easyos \ edubuntu \ elementary \ endeavouros \ endless \ fedora \ freebsd \ freedos \ garuda \ gentoo \ ghostbsd \ gnomeos \ guix \ haiku \ holoiso \ kali \ kdeneon \ kolibrios \ kubuntu \ linuxlite \ linuxmint \ lmde \ lubuntu \ maboxlinux \ macos \ mageia \ manjaro \ mxlinux \ netboot \ netbsd \ nitrux \ nixos \ nwg-shell \ openbsd \ openindiana \ opensuse \ oraclelinux \ parrotsec \ peppermint \ popos \ porteus \ primtux \ proxmox-ve \ pureos \ reactos \ rebornos \ rockylinux \ siduction \ slackware \ slax \ slint \ slitaz \ solus \ sparkylinux \ spirallinux \ tails \ tinycore \ trisquel \ truenas-core \ truenas-scale \ tuxedo-os \ ubuntu \ ubuntu-budgie \ ubuntu-mate \ ubuntu-server \ ubuntu-unity \ ubuntucinnamon \ ubuntukylin \ ubuntustudio \ vanillaos \ void \ vxlinux \ windows \ windows-server \ xubuntu \ zorin } function releases_alma() { echo 9 8 } function editions_alma() { echo boot minimal dvd } function releases_alpine() { local REL="" local RELS="" RELS=$(web_pipe "https://dl-cdn.alpinelinux.org/alpine/" | grep '"v' | cut -d'"' -f2 | tr -d / | sort -Vr | head -n 10) for REL in ${RELS}; do if web_check "https://dl-cdn.alpinelinux.org/alpine/${REL}/releases/x86_64/"; then echo -n "${REL} " fi done } function releases_android() { echo 9.0 8.1 7.1 } function editions_android() { echo x86_64 x86 } function releases_antix() { echo 23.1 23 22 21 } function editions_antix() { echo net-sysv core-sysv base-sysv full-sysv net-runit core-runit base-runit full-runit } function releases_archcraft() { echo latest } function releases_archlinux() { echo latest } function releases_arcolinux() { #shellcheck disable=SC2046,SC2005 # breaking change in v24.05 # v24.05.1 is the first release with the new naming scheme and too complex to parse old and new so just show the new echo $(web_pipe "https://mirror.accum.se/mirror/arcolinux.info/iso/" | grep -o -E -e "v24.0[5-9].[[:digit:]]{2}" -e "v24.1[0-2].[[:digit:]]{2}" | sort -ru | head -n 5) } function editions_arcolinux() { echo net plasma pro } function releases_artixlinux() { #shellcheck disable=SC2046,SC2005 echo $(web_pipe "https://mirror1.artixlinux.org/iso/" | grep "artix-" | cut -d'"' -f2 | grep -v sig | cut -d'-' -f 4 | sort -ru | tail -n 1) } function editions_artixlinux() { #shellcheck disable=SC2046,SC2005 echo $(web_pipe "https://mirror1.artixlinux.org/iso/" | grep "artix-" | cut -d'"' -f2 | grep -v sig | cut -d'-' -f2-3 | sort -u) } function releases_athenaos() { #shellcheck disable=SC2046,SC2005 echo $(web_pipe "https://api.github.com/repos/Athena-OS/athena/releases" | grep 'download_url' | grep rolling | cut -d'/' -f8 | sort -u) } function releases_batocera() { #shellcheck disable=SC2046,SC2005 echo $(web_pipe "https://mirrors.o2switch.fr/batocera/x86_64/stable/" | grep ^\' -f 9 | cut -d'/' -f 1) echo -n "${NEW}" MAJ=$(echo "${NEW}" | cut -d'.' -f 1) ARCHIVE="$(web_pipe "https://cdimage.debian.org/cdimage/archive/" | grep folder | grep -v NEVER | cut -d'"' -f 6)" for i in {1..2}; do CUR=$((MAJ - i)) OLD=$(grep ^"${CUR}" <<< "${ARCHIVE}" | tail -n 1 | tr -d '/') echo -n " ${OLD}" done echo } function editions_debian() { echo standard cinnamon gnome kde lxde lxqt mate xfce netinst } function releases_deepin() { #shellcheck disable=SC2046,SC2005 echo $(web_pipe "https://mirrors.kernel.org/deepin-cd/" | grep "href=" | cut -d'"' -f2 | grep -v "\.\." | grep -v nightly | grep -v preview | sed 's|/||g' | tail -n 10 | sort -r) } function releases_devuan() { echo daedalus chimaera beowulf } function releases_dragonflybsd() { # If you remove "".bz2" from the end of the searched URL, you will get only the current release - currently 6.4.0 # We could add a variable so this behaviour is optional/switchable (maybe from option or env) #shellcheck disable=SC2046,SC2005 echo $(web_pipe "https://mirror-master.dragonflybsd.org/iso-images/" | grep -E -o '"dfly-x86_64-.*_REL.iso.bz2"' | grep -o -E '[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+') } function releases_easyos() { local ALL_RELEASES="" local YEAR="" # get the latest 2 years of releases so that when we hit next year we still have the latest 2 years TWO_YEARS=$(web_pipe https://distro.ibiblio.org/easyos/amd64/releases/kirkstone/ | grep -o -E '[[:digit:]]{4}/' | sort -nr | tr -d / | head -n 2 ) for YEAR in ${TWO_YEARS} ; do ALL_RELEASES="${ALL_RELEASES} $(web_pipe https://distro.ibiblio.org/easyos/amd64/releases/kirkstone/${YEAR}/ | grep -o -E '[[:digit:]]+(\.[[:digit:]])+/' | tr -d / | sort -nr)" done echo ${ALL_RELEASES} } function releases_elementary() { echo 8.0 7.1 7.0 } function releases_endeavouros() { local ENDEAVOUR_RELEASES="" ENDEAVOUR_RELEASES="$(web_pipe "https://mirror.alpix.eu/endeavouros/iso/" | grep -o '' | sed 's/^.*//' | grep -v 'x86_64' | LC_ALL="en_US.UTF-8" sort -Mr | cut -c 13- | head -n 5 | tr '\n' ' ')" echo "${ENDEAVOUR_RELEASES,,}" } function releases_endless() { echo 6.0.4 } function editions_endless() { echo base en fr pt_BR es } function releases_fedora() { #shellcheck disable=SC2046,SC2005 echo $(web_pipe "https://getfedora.org/releases.json" | jq -r 'map(.version) | unique | .[]' | sed 's/ /_/g' | sort -r) } function editions_fedora() { #shellcheck disable=SC2046,SC2005 if [[ -z ${RELEASE} ]]; then echo $(web_pipe "https://getfedora.org/releases.json" | jq -r "map(select(.arch==\"x86_64\" and .variant!=\"Labs\" and .variant!=\"IoT\" and .variant!=\"Container\" and .variant!=\"Cloud\" and .variant!=\"Everything\" and .subvariant!=\"Security\" and .subvariant!=\"Server_KVM\" and .subvariant!=\"SoaS\")) | map(.subvariant) | unique | .[]") else echo $(web_pipe "https://getfedora.org/releases.json" | jq -r "map(select(.arch==\"x86_64\" and .version==\"${RELEASE/_/ }\" and .variant!=\"Labs\" and .variant!=\"IoT\" and .variant!=\"Container\" and .variant!=\"Cloud\" and .variant!=\"Everything\" and .subvariant!=\"Security\" and .subvariant!=\"Server_KVM\" and .subvariant!=\"SoaS\")) | map(.subvariant) | unique | .[]") fi } function releases_freebsd() { #shellcheck disable=SC2046,SC2005 echo $(web_pipe "https://download.freebsd.org/ftp/releases/amd64/amd64/" | grep -Eo "href=\"[0-9\.]+-RELEASE" | grep -oE '[0-9\.]+' | sort -r) } function editions_freebsd() { echo disc1 dvd1 } function releases_freedos() { echo 1.3 1.2 } function releases_garuda() { echo latest } function editions_garuda() { echo cinnamon dr460nized dr460nized-gaming gnome i3 kde-git kde-lite lxqt-kwin mate qtile sway wayfire xfce } function releases_gentoo() { echo latest } function editions_gentoo() { echo minimal livegui } function releases_ghostbsd() { #shellcheck disable=SC2046,SC2005 echo $(web_pipe "https://download.ghostbsd.org/releases/amd64/" | grep "href" | cut -d'"' -f2 | cut -d'/' -f1 | sort -r | tail -n +3 | head -n 3) } function editions_ghostbsd() { echo mate xfce } function releases_gnomeos() { #shellcheck disable=SC2046,SC2005 echo "nightly" $(web_pipe "https://download.gnome.org/gnomeos/" | grep "title=" | awk -F'"' '{print $4}' | tr -d '/' | sort -nr) } function releases_guix() { echo 1.4.0 1.3.0 } function releases_haiku() { echo r1beta5 r1beta4 r1beta3 } function editions_haiku() { echo x86_64 x86_gcc2h } function releases_holoiso() { echo "latest" } function releases_kali() { echo current kali-weekly } function releases_kdeneon() { echo user testing unstable developer } function releases_kolibrios() { echo latest } function editions_kolibrios() { echo en_US ru_RU it_IT es_ES } function releases_linuxlite() { echo 6.6 6.4 6.2 6.0 } function releases_linuxmint() { echo 22 21.3 21.2 21.1 21 20.3 20.2 } function editions_linuxmint() { echo cinnamon mate xfce } function editions_lmde() { echo cinnamon } function releases_lmde() { echo 6 } function releases_maboxlinux() { echo latest } function releases_macos() { echo mojave catalina big-sur monterey ventura sonoma } function releases_mageia() { echo 9 8 } function editions_mageia() { echo Plasma GNOME Xfce } function editions_manjaro() { echo full minimal } function releases_manjaro() { echo xfce gnome plasma cinnamon i3 sway } function releases_mxlinux() { # needs header, so not web_pipe: curl -Ils "https://sourceforge.net/projects/mx-linux/files/latest/download" | grep -i 'location:' | cut -d? -f1 | cut -d_ -f1 | cut -d- -f3 } function editions_mxlinux() { echo Xfce KDE Fluxbox } function releases_netboot() { echo latest } function releases_netbsd() { # V8 is EOL so filter it out #shellcheck disable=SC2046,SC2005 echo $(web_pipe "https://cdn.netbsd.org/pub/NetBSD/iso/" | grep -o -E '"[[:digit:]]+\.[[:digit:]]+/"' | tr -d '"/' | grep -v ^8 | sort -nr | head -n 4) } function releases_nitrux() { echo latest } function releases_nixos() { # Lists unstable plus the two most recent releases #shellcheck disable=SC2046 echo unstable $(web_pipe "https://nix-channels.s3.amazonaws.com/?delimiter=/" | grep -o -E 'nixos-[[:digit:]]+\.[[:digit:]]+' | cut -d- -f2 | sort -nru | head -n +2) } function editions_nixos() { echo minimal plasma gnome } function releases_nwg-shell() { #shellcheck disable=SC2046,SC2005 echo $(web_pipe "https://sourceforge.net/projects/nwg-iso/rss?path=/" | grep 'url=' | grep '64.iso' | cut -d'/' -f12 | cut -d'-' -f3) } function releases_openbsd() { #shellcheck disable=SC2046,SC2005 echo $(web_pipe "https://mirror.leaseweb.com/pub/OpenBSD/" | grep -e '6\.[8-9]/' -e '[7-9]\.' | cut -d\" -f4 | tr -d '/' | sort -r) } function releases_openindiana() { #shellcheck disable=SC2046,SC2005 echo $(web_pipe "https://dlc.openindiana.org/isos/hipster/" | grep link | cut -d'/' -f 1 | cut -d '"' -f4 | sort -r | tail -n +2 | head -n 5) } function editions_openindiana() { echo gui text minimal } function releases_opensuse() { #shellcheck disable=SC2046,SC2005 echo $(web_pipe "https://download.opensuse.org/distribution/leap/" | grep 'class="name"' | cut -d '/' -f2 | grep -v 42 | sort -r) aeon microos tumbleweed } function releases_oraclelinux() { echo 9.3 9.2 9.1 9.0 8.9 8.8 8.7 8.6 8.5 8.4 7.9 7.8 7.7 } function releases_parrotsec() { #shellcheck disable=SC2046,SC2005 echo $(web_pipe "https://download.parrot.sh/parrot/iso/" | grep -o -E 'href="[[:digit:]]\.[[:digit:]]+' | sort -nr | head -n 3 | cut -d\" -f 2 ) } function editions_parrotsec() { echo home htb security } function releases_peppermint() { echo latest } function editions_peppermint() { echo devuan-xfce devuan-gnome debian-xfce debian-gnome } function releases_popos() { echo 22.04 20.04 } function editions_popos() { echo intel nvidia } function releases_porteus() { echo 5.01 } function editions_porteus() { echo cinnamon gnome kde lxde lxqt mate openbox xfce } function releases_primtux() { echo 7 } function editions_primtux() { echo 2022-10 } function releases_proxmox-ve() { #shellcheck disable=SC2046,SC2005 echo $(web_pipe https://enterprise.proxmox.com/iso/ | grep proxmox-ve | grep -E -o '[0-9]+\.[0-9]+-[0-9]\.iso' | uniq | sort -ru | cut -d'.' -f 1-2) } function releases_pureos() { web_pipe "https://www.pureos.net/download/" | grep -m 1 "downloads.puri" | cut -d '"' -f 2 | cut -d '-' -f 4 } function editions_pureos() { echo gnome plasma } function releases_reactos() { echo latest } function releases_rebornos() { echo latest } function releases_rockylinux() { #shellcheck disable=SC2046,SC2005 echo $(web_pipe "http://dl.rockylinux.org/vault/rocky/" | grep "^.*)-Release-.*"; "\(.e)")' | sort -u) } function releases_sparkylinux() { #shellcheck disable=SC2046,SC2005 echo $(web_pipe "https://sparkylinux.org/download/stable/" | grep -E -o "sparkylinux-.*\.iso\"" | cut -d'-' -f2 | sort -ru) } function editions_sparkylinux() { #shellcheck disable=SC2046,SC2005 if [ -z "${RELEASE}" ]; then echo $(web_pipe "https://sparkylinux.org/download/stable/" | grep -E -o "sparkylinux-.*\.iso\"" | cut -d'-' -f4 | cut -d'.' -f1 | sort -u) else echo $(web_pipe "https://sparkylinux.org/download/stable/" | grep -E -o "sparkylinux-${RELEASE}-.*\.iso\"" | cut -d'-' -f4 | cut -d'.' -f1 | sort -u) fi } function releases_spirallinux() { echo latest } function editions_spirallinux() { echo Plasma XFCE Mate LXQt Gnome Budgie Cinnamon Builder } function releases_tails() { echo stable } function releases_tinycore() { echo 15 14 } function editions_tinycore() { echo Core TinyCore CorePlus CorePure64 TinyCorePure64 } function releases_trisquel() { echo 11.0 10.0.1 } function editions_trisquel() { echo mate lxde kde sugar } function releases_truenas() { if [[ ${OS} == truenas ]] ; then echo "ERROR! The supported TrueNAS OS values are truenas-core or truenas-scale" exit 1; fi } function releases_truenas-core() { echo 13 } function releases_truenas-scale() { echo 24 } function releases_tuxedo-os() { echo current } function releases_ubuntu() { local VERSION_DATA="" local SUPPORTED_VERSIONS=() VERSION_DATA="$(IFS=$'\n' web_pipe https://api.launchpad.net/devel/ubuntu/series | jq -r '.entries[]')" # shellcheck disable=SC2207 SUPPORTED_VERSIONS=($(IFS=$'\n' jq -r 'select(.status=="Supported" or .status=="Current Stable Release") | .version' <<<"${VERSION_DATA}" | sort)) case "${OS}" in ubuntu) echo "${SUPPORTED_VERSIONS[@]}" daily-live;; kubuntu|lubuntu|ubuntukylin|ubuntu-mate|ubuntustudio|xubuntu) # after 16.04 echo "${SUPPORTED_VERSIONS[@]:1}" daily-live;; ubuntu-budgie) # after 18.04 echo "${SUPPORTED_VERSIONS[@]:2}" daily-live;; edubuntu|ubuntu-unity|ubuntucinnamon) # after 23.10 echo "${SUPPORTED_VERSIONS[@]:5}" daily-live;; esac } function releases_ubuntu-server() { local ALL_VERSIONS=() # shellcheck disable=SC2207 ALL_VERSIONS=($(IFS=$'\n' web_pipe http://releases.ubuntu.com/streams/v1/com.ubuntu.releases:ubuntu-server.json | jq -r '.products[] | select(.arch=="amd64") | .version' | sort -rV)) echo daily-live "${ALL_VERSIONS[@]}" } function releases_vanillaos() { #shellcheck disable=SC2046,SC2005 echo $(web_pipe "https://api.github.com/repos/Vanilla-OS/live-iso/releases" | grep 'download_url' | cut -d'/' -f8 | sort -ru) } function releases_void() { #shellcheck disable=SC2046,SC2005 echo $(web_pipe "https://repo-default.voidlinux.org/live/" | grep "^/dev/null; then echo "ERROR! Unable to create directory ${DIR}" exit 1 fi if [[ ${OS} != windows && ${OS} != macos && ${OS} != windows-server ]]; then echo "Downloading $(pretty_name "${OS}") ${RELEASE} ${EDITION}" echo "- URL: ${URL}" fi if ! curl --progress-bar --location --output "${DIR}/${FILE}" --continue-at - --user-agent "${USER_AGENT}" "${HEADERS[@]}" -- "${URL}"; then echo "ERROR! Failed to download ${URL} with curl." rm -f "${DIR}/${FILE}" fi } # checks if a URL needs to be redirected and returns the final URL function web_redirect() { local REDIRECT_URL="" local URL="${1}" # Check for URL redirections # Output to nonexistent directory so the download fails fast REDIRECT_URL=$(curl --silent --location --fail --write-out '%{url_effective}' --output /var/cache/${RANDOM}/${RANDOM} "${URL}" ) if [ "${REDIRECT_URL}" != "${URL}" ]; then echo "${REDIRECT_URL}" else echo "${URL}" fi } # checks if a URL is reachable function web_check() { local HEADERS=() local URL="${1}" # Process any headers while (( "$#" )); do if [ "${1}" == "--header" ]; then HEADERS+=("${1}" "${2}") shift 2 else shift fi done curl --silent --location --head --output /dev/null --fail --connect-timeout 30 --max-time 30 --retry 3 "${HEADERS[@]}" "${URL}" } function zsync_get() { local CHECK="" local DIR="${2}" local FILE="${1##*/}" local OUT="" local URL="${1}" # Test mode for ISO if [ "${OPERATION}" == "show" ]; then test_result "${OS}" "${RELEASE}" "${EDITION}" "${URL}" exit 0 elif [ "${OPERATION}" == "test" ]; then CHECK=$(web_check "${URL}" && echo "PASS" || echo "FAIL") test_result "${OS}" "${RELEASE}" "${EDITION}" "${URL}" "${CHECK}" exit 0 elif command -v zsync &>/dev/null; then if [ -n "${3}" ]; then OUT="${3}" else OUT="${FILE}" fi if ! mkdir -p "${DIR}" 2>/dev/null; then echo "ERROR! Unable to create directory ${DIR}" exit 1 fi echo "Downloading $(pretty_name "${OS}") ${RELEASE} ${EDITION} from ${URL}" # Only force http for zsync - not earlier because we might fall through here if ! zsync "${URL/https/http}.zsync" -i "${DIR}/${OUT}" -o "${DIR}/${OUT}" 2>/dev/null; then echo "ERROR! Failed to download ${URL/https/http}.zsync" exit 1 fi if [ -e "${DIR}/${OUT}.zs-old" ]; then rm "${DIR}/${OUT}.zs-old" fi else echo "INFO: zsync not found, falling back to curl" if [ -n "${3}" ]; then web_get "${1}" "${2}" "${3}" else web_get "${1}" "${2}" fi fi } function make_vm_config() { local CONF_FILE="" local IMAGE_FILE="" local ISO_FILE="" local IMAGE_TYPE="" local GUEST="" if [ "${OPERATION}" == "download" ]; then exit 0 fi IMAGE_FILE="${1}" ISO_FILE="${2}" case "${OS}" in batocera) GUEST="batocera" IMAGE_TYPE="img";; custom) GUEST="${CUSTOM_OS}" IMAGE_TYPE="${CUSTOM_IMAGE_TYPE}";; dragonflybsd) GUEST="dragonflybsd" IMAGE_TYPE="iso";; easyos) GUEST="linux" IMAGE_TYPE="img";; freebsd|ghostbsd) GUEST="freebsd" IMAGE_TYPE="iso";; haiku) GUEST="haiku" IMAGE_TYPE="iso";; freedos) GUEST="freedos" IMAGE_TYPE="iso";; kolibrios) GUEST="kolibrios" IMAGE_TYPE="iso";; macos) GUEST="macos" IMAGE_TYPE="img";; netbsd) GUEST="netbsd" IMAGE_TYPE="iso";; openbsd) GUEST="openbsd" IMAGE_TYPE="iso";; openindiana) GUEST="solaris" IMAGE_TYPE="iso";; reactos) GUEST="reactos" IMAGE_TYPE="iso";; truenas*) GUEST="truenas" IMAGE_TYPE="iso";; ubuntu*) GUEST="linux" IMAGE_TYPE="iso" # If there is a point in the release, check if it is less than 16.04 if [[ "${RELEASE}" != *"daily"* ]]; then if [ "${RELEASE//./}" -lt 1604 ]; then GUEST="linux_old" fi fi ;; windows) GUEST="windows" IMAGE_TYPE="iso";; windows-server) GUEST="windows-server" IMAGE_TYPE="iso";; *) GUEST="linux" IMAGE_TYPE="iso";; esac CONF_FILE="${VM_PATH}.conf" if [ ! -e "${CONF_FILE}" ]; then echo "Making ${CONF_FILE}" cat << EOF > "${CONF_FILE}" #!${QUICKEMU} --vm guest_os="${GUEST}" disk_img="${VM_PATH}/disk.qcow2" ${IMAGE_TYPE}="${VM_PATH}/${IMAGE_FILE}" EOF echo " - Setting ${CONF_FILE} executable" chmod u+x "${CONF_FILE}" if [ -n "${ISO_FILE}" ]; then echo "fixed_iso=\"${VM_PATH}/${ISO_FILE}\"" >> "${CONF_FILE}" fi # OS specific tweaks case ${OS} in alma|athenaos|centos-stream|endless|garuda|gentoo|kali|nixos|oraclelinux|popos|rockylinux) echo "disk_size=\"32G\"" >> "${CONF_FILE}";; openindiana) echo "boot=\"legacy\"" >> "${CONF_FILE}" echo "disk_size=\"32G\"" >> "${CONF_FILE}";; batocera) echo "disk_size=\"8G\"" >> "${CONF_FILE}";; bazzite) echo "disk_size=\"64G\"" >> "${CONF_FILE}";; dragonflybsd|haiku|openbsd|netbsd|slackware|slax|tails|tinycore) echo "boot=\"legacy\"" >> "${CONF_FILE}";; deepin) echo "disk_size=\"64G\"" >> "${CONF_FILE}" echo "ram=\"4G\"" >> "${CONF_FILE}" ;; freedos) echo "boot=\"legacy\"" >> "${CONF_FILE}" echo "disk_size=\"4G\"" >> "${CONF_FILE}" echo "ram=\"256M\"" >> "${CONF_FILE}" ;; kolibrios) echo "boot=\"legacy\"" >> "${CONF_FILE}" echo "disk_size=\"2G\"" >> "${CONF_FILE}" echo "ram=\"128M\"" >> "${CONF_FILE}" ;; slint) echo "disk_size=\"50G\"" >> "${CONF_FILE}" ;; slitaz) echo "boot=\"legacy\"" >> "${CONF_FILE}" echo "disk_size=\"4G\"" >> "${CONF_FILE}" echo "ram=\"512M\"" >> "${CONF_FILE}" ;; truenas-scale|truenas-core) echo "boot=\"legacy\"" >> "${CONF_FILE}" # the rest is non-functional # echo "bootdrive_size=\"5G\"" >> "${CONF_FILE}" # boot drive # echo "1stdrive_size=\"20G\"" >> "${CONF_FILE}" # for testing # echo "2nddrive_size=\"20G\"" >> "${CONF_FILE}" # again, for testing ;; ubuntu-server) # 22.04+ fails on LVM build if disk size is < 10G # 22.04.1 fails on auto-install if TPM is disabled echo "disk_size=\"10G\"" >> "${CONF_FILE}" echo "ram=\"4G\"" >> "${CONF_FILE}" if [[ "${RELEASE}" == *"22.04"* ]]; then echo "tpm=\"on\"" >> "${CONF_FILE}" fi ;; vanillaos) ## Minimum is 50G for abroot, but a 64GB is allocated to give some headroom echo "disk_size=\"64G\"" >> "${CONF_FILE}" ;; zorin) case ${EDITION} in education64|edulite64) echo "disk_size=\"32G\"" >> "${CONF_FILE}";; esac;; reactos) echo "boot=\"legacy\"" >> "${CONF_FILE}" echo "disk_size=\"12G\"" >> "${CONF_FILE}" echo "ram=\"2048M\"" >> "${CONF_FILE}" ;; macos) echo "disk_size=\"128G\"" >> "${CONF_FILE}" echo "macos_release=\"${RELEASE}\"" >> "${CONF_FILE}" # https://github.com/quickemu-project/quickemu/issues/438 if [ "${RELEASE}" == "monterey" ]; then echo "cpu_cores=2" >> "${CONF_FILE}" fi ;; proxmox-ve) echo "disk_size=\"20G\"" >> "${CONF_FILE}" echo "ram=\"4G\"" >> "${CONF_FILE}" ;; esac if [ "${OS}" == "ubuntu" ] && [[ ${RELEASE} == *"daily"* ]]; then # Minimum to install lobster testing is 18GB but 32GB are allocated for headroom echo "disk_size=\"32G\"" >> "${CONF_FILE}" fi if [[ "${OS}" == "windows"* ]]; then echo "disk_size=\"64G\"" >> "${CONF_FILE}" fi # Enable TPM for Windows 11 and Windows Server 2022 if [[ "${OS}" == "windows" && "${RELEASE}" == "11" || "${OS}" == "windows-server" && "${RELEASE}" == "2022" ]]; then echo "tpm=\"on\"" >> "${CONF_FILE}" echo "secureboot=\"off\"" >> "${CONF_FILE}" fi fi echo -e "\nTo start your $(pretty_name "${OS}") virtual machine run:" if [ "${OS}" == "slint" ]; then echo -e " quickemu --vm ${CONF_FILE}\nTo start Slint with braille support run:\n quickemu --vm --braille --display sdl ${CONF_FILE}" else echo " quickemu --vm ${CONF_FILE}" fi echo exit 0 } function get_alma() { local HASH="" local ISO="AlmaLinux-${RELEASE}-latest-x86_64-${EDITION}.iso" local URL="https://repo.almalinux.org/almalinux/${RELEASE}/isos/x86_64" HASH="$(web_pipe "${URL}/CHECKSUM" | grep "(${ISO}" | cut -d' ' -f4)" echo "${URL}/${ISO} ${HASH}" } function get_alpine() { local HASH="" local ISO="" local URL="https://dl-cdn.alpinelinux.org/alpine/${RELEASE}/releases/x86_64" local VERSION="" VERSION=$(web_pipe "${URL}/latest-releases.yaml" | awk '/"Xen"/{found=0} {if(found) print} /"Virtual"/{found=1}' | grep 'version:' | awk '{print $2}') ISO="alpine-virt-${VERSION}-x86_64.iso" HASH=$(web_pipe "${URL}/latest-releases.yaml" | awk '/"Xen"/{found=0} {if(found) print} /"Virtual"/{found=1}' | grep 'sha256:' | awk '{print $2}') echo "${URL}/${ISO} ${HASH}" } function get_android() { local HASH="" local ISO="" local JSON_ALL="" local JSON_REL="" local URL="https://mirrors.gigenet.com/OSDN/android-x86" JSON_ALL=$(web_pipe "https://www.fosshub.com/Android-x86-old.html" | grep "var settings =" | cut -d'=' -f2-) JSON_REL=$(echo "${JSON_ALL}" | jq --arg ver "${OS}-${EDITION}-${RELEASE}" 'first(.pool.f[] | select((.n | startswith($ver)) and (.n | endswith(".iso"))))') ISO=$(echo "${JSON_REL}" | jq -r .n) HASH=$(echo "${JSON_REL}" | jq -r .hash.sha256) # Traverse the directories to find the .iso location for DIR in $(web_pipe "${URL}" | grep -o -E '[0-9]{5}' | sort -ur); do if web_pipe "${URL}/${DIR}" | grep "${ISO}" &>/dev/null; then URL="${URL}/${DIR}" break fi done echo "${URL}/${ISO} ${HASH}" } function get_antix() { local HASH="" local ISO="antiX-${RELEASE}" local README="README" local URL="https://sourceforge.net/projects/antix-linux/files/Final/antiX-${RELEASE}" # antiX uses a different URL and ISO naming for runit editions if [[ "${EDITION}" == *"runit"* ]];then ISO+="-runit" README="README2" case ${RELEASE} in 21) URL+="/runit-bullseye";; *) URL+="/runit-antiX-${RELEASE}";; esac fi case ${EDITION} in base-*) ISO+="_x64-base.iso";; core-*) ISO+="_x64-core.iso";; full-*) ISO+="_x64-full.iso";; net-*) ISO+="-net_x64-net.iso";; esac HASH=$(web_pipe "${URL}/${README}.txt" | grep "${ISO}" | cut -d' ' -f1 | head -n 1) echo "${URL}/${ISO} ${HASH}" } function get_archcraft() { local HASH="" local URL="" URL="https://sourceforge.net/projects/archcraft/files/${RELEASE}/download" URL="$(web_redirect "${URL}" | cut -d? -f1)" echo "${URL} ${HASH}" } function get_archlinux() { local HASH="" local ISO="" local URL="https://mirror.rackspace.com/archlinux" ISO=$(web_pipe "https://archlinux.org/releng/releases/json/" | jq -r '.releases[0].iso_url') HASH=$(web_pipe "https://archlinux.org/releng/releases/json/" | jq -r '.releases[0].sha256_sum') echo "${URL}${ISO} ${HASH}" } function get_arcolinux() { local HASH="" local ISO="" local URL="" URL="https://mirror.accum.se/mirror/arcolinux.info/iso/${RELEASE}" ISO="arco${EDITION}-${RELEASE}-x86_64.iso" HASH=$(web_pipe "${URL}/${ISO}.sha256" | cut -d' ' -f1) echo "${URL}/${ISO} ${HASH}" } function get_artixlinux() { local HASH="" local ISO="" local URL="https://iso.artixlinux.org/iso" ISO="artix-${EDITION}-${RELEASE}-x86_64.iso" HASH=$(web_pipe "${URL}/sha256sums" | grep "${ISO}") echo "${URL}/${ISO} ${HASH}" } function get_athenaos() { local HASH="" local URL="https://github.com/Athena-OS/athena/releases/download/${RELEASE}" local ISO="athena-rolling-x86_64.iso" HASH=$(web_pipe "${URL}/${ISO}.sha256" | cut -d' ' -f1) echo "${URL}/${ISO} ${HASH}" } function get_batocera() { local HASH="" local ISO="" local URL="https://mirrors.o2switch.fr/batocera/x86_64/stable/${RELEASE}" ISO="$(web_pipe "${URL}/" | grep -e 'batocera.*img.gz'| cut -d'"' -f2)" echo "${URL}/${ISO} ${HASH}" } function get_bazzite() { local HASH="" local ISO="" local URL="https://download.bazzite.gg" case ${EDITION} in gnome) ISO="bazzite-gnome-stable.iso";; kde) ISO="bazzite-stable.iso";; esac HASH=$(web_pipe "${URL}/${ISO}-CHECKSUM" | cut -d' ' -f1) echo "${URL}/${ISO} ${HASH}" } function get_biglinux() { local HASH="" local ISO="biglinux_${RELEASE}_${EDITION}.iso" local URL="https://iso.biglinux.com.br" HASH=$(web_pipe "${URL}/${ISO}.md5" | grep -Eo '[[:alnum:]]{32}') echo "${URL}/${ISO} ${HASH}" } function get_blendos() { local HASH="" local ISO="blendOS.iso" local URL="https://kc1.mirrors.199693.xyz/blend/isos/testing" echo "${URL}/${ISO} ${HASH}" } function get_bodhi() { local HASH="" local ISO="" local URL="https://sourceforge.net/projects/bodhilinux/files/${RELEASE}" case ${EDITION} in standard) ISO="bodhi-${RELEASE}-64.iso";; *) ISO="bodhi-${RELEASE}-64-${EDITION}.iso";; esac HASH=$(web_pipe "${URL}/${ISO}.sha256" | cut -d' ' -f1) echo "${URL}/${ISO} ${HASH}" } function get_bunsenlabs() { local HASH="" local ISO="boron-1-240123-amd64.hybrid.iso" local URL="https://ddl.bunsenlabs.org/ddl" HASH=$(web_pipe "${URL}/release.sha256.txt" | head -n 1 | cut -d' ' -f1) echo "${URL}/${ISO} ${HASH}" } function get_cachyos() { local HASH="" local URL="" URL="$(web_pipe "https://cachyos.org/download/" | tr '&' '\n' | grep "ISO/${EDITION}" | grep -v 'iso.sha' | grep -v 'iso.sig' | cut -d';' -f2)" HASH=$(web_pipe "${URL}.sha256" | cut -d' ' -f1) echo "${URL} ${HASH}" } function get_centos-stream() { local HASH="" local ISO="CentOS-Stream-${RELEASE}-latest-x86_64-${EDITION}.iso" local URL="https://linuxsoft.cern.ch/centos-stream/${RELEASE}-stream/BaseOS/x86_64/iso" HASH=$(web_pipe "${URL}/${ISO}.SHA256SUM" | grep "SHA256 (${ISO}" | cut -d' ' -f4) echo "${URL}/${ISO} ${HASH}" } function get_chimeralinux() { local DATE="" local HASH="" local URL="https://repo.chimera-linux.org/live/${RELEASE}" DATE=$(web_pipe "${URL}/sha256sums.txt" | head -n1 | cut -d'-' -f5) local ISO="chimera-linux-x86_64-LIVE-${DATE}-${EDITION}.iso" HASH=$(web_pipe "${URL}/sha256sums.txt" | grep 'x86_64-LIVE' | grep "${EDITION}" | cut -d' ' -f1) echo "${URL}/${ISO} ${HASH}" } function get_crunchbang++() { local HASH="" local ISO="" ISO=$(web_pipe "https://api.github.com/repos/CBPP/cbpp/releases" | grep 'download_url' | grep amd64 | grep "${RELEASE}" | cut -d'"' -f4) echo "${ISO} ${HASH}" } function get_debian() { local DEBCURRENT="" local HASH="" local ISO="debian-live-${RELEASE}-amd64-${EDITION}.iso" local URL="https://cdimage.debian.org/cdimage/archive/${RELEASE}-live/amd64/iso-hybrid" DEBCURRENT=$(web_pipe "https://cdimage.debian.org/debian-cd/" | grep '\.[0-9]/' | cut -d'>' -f 9 | cut -d'/' -f 1) case "${RELEASE}" in "${DEBCURRENT}") URL="https://cdimage.debian.org/debian-cd/${RELEASE}-live/amd64/iso-hybrid";; esac if [ "${EDITION}" == "netinst" ]; then URL="${URL/-live/}" URL="${URL/hybrid/cd}" ISO="${ISO/-live/}" fi HASH=$(web_pipe "${URL}/SHA512SUMS" | grep "${ISO}" | cut -d' ' -f1 | head -n 1) echo "${URL}/${ISO} ${HASH}" } function get_deepin() { local HASH="" local REV=${RELEASE} # deepin-desktop-community-20.3-amd64.iso local URL="https://cdimage.deepin.com/releases/"${RELEASE} # Correct URL for 23-RC onwards which has architecture directories if [ "${RELEASE}" != "20.9" ]; then URL+="/amd64" fi local ISO="deepin-desktop-community-${REV}-amd64.iso" HASH=$(web_pipe "${URL}/SHA256SUMS" | grep "${ISO}" | cut -d' ' -f1) echo "${URL}/${ISO} ${HASH}" } function get_devuan() { local HASH="" local ISO="" local URL="https://files.devuan.org/devuan_${RELEASE}/desktop-live" local VER="" case ${RELEASE} in beowulf) VER="3.1.1";; chimaera) VER="4.0.3";; daedalus) VER="5.0.0";; esac ISO="devuan_${RELEASE}_${VER}_amd64_desktop-live.iso" HASH=$(web_pipe "${URL}/SHASUMS.txt" | grep "${ISO}" | cut -d' ' -f1) echo "${URL}/${ISO} ${HASH}" } function get_dragonflybsd() { local HASH="" local ISO="dfly-x86_64-${RELEASE}_REL.iso.bz2" local URL="http://mirror-master.dragonflybsd.org/iso-images" HASH=$(web_pipe "${URL}/md5.txt" | grep "(${ISO})" | cut -d' ' -f4) echo "${URL}/${ISO} ${HASH}" } function get_easyos() { local HASH="" local URL="" local ISO="" local YEAR="" ISO="easy-${RELEASE}-amd64.img" TWO_YEARS=$(web_pipe https://distro.ibiblio.org/easyos/amd64/releases/kirkstone/ | grep -o -E '[[:digit:]]{4}/' | sort -nr | tr -d / | head -n 2 ) for YEAR in ${TWO_YEARS} ; do if web_check "https://distro.ibiblio.org/easyos/amd64/releases/kirkstone/${YEAR}/${RELEASE}/" ; then URL="https://distro.ibiblio.org/easyos/amd64/releases/kirkstone/${YEAR}/${RELEASE}" HASH=$(web_pipe "${URL}/md5.sum.txt" | cut -d' ' -f1) break fi done echo "${URL}/${ISO} ${HASH}" } function get_elementary() { local HASH="" case ${RELEASE} in 7.0) STAMP="20230129rc";; 7.1) STAMP="20230926rc";; 8.0) STAMP="20241122rc";; esac local ISO="elementaryos-${RELEASE}-stable.${STAMP}.iso" local URL="https://ams3.dl.elementary.io/download" echo "${URL}/$(date +%s | base64)/${ISO} ${HASH}" } function get_endeavouros() { local ENDEAVOUR_RELEASES="" local HASH="" local ISO="" local URL="https://mirror.alpix.eu/endeavouros/iso" # Find EndeavourOS releases from mirror, pick one matching release ENDEAVOUR_RELEASES="$(web_pipe "${URL}/" | grep -o '' | sed 's/^.*//' | grep -v 'x86_64')" ISO="$(echo "${ENDEAVOUR_RELEASES}" | grep -i "${RELEASE}").iso" HASH=$(web_pipe "${URL}/${ISO}.sha512sum" | cut -d' ' -f1) echo "${URL}/${ISO} ${HASH}" } function get_endless() { local HASH="" # No hash - there is a signature in .asc signed by #https://d1anzknqnc1kmb.cloudfront.net/eos-image-keyring.gpg # (4096R: CB50 0F7B C923 3FAD 32B4 E720 9E0C 1250 587A 279C) local FILE_TS="" # https://support.endlessos.org/en/installation/direct-download gives the info but computes the URLS in js # so parsing out the useful info is not happening tonight # Endless edition names are "base" for the small minimal one or the Language for the large full release # The isos are stamped as they are finished so .... case ${EDITION} in base) FILE_TS="241023-183516";; en) FILE_TS="241023-200926";; es) FILE_TS="241023-184649";; fr) FILE_TS="241023-191212";; pt_BR) FILE_TS="241023-191427";; esac URL="https://images-dl.endlessm.com/release/${RELEASE}/eos-amd64-amd64/${EDITION}" ISO="eos-eos${RELEASE:0:3}-amd64-amd64.${FILE_TS}.${EDITION}.iso" echo "${URL}/${ISO} ${HASH}" } function get_fedora() { local HASH="" local ISO="" local JSON="" local URL="" local VARIANT="" case ${EDITION} in Server|Kinoite|Onyx|Silverblue|Sericea|Workstation) VARIANT="${EDITION}";; *) VARIANT="Spins";; esac # The naming of 41 Beta with a space is problematic so we replaced it with an underscore # but we need to convert it back to a space for the URL search in the JSON #shellcheck disable=SC2086 # if RELEASE contains an underscore, replace it with a space if [[ "${RELEASE}" == *"_"* ]]; then RELEASE="${RELEASE/_/ }" fi # shellcheck disable=SC2086 JSON=$(web_pipe "https://getfedora.org/releases.json" | jq '.[] | select(.variant=="'${VARIANT}'" and .subvariant=="'"${EDITION}"'" and .arch=="x86_64" and .version=="'"${RELEASE}"'" and (.link | endswith(".iso")))') URL=$(echo "${JSON}" | jq -r '.link' | head -n1) HASH=$(echo "${JSON}" | jq -r '.sha256' | head -n1) echo "${URL} ${HASH}" } function get_freebsd() { local HASH="" local ISO="FreeBSD-${RELEASE}-RELEASE-amd64-${EDITION}.iso" local URL="https://download.freebsd.org/ftp/releases/amd64/amd64/ISO-IMAGES/${RELEASE}" HASH=$(web_pipe "${URL}/CHECKSUM.SHA256-FreeBSD-${RELEASE}-RELEASE-amd64" | grep "${ISO}" | grep -v ".xz" | cut -d' ' -f4) echo "${URL}/${ISO} ${HASH}" } function get_freedos() { local HASH="" local ISO="" local URL="https://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/${RELEASE}/official" case ${RELEASE} in 1.2) ISO="FD12CD.iso" HASH=$(web_pipe "${URL}/FD12.sha" | grep "${ISO}" | cut -d' ' -f1);; 1.3) ISO="FD13-LiveCD.zip" HASH=$(web_pipe "${URL}/verify.txt" | grep -A 8 "sha256sum" | grep "${ISO}" | cut -d' ' -f1);; esac echo "${URL}/${ISO} ${HASH}" } function get_garuda() { local HASH="" local ISO="" local URL="https://iso.builds.garudalinux.org/iso/latest/garuda" ISO=${EDITION}/latest.iso HASH="$(web_pipe "${URL}/${ISO}.sha256" | cut -d' ' -f1)" echo "${URL}/${ISO} ${HASH}" } function get_gentoo() { local HASH="" local ISO="" local URL="https://mirror.bytemark.co.uk/gentoo/releases/amd64/autobuilds" case ${EDITION} in minimal) ISO=$(web_pipe "${URL}/${RELEASE}-iso.txt" | grep install | cut -d' ' -f1);; livegui) ISO=$(web_pipe "${URL}/${RELEASE}-iso.txt" | grep livegui | cut -d' ' -f1);; esac HASH=$(web_pipe "${URL}/${ISO}.DIGESTS" | grep -A 1 SHA512 | grep iso | grep -v CONTENTS | cut -d' ' -f1) echo "${URL}/${ISO} ${HASH}" } function get_ghostbsd() { local ISO="" local URL="https://download.ghostbsd.org/releases/amd64/${RELEASE}" local HASH="" case ${EDITION} in mate) ISO="GhostBSD-${RELEASE}.iso";; xfce) ISO="GhostBSD-${RELEASE}-XFCE.iso";; esac HASH=$(web_pipe "${URL}/${ISO}.sha256" | grep "${ISO}" | cut -d' ' -f4) echo "${URL}/${ISO} ${HASH}" } function get_gnomeos() { local HASH="" local ISO="gnome_os_installer_${RELEASE}.iso" local URL="https://download.gnome.org/gnomeos/${RELEASE}" case ${RELEASE} in nightly) ISO="gnome_os_installer.iso" URL="https://os.gnome.org/download/latest";; 46.0) ISO="gnome_os_installer_46.iso";; 3*) ISO="gnome_os_installer.iso";; esac # Process the URL redirections; required for GNOME ISO=$(web_redirect "${URL}/${ISO}") echo "${ISO} ${HASH}" } function get_guix() { local HASH="" local ISO="guix-system-install-${RELEASE}.x86_64-linux.iso" local URL="https://ftpmirror.gnu.org/gnu/guix/" echo "${URL}/${ISO} ${HASH}" } function get_haiku() { local ISO="haiku-${RELEASE}-${EDITION}-anyboot.iso" local URL="http://mirror.rit.edu/haiku/${RELEASE}" HASH=$(web_pipe "${URL}/${ISO}.sha256" | grep "${ISO}" | cut -d' ' -f4) echo "${URL}/${ISO} ${HASH}" } function get_holoiso() { local HASH="" local URL="" RELEASE="$(web_pipe "https://github.com/HoloISO/releases/releases" | grep -o -e 'releases/tag/[[:digit:]]\+\(\.[[:digit:]]\+\)*' | head -n 1 | cut -d'/' -f 3)" URL=$(web_pipe "https://api.github.com/repos/HoloISO/releases/releases" | jq -r ".[] | select(.tag_name==\"${RELEASE}\") | .body" | sed -n 's/.*\(https:\/\/[^ ]*holoiso\.ru\.eu\.org\/[^ ]*\.iso\).*/\1/p' | head -n 1) echo "${URL} ${HASH}" } function get_kali() { local HASH="" local ISO="" local URL="https://cdimage.kali.org/${RELEASE}" ISO=$(web_pipe "${URL}/?C=M;O=D" | grep -o ">kali-linux-.*-installer-amd64.iso" | head -n 1 | cut -c 2-) HASH=$(web_pipe "${URL}/SHA256SUMS" | grep -v torrent | grep "${ISO}" | cut -d' ' -f1) echo "${URL}/${ISO} ${HASH}" } function get_kdeneon() { local HASH="" local ISO="" local URL="https://files.kde.org/neon/images/${RELEASE}/current" ISO=$(web_pipe "${URL}/neon-${RELEASE}-current.sha256sum" | cut -d' ' -f3-) HASH=$(web_pipe "${URL}/neon-${RELEASE}-current.sha256sum" | cut -d' ' -f1) echo "${URL}/${ISO} ${HASH}" } function get_kolibrios() { local HASH="" local ISO="latest-iso.7z" local URL="http://builds.kolibrios.org/${EDITION}" echo "${URL}/${ISO} ${HASH}" } function get_linuxlite() { local HASH="" local ISO="linux-lite-${RELEASE}-64bit.iso" local URL="https://sourceforge.net/projects/linux-lite/files/${RELEASE}" HASH=$(web_pipe "${URL}/${ISO}.sha256" | cut -d' ' -f1) echo "${URL}/${ISO} ${HASH}" } function get_linuxmint() { local HASH="" local ISO="linuxmint-${RELEASE}-${EDITION}-64bit.iso" local URL="https://mirror.bytemark.co.uk/linuxmint/stable/${RELEASE}" HASH=$(web_pipe "${URL}/sha256sum.txt" | grep "${ISO}" | cut -d' ' -f1) echo "${URL}/${ISO} ${HASH}" } function get_lmde() { local HASH="" local ISO="lmde-${RELEASE}-${EDITION}-64bit.iso" local URL="https://mirror.bytemark.co.uk/linuxmint/debian" HASH=$(web_pipe "${URL}/sha256sum.txt" | grep "${ISO}" | cut -d' ' -f1) echo "${URL}/${ISO} ${HASH}" } function get_maboxlinux() { local HASH="" local URL="" URL="https://sourceforge.net/projects/mabox-linux/files/${RELEASE}/download" URL="$(web_redirect "${URL}" | cut -d? -f1)" echo "${URL} ${HASH}" } function generate_id() { local macRecoveryID="" local TYPE="${1}" local valid_chars=("0" "1" "2" "3" "4" "5" "6" "7" "8" "9" "A" "B" "C" "D" "E" "F") for ((i=0; i&1 | tr ';' '\n' | awk -F'session=|;' '{print $2}' | grep 1) info=$(curl -s -X POST -H "Host: osrecovery.apple.com" \ -H "Connection: close" \ -A "InternetRecovery/1.0" \ -b "session=\"${appleSession}\"" \ -H "Content-Type: text/plain" \ -d $'cid='"$(generate_id 16)"$'\nsn='${MLB}$'\nbid='${BOARD_ID}$'\nk='"$(generate_id 64)"$'\nfg='"$(generate_id 64)"$'\nos='${OS_TYPE} \ https://osrecovery.apple.com/InstallationPayload/RecoveryImage | tr ' ' '\n') downloadLink=$(echo "$info" | grep 'oscdn' | grep 'dmg') downloadSession=$(echo "$info" | grep 'expires' | grep 'dmg') chunkListLink=$(echo "$info" | grep 'oscdn' | grep 'chunklist') chunkListSession=$(echo "$info" | grep 'expires' | grep 'chunklist') if [ "${OPERATION}" == "show" ]; then test_result "${OS}" "${RELEASE}" "" "${downloadLink}" exit 0 elif [ "${OPERATION}" == "test" ]; then CHECK=$(web_check "${downloadLink}" --header "Host: oscdn.apple.com" --header "Connection: close" --header "User-Agent: InternetRecovery/1.0" --header "Cookie: AssetToken=${downloadSession}" && echo "PASS" || echo "FAIL") test_result "${OS}" "${RELEASE}" "" "${downloadLink}" "${CHECK}" exit 0 elif [ "${OPERATION}" == "download" ]; then echo "Downloading macOS (${RELEASE^}) RecoveryImage" echo " - URL: ${downloadLink}" web_get "${downloadLink}" "${VM_PATH}" RecoveryImage.dmg --header "Host: oscdn.apple.com" --header "Connection: close" --header "User-Agent: InternetRecovery/1.0" --header "Cookie: AssetToken=${downloadSession}" web_get "${chunkListLink}" "${VM_PATH}" RecoveryImage.chunklist --header "Host: oscdn.apple.com" --header "Connection: close" --header "User-Agent: InternetRecovery/1.0" --header "Cookie: AssetToken=${chunkListSession}" VM_PATH="$(pwd)" else if [ ! -e "${VM_PATH}/RecoveryImage.chunklist" ]; then echo "Downloading macOS (${RELEASE^}) RecoveryImage" echo " - URL: ${downloadLink}" web_get "${downloadLink}" "${VM_PATH}" RecoveryImage.dmg --header "Host: oscdn.apple.com" --header "Connection: close" --header "User-Agent: InternetRecovery/1.0" --header "Cookie: AssetToken=${downloadSession}" web_get "${chunkListLink}" "${VM_PATH}" RecoveryImage.chunklist --header "Host: oscdn.apple.com" --header "Connection: close" --header "User-Agent: InternetRecovery/1.0" --header "Cookie: AssetToken=${chunkListSession}" if ! "${CHUNKCHECK}" "${VM_PATH}" 2> /dev/null; then echo " - WARNING! Verification failed, continuing anyway" else echo " - Verification passed" fi if [ -e "${VM_PATH}/RecoveryImage.dmg" ] && [ ! -e "${VM_PATH}/RecoveryImage.img" ]; then echo " - Converting RecoveryImage.dmg" ${QEMU_IMG} convert "${VM_PATH}/RecoveryImage.dmg" -O raw "${VM_PATH}/RecoveryImage.img" 2>/dev/null fi rm "${VM_PATH}/RecoveryImage.dmg" "${VM_PATH}/RecoveryImage.chunklist" echo " - RecoveryImage.img is ready." fi echo "Downloading OpenCore & UEFI firmware" web_get "https://github.com/kholia/OSX-KVM/raw/master/OpenCore/OpenCore.qcow2" "${VM_PATH}" web_get "https://github.com/kholia/OSX-KVM/raw/master/OVMF_CODE.fd" "${VM_PATH}" if [ ! -e "${VM_PATH}/OVMF_VARS-1920x1080.fd" ]; then web_get "https://github.com/kholia/OSX-KVM/raw/master/OVMF_VARS-1920x1080.fd" "${VM_PATH}" fi fi make_vm_config RecoveryImage.img } function get_mageia() { local HASH="" local ISO="" ISO=$(web_pipe https://www.mageia.org/en/downloads/get/?q="Mageia-${RELEASE}-Live-${EDITION}-x86_64.iso" | grep 'click here'| grep -o 'href=.*\.iso'|cut -d\" -f2) HASH=$(web_pipe "${ISO}.sha512" | cut -d' ' -f1) echo "${ISO} ${HASH}" } function get_manjaro() { local HASH="" local ISO="" local MANIFEST="" local URL="" local TYPE="official" MANIFEST="$(web_pipe https://gitlab.manjaro.org/web/iso-info/-/raw/master/file-info.json)" case "${RELEASE}" in sway) MANIFEST="$(web_pipe https://mirror.manjaro-sway.download/manjaro-sway/release.json)" TYPE="sway" ;; cinnamon|i3) TYPE="community";; esac if [ "${EDITION}" == "minimal" ] && [ "${TYPE}" != "sway" ]; then EDITION=".minimal" else EDITION="" fi if [ "${RELEASE}" == "sway" ]; then URL=$(echo "${MANIFEST}" | jq -r '.[] | select(.name|test("^manjaro-sway-.*[.]iso$")) | .url') else URL="$(echo "${MANIFEST}" | jq -r ."${TYPE}.${RELEASE}${EDITION}".image)" fi HASH=$(web_pipe "${URL}.sha512" | cut -d' ' -f1) echo "${URL} ${HASH}" } function get_mxlinux() { local HASH="" local ISO="" local URL="https://sourceforge.net/projects/mx-linux/files/Final/${EDITION}" case ${EDITION} in Xfce) ISO="MX-${RELEASE}_x64.iso";; KDE) ISO="MX-${RELEASE}_KDE_x64.iso";; Fluxbox) ISO="MX-${RELEASE}_fluxbox_x64.iso";; esac HASH=$(web_pipe "${URL}/${ISO}.sha256" | cut -d' ' -f1) echo "${URL}/${ISO} ${HASH}" } function get_netboot() { local HASH="" local ISO="netboot.xyz.iso" local URL="https://boot.netboot.xyz/ipxe" HASH=$(web_pipe "${URL}/netboot.xyz-sha256-checksums.txt" | grep "${ISO}" | cut -d' ' -f1) echo "${URL}/${ISO} ${HASH}" } function get_netbsd() { local HASH="" local ISO="NetBSD-${RELEASE}-amd64.iso" local URL="https://cdn.netbsd.org/pub/NetBSD/NetBSD-${RELEASE}/images" HASH=$(web_pipe "${URL}/MD5" | grep "${ISO}" | cut -d' ' -f4) echo "${URL}/${ISO} ${HASH}" } function get_nitrux() { local HASH="" local URLBASE="" local URL="" local ISO="" URLBASE="https://sourceforge.net/projects/nitruxos/files/Release" URL="${URLBASE}/ISO" ISO=$(web_pipe 'https://sourceforge.net/projects/nitruxos/rss?path=/Release/ISO' | grep '.iso' | head -n 1 | cut -d']' -f1 | cut -d '/' -f4) HASH=$(web_pipe "${URLBASE}/MD5/${ISONAME}.md5sum" | grep "${ISO}" | cut -d' ' -f1) echo "${URL}/${ISO} ${HASH}" } function get_nixos() { local HASH="" # Adapt the plasma edition according to the NixOS release case "${EDITION}" in plasma) if [ "${RELEASE}" == "23.11" ]; then EDITION+="5" else EDITION+="6" fi ;; esac local ISO="latest-nixos-${EDITION}-x86_64-linux.iso" local URL="https://channels.nixos.org/nixos-${RELEASE}" HASH=$(web_pipe "${URL}/${ISO}.sha256" | cut -d' ' -f1) echo "${URL}/${ISO} ${HASH}" } function get_nwg-shell() { local HASH="" local ISO="nwg-live-${RELEASE}-x86_64.iso" local URL="https://sourceforge.net/projects/nwg-iso/files" HASH="$(web_pipe "https://sourceforge.net/projects/nwg-iso/rss?path=/" | grep "${ISO}" | cut -d'>' -f3 | cut -d'<' -f1 | tail -n 1)" echo "${URL}/${ISO} ${HASH}" } function get_openbsd() { local HASH="" local ISO="install${RELEASE//\./}.iso" local URL="https://mirror.leaseweb.com/pub/OpenBSD/${RELEASE}/amd64" HASH=$(web_pipe "${URL}/SHA256" | grep "${ISO}" | cut -d' ' -f4) echo "${URL}/${ISO} ${HASH}" } function get_openindiana() { local HASH="" local ISO="" local URL="" URL="https://dlc.openindiana.org/isos/hipster/${RELEASE}" ISO="OI-hipster-${EDITION}-${RELEASE}.iso" HASH=$(web_pipe "${URL}/${ISO}.sha256" |cut -d' ' -f1) echo "${URL}/${ISO} ${HASH}" } function get_opensuse() { local HASH="" local ISO="" local URL="" if [ "${RELEASE}" == "tumbleweed" ]; then ISO="openSUSE-Tumbleweed-DVD-x86_64-Current.iso" URL="https://download.opensuse.org/tumbleweed/iso" elif [ "${RELEASE}" == "microos" ]; then ISO="openSUSE-MicroOS-DVD-x86_64-Current.iso" URL="https://download.opensuse.org/tumbleweed/iso" elif [ "${RELEASE}" == "aeon" ]; then ISO="opensuse-aeon.x86_64.iso" URL="https://mirrorcache.opensuse.org/tumbleweed/appliances/iso" elif [ "${RELEASE}" == 15.0 ] || [ "${RELEASE}" == 15.1 ]; then ISO="openSUSE-Leap-${RELEASE}-DVD-x86_64.iso" URL="https://download.opensuse.org/distribution/leap/${RELEASE}/iso" else ISO="openSUSE-Leap-${RELEASE}-DVD-x86_64-Current.iso" URL="https://download.opensuse.org/distribution/leap/${RELEASE}/iso" fi HASH=$(web_pipe "${URL}/${ISO}.sha256" | awk '{if(NR==4) print $0}' | cut -d' ' -f1) echo "${URL}/${ISO} ${HASH}" } function get_oraclelinux() { local HASH="" local ISO="" local VER_MAJ=${RELEASE::1} local VER_MIN=${RELEASE:2:1} local URL="https://yum.oracle.com/ISOS/OracleLinux/OL${VER_MAJ}/u${VER_MIN}/x86_64" case ${VER_MAJ} in 7) ISO="OracleLinux-R${VER_MAJ}-U${VER_MIN}-Server-x86_64-dvd.iso";; *) ISO="OracleLinux-R${VER_MAJ}-U${VER_MIN}-x86_64-dvd.iso";; esac HASH=$(web_pipe "https://linux.oracle.com/security/gpg/checksum/OracleLinux-R${VER_MAJ}-U${VER_MIN}-Server-x86_64.checksum" | grep "${ISO}" | cut -d' ' -f1) echo "${URL}/${ISO} ${HASH}" } function get_parrotsec() { local HASH="" local ISO="" local URL="" ISO="Parrot-${EDITION}-${RELEASE}_amd64.iso" URL="https://download.parrot.sh/parrot/iso/${RELEASE}" HASH="$(web_pipe "${URL}/signed-hashes.txt" | grep "${ISO}" | cut -d' ' -f1)" echo "${URL}/${ISO} ${HASH}" } function get_peppermint() { local HASH="" local ISO="" local URL="https://sourceforge.net/projects/peppermintos/files/isos" case ${EDITION} in devuan-xfce) ISO="PeppermintOS-devuan_64_xfce.iso" URL="${URL}/XFCE";; debian-xfce) ISO="PeppermintOS-Debian-64.iso" URL="${URL}/XFCE";; devuan-gnome) ISO="PeppermintOS-devuan_64_gfb.iso" URL="${URL}/Gnome_FlashBack";; debian-gnome) ISO="PeppermintOS-Debian_64_gfb.iso" URL="${URL}/Gnome_FlashBack";; esac HASH=$(web_pipe "${URL}/${ISO}-sha512.checksum" | grep "${ISO}" | cut -d' ' -f1) echo "${URL}/${ISO} ${HASH}" } function get_popos() { local HASH="" local ISO="" local URL="" URL=$(web_pipe "https://api.pop-os.org/builds/${RELEASE}/${EDITION}" | jq -r .url) HASH=$(web_pipe "https://api.pop-os.org/builds/${RELEASE}/${EDITION}" | jq -r .sha_sum) echo "${URL} ${HASH}" } function get_porteus() { local HASH="" local ISO="" local URL="" edition="${EDITION~~}" ISO="Porteus-${edition}-v${RELEASE}-x86_64.iso" URL="https://mirrors.dotsrc.org/porteus/x86_64/Porteus-v${RELEASE}" HASH=$(web_pipe "${URL}/sha256sums.txt" | grep "${ISO}" | cut -d' ' -f1) echo "${URL}/${ISO} ${HASH}" } function get_primtux() { local HASH="" local URL="" local ISO="" ISO="PrimTux${RELEASE}-amd64-${EDITION}.iso" URL="https://sourceforge.net/projects/primtux/files/Distribution" HASH=$(web_pipe "${URL}/${ISO}.md5" | grep "${ISO}" | cut -d' ' -f1) echo "${URL}/${ISO} ${HASH}" } function get_proxmox-ve() { local HASH="" local ISO="" local URL="" ISO="proxmox-ve_${RELEASE}.iso" URL="https://enterprise.proxmox.com/iso" HASH=$(web_pipe "${URL}/SHA256SUMS" | grep "${ISO}" | cut -d' ' -f1) echo "${URL}/${ISO} ${HASH}" } function get_pureos() { local HASH="" local ISO="" local URL="" local PureName= PureName="$(web_pipe "https://www.pureos.net/download/" | grep -m 1 "downloads.puri" | cut -d '/' -f 4)" local PureDate= PureDate="$(web_pipe "https://www.pureos.net/download/" | grep -m 1 "downloads.puri" | cut -d '/' -f 6)" local PureDateSquashed="${PureDate//'-'/}" edition="${EDITION,,}" URL="https://downloads.puri.sm/${PureName}/${edition}/${PureDate}" ISO="pureos-${RELEASE}-${edition}-live-${PureDateSquashed}_amd64.iso" local IsoTrimmed= IsoTrimmed="${ISO%.*}" HASH="$(web_pipe "${URL}/${IsoTrimmed}.checksums_sha256.txt" | grep -m 1 '.iso' | cut -d '.' -f 1)" echo "${URL}/${ISO} ${HASH}" } function get_reactos() { local HASH="" local URL="" URL="$(web_redirect "https://sourceforge.net/projects/reactos/files/latest/download")" echo "${URL} ${HASH}" } function get_rebornos() { local HASH="" local ISO="" ISO=$(web_pipe "https://meta.cdn.soulharsh007.dev/RebornOS-ISO?format=json" | jq -r ".url") HASH=$(web_pipe "https://meta.cdn.soulharsh007.dev/RebornOS-ISO?format=json" | jq -r ".md5") echo "${ISO} ${HASH}" } function get_rockylinux() { if [[ "${RELEASE}" =~ ^8. ]] && [[ "${EDITION}" == "dvd" ]]; then EDITION="dvd1" fi local HASH="" local ISO="Rocky-${RELEASE}-x86_64-${EDITION}.iso" local URL="" URL="https://dl.rockylinux.org/vault/rocky/${RELEASE}/isos/x86_64" HASH=$(web_pipe "${URL}/CHECKSUM" | grep "SHA256" | grep "${ISO})" | cut -d' ' -f4) echo "${URL}/${ISO} ${HASH}" } function get_siduction() { local HASH="" local DATE="" local ISO="" local URL="https://mirrors.dotsrc.org/siduction/iso/Standing_on_the_Shoulders_of_Giants/${EDITION}" DATE=$(web_pipe "${URL}"| grep .iso.md5 | cut -d'-' -f6 | cut -d'.' -f1) HASH=$(web_pipe "${URL}/${ISO}.md5" | cut -d' ' -f1) ISO="siduction-2023.1.1-Standing_on_the_Shoulders_of_Giants-${EDITION}-amd64-${DATE}.iso" echo "${URL}/${ISO} ${HASH}" } function get_slackware() { local HASH="" local ISO="slackware64-${RELEASE}-install-dvd.iso" local URL="https://slackware.nl/slackware/slackware-iso/slackware64-${RELEASE}-iso" HASH=$(web_pipe "${URL}/${ISO}.md5" | cut -d' ' -f1) echo "${URL}/${ISO} ${HASH}" } function get_slax() { local HASH="" local ISO="" local URL="" case ${EDITION} in debian) URL="https://ftp.fi.muni.cz/pub/linux/slax/Slax-12.x" ISO=$(web_pipe "${URL}/md5.txt" | grep '64bit-' | cut -d' ' -f3 | tail -n1);; slackware) URL="https://ftp.fi.muni.cz/pub/linux/slax/Slax-15.x" ISO=$(web_pipe "${URL}/md5.txt" | grep '64bit-' | cut -d' ' -f3 | tail -n1);; esac HASH=$(web_pipe "${URL}/md5.txt" | grep '64bit-' | cut -d' ' -f1 | tail -n1) echo "${URL}/${ISO} ${HASH}" } function get_slint() { local HASH="" local MAJ_VER="" local ISO="slint64-${RELEASE}.iso" MAJ_VER="$(echo "${RELEASE}" | cut -d'-' -f 1)" local URL="https://slackware.uk/slint/x86_64/slint-${MAJ_VER}/iso" HASH=$(web_pipe "${URL}/${ISO}.sha256" | cut -d' ' -f4) echo "${URL}/${ISO}" "${HASH}" } function get_slitaz() { local HASH="" local ISO="slitaz-rolling-${RELEASE}" local URL="http://mirror.slitaz.org/iso/rolling" HASH=$(web_pipe "${URL}/${ISO}.md5" | cut -d' ' -f1) echo "${URL}/${ISO}.iso ${HASH}" } function get_solus() { local HASH="" local ISO="Solus-${EDITION}-Release-${RELEASE}.iso" local URL="https://downloads.getsol.us/isos/${RELEASE}" HASH=$(web_pipe "${URL}/${ISO}.sha256sum" | cut -d' ' -f1) echo "${URL}/${ISO} ${HASH}" } function get_sparkylinux() { local HASH="" local ISO="" local URL="" ISO="sparkylinux-${RELEASE}-x86_64-${EDITION}.iso" case ${EDITION} in minimalcli) URL="https://sourceforge.net/projects/sparkylinux/files/cli";; minimalgui) URL="https://sourceforge.net/projects/sparkylinux/files/base";; *) URL="https://sourceforge.net/projects/sparkylinux/files/${EDITION}";; esac HASH=$(web_pipe "${URL}/${ISO}.allsums.txt" | head -n 2 | grep 'iso' | cut -d' ' -f1) echo "${URL}/${ISO}" "${HASH}" } function get_spirallinux() { local HASH="" local ISO="SpiralLinux_${EDITION}_12.231005_x86-64.iso" local URL="https://sourceforge.net/projects/spirallinux/files/12.231005" HASH=$(web_pipe 'https://sourceforge.net/projects/spirallinux/rss?path=/' | grep "${ISO}" | grep 'md5' | cut -d'<' -f3 | cut -d'>' -f2) echo "${URL}/${ISO}" "${HASH}" } function get_tails() { local JSON="" local HASH="" local URL="" JSON="$(web_pipe "https://tails.boum.org/install/v2/Tails/amd64/${RELEASE}/latest.json")" URL=$(echo "${JSON}" | jq -r '.installations[0]."installation-paths"[]|select(.type=="iso")|."target-files"[0].url') HASH=$(echo "${JSON}" | jq -r '.installations[0]."installation-paths"[]|select(.type=="iso")|."target-files"[0].sha256') echo "${URL} ${HASH}" } function get_tinycore() { local ARCH="x86" local HASH="" local ISO="${EDITION}-${RELEASE}.0.iso" case "${EDITION}" in *Pure*) ARCH+="_64";; esac local URL="http://www.tinycorelinux.net/${RELEASE}.x/${ARCH}/release" HASH=$(web_pipe "${URL}/${ISO}.md5.txt" | cut -d' ' -f1) echo "${URL}/${ISO} ${HASH}" } function get_trisquel() { local HASH="" local ISO="" local URL="https://mirrors.ocf.berkeley.edu/trisquel-images" case ${EDITION} in mate) ISO="trisquel_${RELEASE}_amd64.iso";; lxde) ISO="trisquel-mini_${RELEASE}_amd64.iso";; kde) ISO="triskel_${RELEASE}_amd64.iso";; sugar) ISO="trisquel-sugar_${RELEASE}_amd64.iso";; esac HASH=$(web_pipe "${URL}/${ISO}.sha1" | grep "${ISO}" | cut -d' ' -f1) echo "${URL}/${ISO} ${HASH}" } function get_truenas-scale() { local HASH="" local ISO="" local URL="" local DLINFO="https://www.truenas.com/download-truenas-scale/" URL=$(web_pipe "${DLINFO}" | grep -o "\"https://.*${RELEASE}.*\.iso\"" | cut -d'"' -f 2) HASH=$(web_pipe "${URL}.sha256" | cut -d' ' -f1) echo "${URL} ${HASH}" } function get_truenas-core() { local ISO="" local URL="" local DLINFO="https://www.truenas.com/download-truenas-core/" URL=$(web_pipe "${DLINFO}" | grep -o "\"https://.*${RELEASE}.*\.iso\"" | cut -d'"' -f 2) HASH=$(web_pipe "${URL}".sha256 | cut -d' ' -f1) echo "${URL} ${HASH}" } function get_tuxedo-os() { local HASH="" local ISO="" local URL="https://os.tuxedocomputers.com" ISO="$(web_pipe "https://os.tuxedocomputers.com/" | grep -m 1 current.iso | cut -d '=' -f 4 | cut -d '"' -f 2)" HASH="$(web_pipe "https://os.tuxedocomputers.com/checksums/${ISO}.sha256" | cut -d ' ' -f 1)" echo "${URL}/${ISO} ${HASH}" } function get_ubuntu-server() { local HASH="" local ISO="" local NAME="live-server" local URL="" if [[ "${RELEASE}" == "daily"* ]]; then URL="https://cdimage.ubuntu.com/${OS}/${RELEASE}/current" else URL="https://releases.ubuntu.com/${RELEASE}" fi case "${RELEASE}" in 14*|16*) NAME="server";; esac if web_check "${URL}/SHA256SUMS"; then DATA=$(web_pipe "${URL}/SHA256SUMS" | grep "${NAME}" | grep amd64 | grep iso) ISO=$(cut -d'*' -f2 <<<"${DATA}") HASH=$(cut -d' ' -f1 <<<"${DATA}") else DATA=$(web_pipe "${URL}/MD5SUMS" | grep "${NAME}" | grep amd64 | grep iso) ISO=$(cut -d' ' -f3 <<<"${DATA}") HASH=$(cut -d' ' -f1 <<<"${DATA}") fi if [[ "${RELEASE}" == "daily"* ]] || [ "${RELEASE}" == "dvd" ]; then zsync_get "${URL}/${ISO}" "${VM_PATH}" "${OS}-devel.iso" make_vm_config "${OS}-devel.iso" else web_get "${URL}/${ISO}" "${VM_PATH}" check_hash "${ISO}" "${HASH}" make_vm_config "${ISO}" fi } function get_ubuntu() { local ISO="" local HASH="" local URL="" local DATA="" if [[ "${RELEASE}" == "daily"* ]] && [ "${OS}" == "ubuntustudio" ]; then # Ubuntu Studio daily-live images are in the dvd directory RELEASE="dvd" fi if [[ "${RELEASE}" == "jammy-daily" ]]; then if [[ "${OS}" == "ubuntustudio" ]]; then URL="https://cdimage.ubuntu.com/${OS}/jammy/dvd/current" else URL="https://cdimage.ubuntu.com/${OS}/jammy/daily-live/current" fi VM_PATH="${OS}-jammy-live" elif [[ "${RELEASE}" == "daily"* ]] || [ "${RELEASE}" == "dvd" ]; then URL="https://cdimage.ubuntu.com/${OS}/${RELEASE}/current" VM_PATH="${OS}-${RELEASE}" elif [ "${OS}" == "ubuntu" ]; then URL="https://releases.ubuntu.com/${RELEASE}" else URL="https://cdimage.ubuntu.com/${OS}/releases/${RELEASE}/release" fi if web_check "${URL}/SHA256SUMS"; then DATA=$(web_pipe "${URL}/SHA256SUMS" | grep 'desktop\|dvd\|install' | grep amd64 | grep iso | grep -v "+mac") ISO=$(cut -d'*' -f2 <<<"${DATA}" | sed '1q;d') HASH=$(cut -d' ' -f1 <<<"${DATA}" | sed '1q;d') else DATA=$(web_pipe "${URL}/MD5SUMS" | grep 'desktop\|dvd\|install' | grep amd64 | grep iso | grep -v "+mac") ISO=$(cut -d'*' -f2 <<<"${DATA}") HASH=$(cut -d' ' -f1 <<<"${DATA}") fi if [ -z "${ISO}" ] || [ -z "${HASH}" ]; then echo "$(pretty_name "${OS}") ${RELEASE} is currently unavailable. Please select other OS/Release combination" exit 1 fi if [[ "${RELEASE}" == "daily"* ]] || [ "${RELEASE}" == "dvd" ]; then zsync_get "${URL}/${ISO}" "${VM_PATH}" "${OS}-devel.iso" make_vm_config "${OS}-devel.iso" elif [[ "${RELEASE}" == "jammy-daily" ]]; then zsync_get "${URL}/${ISO}" "${VM_PATH}" "${OS}-jammy-live.iso" make_vm_config "${OS}-jammy-live.iso" else web_get "${URL}/${ISO}" "${VM_PATH}" check_hash "${ISO}" "${HASH}" make_vm_config "${ISO}" fi } function get_vanillaos() { local HASH="" local HASH_URL="" local ISO="" ISO=$(web_pipe "https://api.github.com/repos/Vanilla-OS/live-iso/releases" | grep 'download_url' | grep "${RELEASE}" | head -n 1 | cut -d'"' -f4) HASH_URL="${ISO//.iso/.sha256.txt}" HASH=$(web_pipe "${HASH_URL}" | cut -d' ' -f1) echo "${ISO} ${HASH}" } function get_void() { local DATE="" local HASH="" local ISO="" local URL="https://repo-default.voidlinux.org/live" case ${EDITION} in glibc) ISO="void-live-x86_64-${RELEASE}-base.iso";; musl) ISO="void-live-x86_64-musl-${RELEASE}-base.iso";; xfce-glibc) ISO="void-live-x86_64-${RELEASE}-xfce.iso";; xfce-musl) ISO="void-live-x86_64-musl-${RELEASE}-xfce.iso";; esac HASH="$(web_pipe "${URL}/sha256sum.txt" | grep "${ISO}" | cut -d' ' -f4)" echo "${URL}/${RELEASE}/${ISO} ${HASH}" } function get_vxlinux() { local HASH="" local ISO="vx-${RELEASE}.iso" local URL="https://github.com/VX-Linux/main/releases/download/${RELEASE}" HASH=$(web_pipe "${URL}/vx-${RELEASE}.md5" | cut -d' ' -f1) echo "${URL}/${ISO} ${HASH}" } function get_zorin() { local HASH="" local ISO="" local URL="" # Process the URL redirections; required for Zorin URL=$(web_redirect "https://zrn.co/${RELEASE}${EDITION}") echo "${URL} ${HASH}" } function unattended_windows() { mkdir -p "${1}/unattended" 2>/dev/null cat << 'EOF' > "${1}/unattended/autounattend.xml" false * true 1 true * Quickemu Project Quickemu 24/7 Quickemu Project https://github.com/quickemu-project/quickemu/issues Quickemu Project W269N-WFGWX-YVC9B-4J6C9-T83GX 0 false 0 true 1 Primary 256 2 EFI 128 3 MSR 128 4 Primary true 1 1 NTFS DE94BBA4-06D1-4D40-A16A-BFD50179D6AC 2 2 FAT32 3 3 4 4 C NTFS true Never 0 4 false 1 reg add HKLM\System\Setup\LabConfig /v BypassCPUCheck /t REG_DWORD /d 0x00000001 /f 2 reg add HKLM\System\Setup\LabConfig /v BypassRAMCheck /t REG_DWORD /d 0x00000001 /f 3 reg add HKLM\System\Setup\LabConfig /v BypassSecureBootCheck /t REG_DWORD /d 0x00000001 /f 4 reg add HKLM\System\Setup\LabConfig /v BypassTPMCheck /t REG_DWORD /d 0x00000001 /f false Never true Quickemu Quickemu Project W269N-WFGWX-YVC9B-4J6C9-T83GX Never E:\qemufwcfg\w10\amd64 E:\vioinput\w10\amd64 E:\vioscsi\w10\amd64 E:\viostor\w10\amd64 E:\vioserial\w10\amd64 E:\qxldod\w10\amd64 E:\amd64\w10 E:\viogpudo\w10\amd64 E:\viorng\w10\amd64 E:\NetKVM\w10\amd64 E:\viofs\w10\amd64 E:\Balloon\w10\amd64 quickemu true</PlainText> </Password> <Enabled>true</Enabled> <Username>Quickemu</Username> </AutoLogon> <DisableAutoDaylightTimeSet>false</DisableAutoDaylightTimeSet> <OOBE> <HideEULAPage>true</HideEULAPage> <HideLocalAccountScreen>true</HideLocalAccountScreen> <HideOEMRegistrationScreen>true</HideOEMRegistrationScreen> <HideOnlineAccountScreens>true</HideOnlineAccountScreens> <HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE> <NetworkLocation>Home</NetworkLocation> <ProtectYourPC>3</ProtectYourPC> <SkipUserOOBE>true</SkipUserOOBE> <SkipMachineOOBE>true</SkipMachineOOBE> <VMModeOptimizations> <SkipWinREInitialization>true</SkipWinREInitialization> </VMModeOptimizations> </OOBE> <UserAccounts> <LocalAccounts> <LocalAccount wcm:action="add"> <Password> <Value>quickemu</Value> <PlainText>true</PlainText> </Password> <Description>Quickemu</Description> <DisplayName>Quickemu</DisplayName> <Group>Administrators</Group> <Name>Quickemu</Name> </LocalAccount> </LocalAccounts> </UserAccounts> <RegisteredOrganization>Quickemu Project</RegisteredOrganization> <RegisteredOwner>Quickemu</RegisteredOwner> <FirstLogonCommands> <SynchronousCommand wcm:action="add"> <CommandLine>msiexec /i E:\guest-agent\qemu-ga-x86_64.msi /quiet /passive /qn</CommandLine> <Description>Install Virtio Guest Agent</Description> <Order>1</Order> </SynchronousCommand> <SynchronousCommand wcm:action="add"> <CommandLine>msiexec /i F:\spice-webdavd-x64-latest.msi /quiet /passive /qn</CommandLine> <Description>Install spice-webdavd file sharing agent</Description> <Order>2</Order> </SynchronousCommand> <SynchronousCommand wcm:action="add"> <CommandLine>msiexec /i F:\UsbDk_1.0.22_x64.msi /quiet /passive /qn</CommandLine> <Description>Install usbdk USB sharing agent</Description> <Order>3</Order> </SynchronousCommand> <SynchronousCommand wcm:action="add"> <CommandLine>msiexec /i F:\spice-vdagent-x64-0.10.0.msi /quiet /passive /qn</CommandLine> <Description>Install spice-vdagent SPICE agent</Description> <Order>4</Order> </SynchronousCommand> <SynchronousCommand wcm:action="add"> <CommandLine>Cmd /c POWERCFG -H OFF</CommandLine> <Description>Disable Hibernation</Description> <Order>5</Order> </SynchronousCommand> </FirstLogonCommands> </component> </settings> </unattend> EOF echo "Downloading Spice drivers..." web_get https://www.spice-space.org/download/windows/spice-webdavd/spice-webdavd-x64-latest.msi "${VM_PATH}/unattended" web_get https://www.spice-space.org/download/windows/vdagent/vdagent-win-0.10.0/spice-vdagent-x64-0.10.0.msi "${VM_PATH}/unattended" web_get https://www.spice-space.org/download/windows/usbdk/UsbDk_1.0.22_x64.msi "${VM_PATH}/unattended" echo "Making unattended.iso" mkisofs -quiet -l -o "${VM_PATH}/unattended.iso" "${VM_PATH}/unattended/" } function handle_curl_error() { local error_code="$1" local fatal_error_action=2 case "$error_code" in 6) echo "Failed to resolve Microsoft servers! Is there an Internet connection? Exiting..." return "$fatal_error_action" ;; 7) echo "Failed to contact Microsoft servers! Is there an Internet connection or is the server down?" ;; 8) echo "Microsoft servers returned a malformed HTTP response!" ;; 22) echo "Microsoft servers returned a failing HTTP status code!" ;; 23) echo "Failed at writing Windows media to disk! Out of disk space or permission error? Exiting..." return "$fatal_error_action" ;; 26) echo "Ran out of memory during download! Exiting..." return "$fatal_error_action" ;; 36) echo "Failed to continue earlier download!" ;; 63) echo "Microsoft servers returned an unexpectedly large response!" ;; # POSIX defines exit statuses 1-125 as usable by us # https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_08_02 $((error_code <= 125))) # Must be some other server or network error (possibly with this specific request/file) # This is when accounting for all possible errors in the curl manual assuming a correctly formed curl command and an HTTP(S) request, using only the curl features we're using, and a sane build echo "Miscellaneous server or network error!" ;; 126 | 127 ) echo "Curl command not found! Please install curl and try again. Exiting..." return "$fatal_error_action" ;; # Exit statuses are undefined by POSIX beyond this point *) case "$(kill -l "$error_code")" in # Signals defined to exist by POSIX: # https://pubs.opengroup.org/onlinepubs/009695399/basedefs/signal.h.html INT) echo "Curl was interrupted!" ;; # There could be other signals but these are most common SEGV | ABRT ) echo "Curl crashed! Failed exploitation attempt? Please report any core dumps to curl developers. Exiting..." return "$fatal_error_action" ;; *) echo "Curl terminated due to a fatal signal!" ;; esac esac return 1 } function download_windows_server() { local iso_download_page_html="" # Copyright (C) 2024 Elliot Killick <contact@elliotkillick.com> # This function is adapted from the Mido project: # https://github.com/ElliotKillick/Mido # Download enterprise evaluation Windows versions local windows_version="$1" local enterprise_type="$2" local PRETTY_RELEASE="" case "${RELEASE}" in *) PRETTY_RELEASE="${RELEASE}";; esac echo "Downloading $(pretty_name "${OS}") ${PRETTY_RELEASE} (${I18N})" local url="https://www.microsoft.com/en-us/evalcenter/download-$windows_version" echo " - Parsing download page: ${url}" iso_download_page_html="$(curl --silent --location --max-filesize 1M --fail --proto =https --tlsv1.2 --http1.1 -- "$url")" || { handle_curl_error $? return $? } if ! [ "$iso_download_page_html" ]; then # This should only happen if there's been some change to where this download page is located echo " - Windows server download page gave us an empty response" return 1 fi local CULTURE="" local COUNTRY="" case "${I18N}" in "English (Great Britain)") CULTURE="en-gb" COUNTRY="GB";; "Chinese (Simplified)") CULTURE="zh-cn" COUNTRY="CN";; "Chinese (Traditional)") CULTURE="zh-tw" COUNTRY="TW";; "French") CULTURE="fr-fr" COUNTRY="FR";; "German") CULTURE="de-de" COUNTRY="DE";; "Italian") CULTURE="it-it" COUNTRY="IT";; "Japanese") CULTURE="ja-jp" COUNTRY="JP";; "Korean") CULTURE="ko-kr" COUNTRY="KR";; "Portuguese (Brazil)") CULTURE="pt-br" COUNTRY="BR";; "Spanish") CULTURE="es-es" COUNTRY="ES";; "Russian") CULTURE="ru-ru" COUNTRY="RU";; *) CULTURE="en-us" COUNTRY="US";; esac echo " - Getting download link.." iso_download_links="$(echo "$iso_download_page_html" | grep -o "https://go.microsoft.com/fwlink/p/?LinkID=[0-9]\+&clcid=0x[0-9a-z]\+&culture=${CULTURE}&country=${COUNTRY}")" || { # This should only happen if there's been some change to the download endpoint web address echo " - Windows server download page gave us no download link" return 1 } # Limit untrusted size for input validation iso_download_links="$(echo "$iso_download_links" | head -c 1024)" case "$enterprise_type" in # Select x64 download link "enterprise") iso_download_link=$(echo "$iso_download_links" | head -n 2 | tail -n 1) ;; # Select x64 LTSC download link "ltsc") iso_download_link=$(echo "$iso_download_links" | head -n 4 | tail -n 1) ;; *) iso_download_link="$iso_download_links" ;; esac # Follow redirect so proceeding log message is useful # This is a request we make this Fido doesn't # We don't need to set "--max-filesize" here because this is a HEAD request and the output is to /dev/null anyway iso_download_link="$(curl --silent --location --output /dev/null --silent --write-out "%{url_effective}" --head --fail --proto =https --tlsv1.2 --http1.1 -- "$iso_download_link")" || { # This should only happen if the Microsoft servers are down handle_curl_error $? return $? } # Limit untrusted size for input validation iso_download_link="$(echo "$iso_download_link" | head -c 1024)" echo " - URL: $iso_download_link" # Download ISO FILE_NAME="${iso_download_link##*/}" web_get "${iso_download_link}" "${VM_PATH}" "${FILE_NAME}" OS="windows-server" } function download_windows_workstation() { local HASH="" local session_id="" local iso_download_page_html="" local product_edition_id="" local language_skuid_table_json="" local sku_id="" local iso_download_link_json="" local iso_download_link="" echo "Downloading Windows ${RELEASE} (${I18N})" # This function is adapted from the Mido project: # https://github.com/ElliotKillick/Mido # Download newer consumer Windows versions from behind gated Microsoft API # Either 10, or 11 local windows_version="$1" local url="https://www.microsoft.com/en-us/software-download/windows$windows_version" case "$windows_version" in 10) url="${url}ISO";; esac local user_agent="Mozilla/5.0 (X11; Linux x86_64; rv:100.0) Gecko/20100101 Firefox/100.0" session_id="$(uuidgen)" # Get product edition ID for latest release of given Windows version # Product edition ID: This specifies both the Windows release (e.g. 22H2) and edition ("multi-edition" is default, either Home/Pro/Edu/etc., we select "Pro" in the answer files) in one number # This is the *only* request we make that Fido doesn't. Fido manually maintains a list of all the Windows release/edition product edition IDs in its script (see: $WindowsVersions array). This is helpful for downloading older releases (e.g. Windows 10 1909, 21H1, etc.) but we always want to get the newest release which is why we get this value dynamically # Also, keeping a "$WindowsVersions" array like Fido does would be way too much of a maintenance burden # Remove "Accept" header that curl sends by default echo " - Parsing download page: ${url}" iso_download_page_html="$(curl --silent --user-agent "$user_agent" --header "Accept:" --max-filesize 1M --fail --proto =https --tlsv1.2 --http1.1 -- "$url")" || { handle_curl_error $? return $? } echo -n " - Getting Product edition ID: " # tr: Filter for only numerics to prevent HTTP parameter injection # head -c was recently added to POSIX: https://austingroupbugs.net/view.php?id=407 product_edition_id="$(echo "$iso_download_page_html" | grep -Eo '<option value="[0-9]+">Windows' | cut -d '"' -f 2 | head -n 1 | tr -cd '0-9' | head -c 16)" echo "$product_edition_id" echo " - Permit Session ID: $session_id" # Permit Session ID # "org_id" is always the same value curl --silent --output /dev/null --user-agent "$user_agent" --header "Accept:" --max-filesize 100K --fail --proto =https --tlsv1.2 --http1.1 -- "https://vlscppe.microsoft.com/tags?org_id=y6jn8c31&session_id=$session_id" || { # This should only happen if there's been some change to how this API works handle_curl_error $? return $? } local profile="606624d44113" echo -n " - Getting language SKU ID: " # Get language -> skuID association table language_skuid_table_json="$(curl -s --fail --max-filesize 100K --proto =https --tlsv1.2 --http1.1 "https://www.microsoft.com/software-download-connector/api/getskuinformationbyproductedition?profile=${profile}&ProductEditionId=${product_edition_id}&SKU=undefined&friendlyFileName=undefined&Locale=en-US&sessionID=${session_id}")" || { handle_curl_error $? return $? } sku_id="$(echo "${language_skuid_table_json}" | jq -r '.Skus[] | select(.LocalizedLanguage=="'"${I18N}"'").Id')" echo "$sku_id" echo " - Getting ISO download link..." # Get ISO download link # If any request is going to be blocked by Microsoft it's always this last one (the previous requests always seem to succeed) # --referer: Required by Microsoft servers to allow request iso_download_link_json="$(curl -s --fail --referer "$url" "https://www.microsoft.com/software-download-connector/api/GetProductDownloadLinksBySku?profile=${profile}&productEditionId=undefined&SKU=${sku_id}&friendlyFileName=undefined&Locale=en-US&sessionID=${session_id}")" local failed=0 if ! [ "$iso_download_link_json" ]; then # This should only happen if there's been some change to how this API works echo " - Microsoft servers gave us an empty response to our request for an automated download." failed=1 fi if echo "$iso_download_link_json" | grep -q "Sentinel marked this request as rejected."; then echo " - WARNING! Microsoft blocked the automated download request based on your IP address." failed=1 fi if [ ${failed} -eq 1 ]; then echo " Manually download the Windows ${windows_version} ISO using a web browser from: ${url}" echo " Save the downloaded ISO to: $(realpath "${VM_PATH}")" echo " Update the config file to reference the downloaded ISO: ./${VM_PATH}.conf" echo " Continuing with the VM creation process..." return 1 fi # Filter for 64-bit ISO download URL iso_download_link="$(echo "${iso_download_link_json}" | jq -r '.ProductDownloadOptions[].Uri' | grep x64)" if ! [ "$iso_download_link" ]; then # This should only happen if there's been some change to the download endpoint web address echo " - Microsoft servers gave us no download link to our request for an automated download. Please manually download this ISO in a web browser: $url" return 1 fi echo " - URL: ${iso_download_link%%\?*}" # Download ISO FILE_NAME="$(echo "$iso_download_link" | cut -d'?' -f1 | cut -d'/' -f5)" web_get "${iso_download_link}" "${VM_PATH}" "${FILE_NAME}" } function get_windows() { if [ "${OS}" == "windows-server" ]; then download_windows_server "windows-server-${RELEASE}" else download_windows_workstation "${RELEASE}" fi if [ "${OPERATION}" == "download" ]; then exit 0 fi echo "Downloading VirtIO drivers..." web_get "https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/stable-virtio/virtio-win.iso" "${VM_PATH}" rm -f "${VM_PATH}/unattended.iso" case ${RELEASE} in 10|11) unattended_windows "${VM_PATH}" ;; esac if [ -n "${FILE_NAME}" ]; then make_vm_config "${FILE_NAME}" "virtio-win.iso" else make_vm_config "windows-${RELEASE}.iso" "virtio-win.iso" fi } function open_homepage() { local URL="" local XDG_OPEN="" if [ -z "$(os_info "${1}")" ]; then error_specify_os else URL="$(os_info "${1}" | cut -d'|' -f 3)" # shellcheck disable=SC2034 XDG_OPEN=$(xdg-open "${URL}" || sensible-browser "${URL}" || x-www-browser "${URL}" || gnome-open "${URL}") exit 0 fi } function create_vm() { # shellcheck disable=SC2206 local URL_HASH=(${1// / }) local URL="${URL_HASH[0]}" local HASH="${URL_HASH[1]}" local ISO="${URL##*/}" #echo "${URL}" #echo "${ISO}" #echo "${HASH}" web_get "${URL}" "${VM_PATH}" if [ -n "${HASH}" ]; then check_hash "${ISO}" "${HASH}" fi case "${OS}" in batocera) if [[ ${ISO} = *".gz"* ]]; then gzip -d "${VM_PATH}/${ISO}" ISO="${ISO/.gz/}" fi;; dragonflybsd) # Could be other OS iso files compressed with bzip2 or gzip # but for now we'll keep this to know cases if [[ ${ISO} = *".bz2"* ]]; then bzip2 -d "${VM_PATH}/${ISO}" ISO="${ISO/.bz2/}" fi;; easyos) if [[ ${ISO} = *".img"* ]]; then ${QEMU_IMG} convert -f raw -O qcow2 "${VM_PATH}/${ISO}" "${VM_PATH}/disk.qcow2" ISO="${ISO/.img/}" fi;; freedos) if [[ ${ISO} = *".zip"* ]]; then unzip -qo "${VM_PATH}/${ISO}" -d "${VM_PATH}" rm -f "${VM_PATH}/${ISO}" ISO="$(ls -1 "${VM_PATH}/"*.iso)" ISO="$(basename "${ISO}")" fi;; kolibrios) if [[ ${ISO} = *".7z" ]]; then if [ -z "$(command -v 7z)" ]; then echo "ERROR! '7zip' needs installing. Unable to extract file." else 7z e "${VM_PATH}/${ISO}" -o"${VM_PATH}" >/dev/null 2>&1 rm -f "${VM_PATH}/${ISO}" ISO="$(ls -1 "${VM_PATH}/"*.iso)" ISO="$(basename "${ISO}")" fi fi;; reactos) if [[ ${ISO} = *".zip"* ]]; then unzip -qo "${VM_PATH}/${ISO}" -d "${VM_PATH}" rm -f "${VM_PATH}/${ISO}" ISO="$(ls -1 "${VM_PATH}/"*.iso)" ISO="$(basename "${ISO}")" fi;; esac make_vm_config "${ISO}" } function create_config() { local VM_PATH="${1}" local INPUT="${2}" local FIXED_ISO="" OS="custom" if ! mkdir "${VM_PATH}" 2>/dev/null; then echo "ERROR! Could not create directory: ${VM_PATH}. Please verify that it does not already exist" exit 1 fi if [[ "${INPUT}" == "http://"* ]] || [[ "${INPUT}" == "https://"* ]]; then INPUT="$(web_redirect "${INPUT}")" if [[ "${INPUT}" == *".iso" ]] || [[ "${INPUT}" == *".img" ]]; then web_get "${INPUT}" "${VM_PATH}" INPUT="${INPUT##*/}" else echo "ERROR! Only ISO,IMG and QCOW2 file types are supported for --create-config" exit 1 fi fi if [ ! -f "${INPUT}" ]; then echo "ERROR! The input must be a valid URL or path to an ISO, IMG, or QCOW2 file." exit 1 elif [[ "${INPUT}" == *".iso" ]]; then echo "Moving image to VM dir" && mv "${INPUT}" "${VM_PATH}" CUSTOM_IMAGE_TYPE="iso" elif [[ "${INPUT}" == *".img" ]]; then echo "Moving image to VM dir" && mv "${INPUT}" "${VM_PATH}" CUSTOM_IMAGE_TYPE="img" elif [[ "${INPUT}" == *".qcow2" ]]; then echo "Moving image to VM dir" && mv "${INPUT}" "${VM_PATH}/disk.qcow2" CUSTOM_IMAGE_TYPE="qcow2" else echo "ERROR! Only ISO,IMG and QCOW2 file types are supported for --create-config" exit 1 fi INPUT="$(basename "${INPUT}")" echo "Creating custom VM config for ${INPUT##*/}." case "${INPUT,,}" in *freebsd*) CUSTOM_OS="freebsd";; *kolibrios*) CUSTOM_OS="kolibrios";; *reactos*) CUSTOM_OS="reactos";; *windows-server*|*eval_oemret_x*|*eval_x*) CUSTOM_OS="windows-server";; *windows*|win*) CUSTOM_OS="windows" # Older windows 10 ISOs use the year followed by the month rather than the year & half). Match any text for language. if [ "${3}" != "--disable-unattended" ] && ( [ "${3}" == "--unattended" ] || grep -E -q 'Win(10|11)_([0-9]{2}H(1|2)|[0-9]{4})_[^.]*?(x64|x32)(v[0-9])?.iso' <<< "${INPUT}" ); then echo "Creating unattended Windows installation files. To disable, pass --disable-unattended" echo echo "Downloading VirtIO drivers..." web_get "https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/stable-virtio/virtio-win.iso" "${VM_PATH}" FIXED_ISO="virtio-win.iso" rm -f "${VM_PATH}/unattended.iso" unattended_windows "${VM_PATH}" fi ;; *) CUSTOM_OS="linux";; esac echo -e "Selecting OS: ${CUSTOM_OS}. If this is incorrect, please modify the config file to include the correct OS.\n" make_vm_config "${INPUT}" "${FIXED_ISO}" } # Use command -v command to check if quickemu is in the system's PATH and # fallback to checking if quickemu is in the current directory. function resolve_quickemu() { command -v quickemu || \ if [ -x "./quickemu" ]; then echo "$(pwd)/quickemu" else echo "quickemu not found" >&2 exit 1 fi } function help_message() { #shellcheck disable=SC2016 printf ' _ _ _ __ _ _ _(_) ___| | ____ _ ___| |_ / _` | | | | |/ __| |/ / _` |/ _ \ __| | (_| | |_| | | (__| < (_| | __/ |_ \__, |\__,_|_|\___|_|\_\__, |\___|\__| |_| |___/ v%s, using curl %s -------------------------------------------------------------------------------- Project - https://github.com/quickemu-project/quickemu Discord - https://wimpysworld.io/discord -------------------------------------------------------------------------------- Usage: quickget <os> <release> [edition] quickget ubuntu 22.04 Advanced usage: quickget <arg> [path] <os> [release] [edition] quickget --download ubuntu 22.04 Arguments: --download <os> <release> [edition] : Download image; no VM configuration --create-config <os> [path/url] [flags] : Create VM config for an OS image --open-homepage <os> : Open homepage for the OS --show [os] : Show OS information --version : Show version --help : Show this help message ------------------------------------ Flags ------------------------------------- --create-config: --disable-unattended : Force quickget not to set up an unattended installation -------------------------- For testing & development --------------------------- --url [os] [release] [edition] : Show image URL(s) --check [os] [release] [edition] : Check image URL(s) --list : List all supported systems --list-csv : List everything in csv format --list-json : List everything in json format -------------------------------------------------------------------------------- Supported Operating Systems:\n\n' "$(${QUICKEMU} --version)" "${CURL_VERSION}" os_support | fmt -w 80 } trap cleanup EXIT if ((BASH_VERSINFO[0] < 4)); then echo "Sorry, you need bash 4.0 or newer to run this script." exit 1 fi QUICKEMU=$(resolve_quickemu) I18NS=() OPERATION="" CURL=$(command -v curl) if [ ! -x "${CURL}" ]; then echo "ERROR! curl not found. Please install curl" exit 1 fi CURL_VERSION=$("${CURL}" --version | head -n 1 | cut -d' ' -f2) QEMU_IMG=$(command -v qemu-img) if [ ! -x "${QEMU_IMG}" ]; then echo "ERROR! qemu-img not found. Please make sure qemu-img is installed." exit 1 fi #TODO: Deprecate `list`, `list_csv`, and `list_json` in favor of `--list`, `--list-csv`, and `--list-json` case "${1}" in --download|-download) OPERATION="download" shift ;; --create-config|-create-config) OPERATION="config" shift create_config "${@}" ;; --open-homepage|-open-homepage) shift open_homepage "${1}" ;; --show|-show) shift if [ -z "${1}" ]; then for OS in $(os_support); do show_os_info "${OS}" done else show_os_info "${1}" fi exit 0;; --version|-version) WHERE=$(dirname "${BASH_SOURCE[0]}") "${WHERE}/quickemu" --version exit 0;; --help|-help|--h|-h) help_message exit 0;; --url|-url) OPERATION="show" shift if [ -z "${1}" ]; then for OS in $(os_support); do (test_all "${OS}") done exit 0 elif [ -z "${2}" ]; then test_all "${1}" exit 0 fi;; --check|-check) OPERATION="test" shift if [ -z "${1}" ]; then for OS in $(os_support); do (test_all "${OS}") done exit 0 elif [ -z "${2}" ]; then test_all "${1}" exit 0 fi;; --list-csv|-list-csv|list|list_csv) list_csv;; --list-json|-list-json|list_json) list_json;; --list|-list) list_supported;; -*) error_not_supported_argument;; esac if [ -n "${1}" ]; then OS="${1,,}" else error_specify_os fi os_supported if [ -n "${2}" ]; then RELEASE="${2}" VM_PATH="${OS}-${RELEASE}" # If the OS has an editions_() function, use it. if [[ $(type -t "editions_${OS}") == function ]]; then validate_release "releases_${OS}" EDITIONS=("$(editions_"${OS}")") if [ -n "${3}" ]; then EDITION="${3}" if [[ ! "${EDITIONS[*]}" = *"${EDITION}"* ]]; then echo -e "ERROR! ${EDITION} is not a supported $(pretty_name "${OS}") edition\n" echo -n ' - Supported editions: ' for EDITION in "${EDITIONS[@]}"; do echo -n "${EDITION} " done echo "" exit 1 fi else show_os_info "${OS}" echo -e " - Editions:\t$("editions_${OS}" | fmt -w 80)" echo -e "\nERROR! You must specify an edition." exit 1 fi handle_missing VM_PATH="${OS}-${RELEASE}-${EDITION}" create_vm "$("get_${OS}" "${EDITION}")" elif [ "${OS}" == "macos" ]; then # macOS doesn't use create_vm() validate_release releases_macos get_macos elif [[ "${OS}" == *"ubuntu-server"* ]]; then # (Comes before regular Ubuntu, or the code tries to download the desktop) # # Ubuntu doesn't use create_vm() validate_release releases_ubuntu-server get_ubuntu-server elif [[ "${OS}" == *"ubuntu"* ]]; then # Ubuntu doesn't use create_vm() validate_release releases_ubuntu get_ubuntu elif [[ "${OS}" == "windows"* ]]; then I18N="English International" "languages_${OS}" if [ -n "${3}" ]; then I18N="${3}" if [[ ! "${I18NS[*]}" = *"${I18N}"* ]]; then error_not_supported_lang fi VM_PATH="$(echo "${OS}-${RELEASE}-${I18N// /-}" | tr -d '()')" fi validate_release "releases_${OS}" get_windows else validate_release "releases_${OS}" create_vm "$("get_${OS}")" fi else error_specify_release fi # vim:tabstop=4:shiftwidth=4:expandtab �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������quickemu-4.9.7/quickreport��������������������������������������������������������������������������0000775�0000000�0000000�00000007055�14734510276�0015674�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env bash quick_report() { local GPUS local OS_KERNEL local PRETTY_NAME local QUICKEMU local VERSION OS_KERNEL=$(uname -s) if [ "${OS_KERNEL}" == "Darwin" ]; then # Get macOS product name and version using swvers if [ -x "$(command -v sw_vers)" ]; then PRETTY_NAME="$(sw_vers -productName) $(sw_vers -productVersion)" else PRETTY_NAME="macOS" fi elif [ -e /etc/os-release ]; then PRETTY_NAME=$(grep PRETTY_NAME /etc/os-release | cut -d'"' -f2) else PRETTY_NAME="Unknown OS" fi CWD="$(dirname "${0}")" if [ -x "${CWD}/quickemu" ]; then QUICKEMU="${CWD}/quickemu" elif [ -x "$(command -v quickemu)" ]; then QUICKEMU="$(command -v quickemu)" fi if [ -n "${QUICKEMU}" ]; then VERSION=$(${QUICKEMU} --version) echo \ "---------------------------------- Quickemu ${VERSION} ----------------------------------" echo -e "Distro:\t${PRETTY_NAME}" echo -e "Kernel:\t$(uname -s -r -m)" if [ "${OS_KERNEL}" == "Darwin" ]; then echo -e "Memory:\t$(($(sysctl -n hw.memsize) / (1048576*1024)))G" else # Determine the number of gigabytes of RAM in the host by extracting the first numerical value from the output. echo -e "Memory:\t$(free --giga -h | tr ' ' '\n' | grep -m 1 "[0-9]" | cut -d'G' -f 1)G" fi # Break IFS on new line IFS=$'\n' if [ "${OS_KERNEL}" == "Darwin" ]; then # Get GPU information using system_profiler GPUS=$(system_profiler SPDisplaysDataType | grep "Chipset Model" | awk -F: '{print $2}' | sed 's/^ *//') else GPUS=$(lspci | grep -i vga | cut -d':' -f3) fi if [ "$(echo "${GPUS}" | wc -l)" -eq 1 ]; then echo "GPU:" else echo "GPUs:" fi for GPU in ${GPUS}; do echo " -${GPU}" done else echo \ "---------------------------------- Quickemu missing! ----------------------------------" exit 1 fi if command -v curl &> /dev/null; then VERSION=$(curl --version) echo \ "---------------------------------- curl $(echo "${VERSION}" | head -n 1 | cut -d' ' -f2) ----------------------------------" echo -e "Libraries:$(echo "${VERSION}" | head -n 1 | cut -d')' -f2-)" echo -e "Protocols:$(echo "${VERSION}" | tail -n +3 | head -n 1 | cut -d':' -f2-)" echo -e "Features: $(echo "${VERSION}" | tail -n +4 | head -n 1 | cut -d':' -f2-)" else echo \ "---------------------------------- curl missing ----------------------------------" fi local HOST_ARCH HOST_ARCH=$(uname -m) local QEMU_ARCH="${HOST_ARCH}" if [ "${HOST_ARCH}" == "arm64" ]; then QEMU_ARCH="aarch64" fi if command -v "qemu-system-${QEMU_ARCH}" &> /dev/null; then VERSION=$("qemu-system-${QEMU_ARCH}" --version | head -n 1 | cut -d' ' -f4) echo \ "---------------------------------- QEMU ${VERSION} ----------------------------------" "qemu-system-${QEMU_ARCH}" -cpu help else echo \ "---------------------------------- QEMU missing ----------------------------------" fi echo \ "---------------------------------- CPU ----------------------------------" if [ "${OS_KERNEL}" == "Darwin" ]; then sysctl -n machdep.cpu.brand_string else lscpu fi } clear quick_report | tee quickreport.txt �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������