1. 程式人生 > 實用技巧 >如何在macOS上安裝Windows 10 VirtualBox VM

如何在macOS上安裝Windows 10 VirtualBox VM

The VirtualBox logo.

Many people commonly use tools like Parallels or VMware to set up a virtual machine (VM) on their Macs. VirtualBox is a great, free alternative to do this. Plus, you can install and set it up in just a few minutes.

許多人通常使用Parallels或VMware之類的工具在Mac上設定虛擬機器(VM)。 VirtualBox是一個很好的免費替代方案。 另外,您只需幾分鐘即可安裝和設定。

VMs can run any operating system (OS) in your current one. Whether it’s for disaster recovery, code testing, or just some fun experimentation, you can use VirtualBox for free to simulate any Windows OS, including 98, 95, or even 3.1.

VM可以運行當前作業系統中的任何作業系統(OS)。 無論是用於災難恢復,程式碼測試,還是僅是一些有趣的實驗,您都可以免費使用VirtualBox來模擬任何Windows作業系統,包括98、95甚至3.1。

在macOS上安裝VirtualBox (Installing VirtualBox on macOS)

First, download the latest version of VirtualBox for macOS.Click “OS X Hosts” and the download will begin automatically.

首先,下載最新版本的VirtualBox for macOS。 單擊“ OS X主機”,下載將自動開始。

Click "Downloads" and "OS X Hosts" on the VirtualBox website.

Open the new DMG file, and then double-click “VirtualBox.pkg” to open the installer. You’ll also find the User Manual here, as well as the Uninstall tool.

開啟新的DMG檔案,然後雙擊“ VirtualBox.pkg”以開啟安裝程式。 您還可以在這裡找到《使用者手冊》以及“解除安裝”工具。

The VirtualBox Installer menu.

Click “Continue” to proceed through the installer.

單擊“繼續”以繼續安裝程式。

Click "Continue."

If you want to change where and how the VirtualBox application installs, click “Change Install Location.”

如果要更改VirtualBox應用程式的安裝位置和安裝方式,請單擊“更改安裝位置”。

When everything is the way you want it, click “Install.” If asked, type the password for your Mac.

一切就緒後,單擊“安裝”。 如果詢問,請輸入Mac的密碼。

If you haven’t given your Mac permission to install programs from Oracle previously, it’s highly likely the installation will fail at this stage.

如果您之前沒有授予Mac許可從Oracle安裝程式,則很有可能在此階段安裝失敗。

To grant permission, click the magnifying glass at the top right, type “Security,” and then press Enter. Alternatively, you can click Applications > System Preferences > Security and Privacy. Near the bottom ofthe General tab, you should see some text that says software from Oracle America, Inc. was blocked. Click “Allow,” and then reinstall.

要授予許可權,請單擊右上角的放大鏡,鍵入“安全性”,然後按Enter。 或者,您可以單擊應用程式>系統偏好設定>安全性和隱私。 在“常規”選項卡底部附近,您應該看到一些文字,說明來自Oracle America,Inc.的軟體已被阻止。 單擊“允許”,然後重新安裝。

Click "Allow."

Note that this option is only available for 30 minutes after a fresh install of VirtualBox. If you don’t see this text, open the “Applications” folder and drag the VirtualBox icon to the Trash to uninstall it.

請注意,此選項僅在全新安裝VirtualBox之後30分鐘內可用。 如果沒有看到此文字,請開啟“ Applications”資料夾,然後將VirtualBox圖示拖到“廢紙rash”以將其解除安裝。

Remove any leftover files, reinstall a fresh copy of VirtualBox, and then immediately reopen the “Security and Privacy” menu to see this option.

刪除所有剩餘檔案,重新安裝VirtualBox的新副本,然後立即重新開啟“安全和隱私”選單以檢視此選項。

Installation is now complete. Click “Close” and “Move to Trash” since you no longer need the installation file.

現在安裝完成。 單擊“關閉”和“移至廢紙””,因為您不再需要安裝檔案。

Click "Move to Trash."

在VirtualBox上安裝Windows 10 (Installing Windows 10 on VirtualBox)

Now that you’ve installed VirtualBox on your Mac, it’s time to load up your Windows 10 virtual machine. Open Virtual Box (via the “Applications” folder or via aSpotlight Search).

現在您已經在Mac上安裝了VirtualBox,是時候載入Windows 10虛擬機器了。 開啟Virtual Box(通過“應用程式”資料夾或Spotlight搜尋)。

VirtualBox in Applications.

In VirtualBox, click “New.”

在VirtualBox中,單擊“新建”。

Click "New."

You can name your new operating system whatever you want. If you type the name of any available OS (like “Windows 10”), the “Version” field automatically switches to that OS. You can choose a different “Machine Folder” to store the VMs.

您可以根據需要命名新的作業系統。 如果鍵入任何可用作業系統的名稱(例如“ Windows 10”),則“版本”欄位將自動切換到該作業系統。 您可以選擇其他“計算機資料夾”來儲存虛擬機器。

