Home
Operating System
Windows
Linux
Tutorial
Windows Server
About
☰
Create vm client and server with Virtaulbox manage tool
# Server
# Create VM VBoxManage createvm \ --name "WindowsServerVM" \ --ostype Windows2012_64 \ --basefolder "$HOME/VirtualBox VMs" \ --register # Configure VM VBoxManage modifyvm "WindowsServerVM" \ --memory 2048 \ --cpus 2 \ --ioapic on \ --boot1 dvd \ --boot2 disk \ --boot3 none \ --boot4 none \ --nic1 nat \ --audio-driver pulse \ --graphicscontroller VBoxSVGA \ --accelerate3d off \ --vram 128 \ --floppy disabled # Create 60GB virtual disk VBoxManage createmedium disk \ --filename "$HOME/VirtualBox VMs/WindowsServerVM/WindowsServerVM.vdi" \ --size 61440 # Create SATA controller VBoxManage storagectl "WindowsServerVM" \ --name "SATA Controller" \ --add sata # Attach hard disk VBoxManage storageattach "WindowsServerVM" \ --storagectl "SATA Controller" \ --port 0 \ --device 0 \ --type hdd \ --medium "$HOME/VirtualBox VMs/WindowsServerVM/WindowsServerVM.vdi" # Attach Windows Server 2012 ISO VBoxManage storageattach "WindowsServerVM" \ --storagectl "SATA Controller" \ --port 1 \ --device 0 \ --type dvddrive \ --medium "$HOME/Desktop/ISO/Windowserver12.iso" # Add NAT Network VBoxManage natnetwork add --netname "abcd" --network "172.31.255.0/28" # Add NAT Network to VM VBoxManage modifyvm "WindowsServerVM" --nic1 natnetwork \ --nicpromisc1 allow-all --nat-network1 "abcd" # Enable bidirectional clipboard VBoxManage modifyvm "WindowsServerVM" --clipboard-mode bidirectional # Enable bidirectional drag-and-drop VBoxManage modifyvm "WindowsServerVM" --draganddrop bidirectional # Show VM information VBoxManage showvminfo "WindowsServerVM" # Start VM with GUI VBoxManage startvm "WindowsServerVM" --type gui
✏️ Edit
📋 Copy
Copied!
# Client
# Create VM VBoxManage createvm \ --name "client" \ --ostype Windows7_64 \ --basefolder "$HOME/VirtualBox VMs" \ --register # Configure VM VBoxManage modifyvm "client" \ --memory 2048 \ --cpus 2 \ --ioapic on \ --boot1 dvd \ --boot2 disk \ --boot3 none \ --boot4 none \ --nic1 nat \ --audio-driver pulse \ --graphicscontroller VBoxSVGA \ --accelerate3d off \ --vram 128 \ --floppy disabled # Create 60GB virtual disk VBoxManage createmedium disk \ --filename "$HOME/VirtualBox VMs/client/client.vdi" \ --size 61440 # Create SATA controller VBoxManage storagectl "client" \ --name "SATA Controller" \ --add sata # Attach hard disk VBoxManage storageattach "client" \ --storagectl "SATA Controller" \ --port 0 \ --device 0 \ --type hdd \ --medium "$HOME/VirtualBox VMs/client/client.vdi" # Attach Windows 7 ISO VBoxManage storageattach "client" \ --storagectl "SATA Controller" \ --port 1 \ --device 0 \ --type dvddrive \ --medium "$HOME/Desktop/ISO/win7_64_bit.iso" # Add NAT Network to VM VBoxManage modifyvm "client" --nic1 natnetwork \ --nicpromisc1 allow-all --nat-network1 "abcd" # Enable bidirectional clipboard VBoxManage modifyvm "client" --clipboard-mode bidirectional # Enable bidirectional drag-and-drop VBoxManage modifyvm "client" --draganddrop bidirectional # Show VM information VBoxManage showvminfo "client" # Start VM with GUI VBoxManage startvm "client" --type gui
✏️ Edit
📋 Copy
Copied!
# Graceful Shutdown
VBoxManage controlvm "VMName" acpipowerbutton
✏️ Edit
📋 Copy
Copied!
# Save State (Pause and Resume later)
VBoxManage controlvm "VMName" savestate
✏️ Edit
📋 Copy
Copied!
# Hard Power Off (Immediate)
VBoxManage controlvm "VMName" poweroff
✏️ Edit
📋 Copy
Copied!
# Download Virtualbox Tool
https://download.virtualbox.org/virtualbox/
📋 Copy
Copied!
# Replace ISO windows to VirtualBox Tool
VBoxManage storageattach "VMName" \ --storagectl "SATA Controller" \ --port 1 \ --device 0 \ --type dvddrive \ --medium "$HOME/Desktop/ISO/VBoxGuestAdditions_7.2.10.iso"
✏️ Edit
📋 Copy
Copied!
# List VM
VBoxManage list vms
📋 Copy
Copied!
## List Running VM
VBoxManage list runningvms
📋 Copy
Copied!
## Create shared folder on Linux host
mkdir -p "$HOME/Desktop/shareFile" # Global Shared Folder VBoxManage sharedfolder add global \ --name "shareFile" \ --hostpath "$HOME/Desktop/shareFile" \ --automount \ --auto-mount-point "Z:"
✏️ Edit
📋 Copy
Copied!
## Create shared folder on windows host
VBoxManage sharedfolder add global --name "shareFile" ` --hostpath "$env:USERPROFILE\Desktop\shareFile" ` --automount --auto-mount-point "Z:"
✏️ Edit
📋 Copy
Copied!
Labels
all
(31 )
autocad
(3 )
css
(2 )
linux
(5 )
op_system
(18 )
website
(4 )
windows
(14 )
windowsServer
(27 )