VirtualBox : Create Virtual Machine#12018/12/07 |
Create a Virtual Machine.
On this example, create it to install Ubuntu 18.04. |
|
[1] | Create a Virtual Machine. |
# create a VM root@dlp:~# VBoxManage createvm \ --name Ubuntu_1804 \ --ostype Ubuntu_64 \ --register \ --basefolder /var/vbox Virtual machine 'Ubuntu_1804' is created and registered. UUID: 8173c811-cc43-4ebe-b3d8-d80d17ba268e Settings file: '/var/vbox/Ubuntu_1804/Ubuntu_1804.vbox' # modify settings for VM (replace the name [ens3] to your environment) root@dlp:~# VBoxManage modifyvm Ubuntu_1804 \
--cpus 4 \ --memory 4096 \ --nic1 bridged \ --bridgeadapter1 ens3 \ --boot1 dvd \ --vrde on \ --vrdeport 5001 # configure storage for VM root@dlp:~# VBoxManage storagectl Ubuntu_1804 --name "Ubuntu_1804_SATA" --add sata root@dlp:~# VBoxManage createhd \ --filename /var/vbox/Ubuntu_1804/Ubuntu_1804.vdi \ --size 20480 \ --format VDI \ --variant Standard 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100% Medium created. UUID: 3f7df0d2-d7a2-4c6f-b841-1100c3aa8629 root@dlp:~# VBoxManage storageattach Ubuntu_1804 \
--storagectl Ubuntu_1804_SATA \ --port 1 \ --type hdd \ --medium /var/vbox/Ubuntu_1804/Ubuntu_1804.vdi # configure DVD drive for VM (the example specifies an ISO file) root@dlp:~# VBoxManage storageattach Ubuntu_1804 \
--storagectl Ubuntu_1804_SATA \ --port 0 \ --type dvddrive \ --medium /tmp/ubuntu-18.04-server-amd64.iso # confirm settings for VM root@dlp:~# VBoxManage showvminfo Ubuntu_1804 Name: Ubuntu_1804 Groups: / Guest OS: Ubuntu (64-bit) UUID: 8173c811-cc43-4ebe-b3d8-d80d17ba268e Config file: /var/vbox/Ubuntu_1804/Ubuntu_1804.vbox Snapshot folder: /var/vbox/Ubuntu_1804/Snapshots Log folder: /var/vbox/Ubuntu_1804/Logs Hardware UUID: 8173c811-cc43-4ebe-b3d8-d80d17ba268e Memory size: 4096MB Page Fusion: off VRAM size: 8MB CPU exec cap: 100% HPET: off Chipset: piix3 Firmware: BIOS Number of CPUs: 4 PAE: on Long Mode: on Triple Fault Reset: off APIC: on X2APIC: on CPUID Portability Level: 0 ..... ..... |
[2] | Start Virtual Machine. |
root@dlp:~# VBoxManage startvm Ubuntu_1804 --type headless Waiting for VM "Ubuntu_1804" to power on... VM "Ubuntu_1804" has been successfully started. |
[3] | On enabling VRDP,
it's possible to connect with RDP. The example below is from Windows 10. Connect to (VirtualBox Server's Hostname or IP address):(vrdeport set for the VM). |
[4] | Just connected. |
[5] | Installation has finished and Virtual Machine is running. |
Sponsored Link |
|