Remember to maintain security and privacy. Do not share sensitive information. Procedimento.com.br may make mistakes. Verify important information. Termo de Responsabilidade
VirtualBox is a powerful open-source virtualization software developed by Oracle. It allows users to run multiple operating systems simultaneously on a single physical machine. This capability is particularly useful for developers, testers, and IT professionals who need to create isolated environments for testing software, running different OS versions, or setting up a sandbox environment. In this article, we'll explore how to install VirtualBox on a Windows machine, create a virtual machine (VM), and manage it using both the graphical user interface (GUI) and command-line interface (CLI).
Examples:
1. Download VirtualBox:
2. Install VirtualBox:
1. Open VirtualBox:
2. Create a New VM:
3. Configure the VM:
4. Start the VM:
VirtualBox includes a command-line tool called VBoxManage
that allows you to manage VMs without using the GUI. This can be particularly useful for automation and scripting.
1. Open Command Prompt:
Win + R
, type cmd
, and press Enter.2. Navigate to VirtualBox Directory:
cd "C:\Program Files\Oracle\VirtualBox"
3. Create a New VM:
VBoxManage createvm --name "MyVM" --register
4. Modify VM Settings:
VBoxManage modifyvm "MyVM" --memory 2048
VBoxManage modifyvm "MyVM" --ostype "Windows10_64"
VBoxManage createhd --filename "C:\Users\YourUser\VirtualBox VMs\MyVM\MyVM.vdi" --size 20000
VBoxManage storagectl "MyVM" --name "SATA Controller" --add sata --controller IntelAhci
VBoxManage storageattach "MyVM" --storagectl "SATA Controller" --port 0 --device 0 --type hdd --medium "C:\Users\YourUser\VirtualBox VMs\MyVM\MyVM.vdi"
5. Start the VM:
VBoxManage startvm "MyVM"
Snapshots: Use snapshots to save the state of a VM at a particular point in time.
VBoxManage snapshot "MyVM" take "InitialState"
Networking: Configure network settings to connect VMs to the internet or a host-only network.
VBoxManage modifyvm "MyVM" --nic1 nat