When you’re ready, click “Continue.”

準備好後,請點選“繼續”。

Type a name for your OS, select a "Version" from the drop-down menu, and then click "Continue."

On the following screen, choose how much RAM (the amount of memory) you want to allocate to your VM, and then click “Continue.” Keep in mind if you set this too high, your Mac won’t have enough memory to run.

在以下螢幕上,選擇要分配給VM的RAM(記憶體量),然後單擊“ Continue”。 請記住,如果設定得太高,Mac將沒有足夠的記憶體來執行。

The default recommendation is 2,048 MB, which is enough to run most installers. Heavier code or applications might require at least 2 GB, though. You can always change this later in “Settings.”

預設建議為2,048 MB,足以執行大多數安裝程式。 但是,較重的程式碼或應用程式可能至少需要2 GB。 您以後隨時可以在“設定”中更改此設定。

Click "Continue."

Now, you have to decide the size of the hard disk for your VM, or if you want one at all. Since this is likely the first VM you’re setting up on this machine, click the radio button next to “Create a Virtual Hard Disk Now,” and then click “Create.”

現在,您必須確定VM的硬碟大小,或者是否要一個。 由於這可能是您在該計算機上設定的第一個VM,因此請單擊“立即建立虛擬硬碟”旁邊的單選按鈕,然後單擊“建立”。

Select "Create a Virtual Hard Disk Now," and then click "Create."

Next, you have to decide which type of hard disk to create. The default is “VDI (VirtualBox Disk Image),” which is Oracle’s proprietary container format.

接下來,您必須確定要建立的硬碟型別。 預設值為“ VDI(VirtualBox磁碟映像)”,這是Oracle專有的容器格式。

However, you’re installing a Microsoft product, so you need to choose the format it uses, which is “VHD (Virtual Hard Disk).” Click the radio button next to that option, and then click “Continue.”

但是,您正在安裝Microsoft產品,因此需要選擇其使用的格式,即“ VHD(虛擬硬碟)”。 單擊該選項旁邊的單選按鈕,然後單擊“繼續”。

Select "VHD (Virtual Hard Disk)," and then click "Continue."

On the next screen, if you want a faster setup, select“Dynamically Allocated.” If you want faster performance (which we recommend), select “Fixed Size,” and then click “Continue.”

在下一個螢幕上,如果需要更快的設定,請選擇“動態分配”。 如果您想要更快的效能(我們建議),請選擇“固定大小”,然後單擊“繼續”。

Select "Dynamically Allocated" or "Fixed Size," and then click "Continue."

Lastly, you have to decide where to store your VM, and how much storage it needs. If you chose “Fixed Size” in the previous screen, click “Create.” VirtualBox will begin allotting that space.

最後,您必須決定將VM儲存在何處以及需要多少儲存空間。 如果您在上一個螢幕中選擇“固定大小”,請單擊“建立”。 VirtualBox將開始分配該空間。

Choose a size for the virtual hard disk, and then click "Create."

You’ve now successfully installed VirtualBox and a Windows 10 VM. However, just like on any physical machine, you have to set up the Windows 10 OS.

您現在已經成功安裝了VirtualBox和Windows 10 VM。 但是,就像在任何物理計算機上一樣,您必須設定Windows 10 OS。

You can download the freeWindows 10 disc imagedirectly from Microsoft.Save the ISO file to your computer, go back to VirtualBox, and then click “Start.”

您可以直接從Microsoft下載免費的Windows 10光碟映像。 將ISO檔案儲存到您的計算機,返回到VirtualBox,然後單擊“開始”。

Click "Start."

If the Windows 10 ISO is already on your computer, VirtualBox might try to identify and select itautomatically.

如果您的計算機上已經有Windows 10 ISO,則VirtualBox可能會嘗試識別並自動選擇它。

Otherwise, a new window opens so you can do this manually. Click the folder with the green up arrow.

否則,將開啟一個新視窗,您可以手動執行此操作。 單擊帶有綠色向上箭頭的資料夾。

Click the folder with the green up arrow.

In this window, click “Add.” Select the ISO file, click “Open,” and then click “Start.”

在此視窗中,單擊“新增”。 選擇ISO檔案,單擊“開啟”,然後單擊“開始”。

Click "Add."

Your Windows 10 VM is now ready to go on your Mac! If you ever want to change any of the settings, just right-click the VM, and then click “Settings.”

Windows 10 VM現在可以在Mac上運行了! 如果您想更改任何設定,只需右鍵單擊VM,然後單擊“設定”。

Click "Settings."

Now that you’re up and running, be sure to check out some of our other guides on VirtualBox and VMs.You can also refer to Oracle’s User Manual for VirtualBox if you have any questions.

既然您已經啟動並正在執行,請確保檢視有關VirtualBoxVM的其他一些指南。 如果有任何疑問,也可以參考Oracle的VirtualBox使用者手冊

翻譯自: https://www.howtogeek.com/657464/how-to-install-a-windows-10-virtualbox-vm-on-macos/