Changes

Jump to: navigation, search

Package:VirtualBox

3,353 bytes added, 2 years ago
no edit summary
{{console|body=
###i## gpasswd -a bob vboxguestsvboxguest
}}
Mount the Guest Additions ISO {{f|/usr/share/virtualbox/VBoxGuestAdditions.iso}} inside of your Microsoft Windows guest. Within Windows, browse to and install VirtualBox Guest Additions.
 
== Headless ==
To be able to use VRDP you have to install {{c|app-emulation/virtualbox-extpack-oracle.}}
To verify if extpack installed and usable:
{{console|body=
###i## VBoxManage list extpacks
Extension Packs: 1
Pack no. 0: Oracle VM VirtualBox Extension Pack
Version: 5.2.6
Revision: 120293
Edition:
Description: USB 2.0 and USB 3.0 Host Controller, Host Webcam, VirtualBox RDP, PXE ROM, Disk Encryption, NVMe.
VRDE Module: VBoxVRDP
Usable: true
Why unusable:
}}
 
Create a testvm using this command:
{{console|body=
###i## VBoxManage createvm --name "testvm"
Virtual machine 'testvm' is created.
UUID: 7b19dc85-2991-4e6a-b1e9-e8e6704e75b4
Settings file: '/root/.VirtualBox/Machines/testvm/testvm.vbox'
###i## VBoxManage registervm /root/.VirtualBox/Machines/testvm/testvm.vbox
###i## VBoxManage list vms
"testvm" {7b19dc85-2991-4e6a-b1e9-e8e6704e75b4}
}}
 
Specify the hardware configurations of the VM (ioapic is needed for SMP):
{{console|body=
###i## VBoxManage modifyvm testvm --memory 1024 --cpus 4 --ioapic on --acpi on --boot1 dvd --nic1 bridged --bridgeadapter1 eth0 --ostype Linux_64
}}
{{note|Enabling the I/O APIC is required for 64-bit guest operating systems, especially Windows Vista; it is also required if you want to use more than one virtual CPU in a virtual machine.}}
 
Create disk image:
{{console|body=
###i## VBoxManage createmedium --filename ~/VirtualBox\ VMs/testvm/testvm-disk01.vdi --size 10000
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Medium created. UUID: 0234cd8e-617a-435b-bed4-9aee99a0f34a
}}
 
Resize HDD to 50 GB.
{{console|body=
###i## VBoxManage modifymedium ~/VirtualBox\ VMs/testvm/testvm-disk01.vdi --resize 50000
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Medium created. UUID: 0234cd8e-617a-435b-bed4-9aee99a0f34a
}}
 
Add a SCSI controller:
{{console|body=
###i## VBoxManage storagectl testvm --name "SATA Controller" --add sata
}}
 
Attach install CD-ROM iso image and disk image:
{{console|body=
###i## VBoxManage storageattach "testvm" --storagectl "SATA Controller" --port 0 --device 0 --type hdd --medium /root/VirtualBox\ VMs/testvm/testvm-disk01.vdi
###i## VBoxManage storageattach "testvm" --storagectl "SATA Controller" --port 1 --device 0 --type dvddrive --medium /root/iso/systemrescuecd-x86-5.1.0.iso
}}
 
{{console|body=
###i## VBoxHeadless --startvm "testvm" -v on &
}}
 
The above command will launch the VM, as well as VRDE remote desktop server. The remote desktop server is needed to access the headless VM's console. By default, the VRDE server is listening on TCP port 3389.
 
After install you might want to remove the install CD from the drive like this.
{{console|body=
###i## VBoxManage storageattach "testvm" --storagectl "SATA Controller" --port 1 --device 0 --type dvddrive --medium none
}}
 
== Tips and Tricks ==
{{file|name=/etc/portage/make.conf|body=
VIDEO_CARDS="virtualbox"
}}
Then, reinstalling the xorg-server and xorg-drivers, will let X.Org work in "Guest OS"
{{console|body=
###i## emerge x11-base/xorg-server x11-base/xorg-drivers
}}
reference reports: https://www.virtualbox.org/ticket/14279 and https://bugs.funtoo.org/browse/FL-2640
An alternative workaround is to rename the grub EFI binary to take advantage of the EFI default boot behavior. During installation, when installing a boot-loader, do these additional steps:
* Create a folder under <code>/boot/EFI</code> called <code>BOOT</code>
* Copy <code>/boot/EFI/Funtoo Linux [GRUB]/grubx64.efi</code> to <code>/boot/EFI/BOOT/BOOTX64.EFI</code>
[[Category:Ebuilds]]
[[Category:Virtualization]]
{{EbuildFooter}}
wiki-staff
387
edits

Navigation menu