Skip to content

Latest commit

 

History

History
53 lines (43 loc) · 1.86 KB

virtualbox.md

File metadata and controls

53 lines (43 loc) · 1.86 KB

virtualbox

quirks

all ssl certificates are expiring

this is probably due to the vm syncing it's clock with host hardware, and running into problems. time sync is an ongoing virtualization issue. the fix here is to just disable guest sync with the host clock:

vboxmanage setextradata "vm name" "vboxinternal/devices/vmmdev/0/config/gethosttimedisabled" 1

centos guest

NOTE: uses centos stream

os install

be sure to enable the network interface via the anaconda installer gui.

post-os install

  1. update packages on the guest:
    sudo su -
    dnf update
    shutdown -r now
  2. install guest additions on the guest:
    sudo su -
    mkdir /media/VirtualBoxGuestAdditions
    mount -r /dev/cdrom /media/VirtualBoxGuestAdditions/
    dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
    dnf install -y gcc kernel-devel kernel-headers dkms make bzip2 perl
    KERN_DIR=/usr/src/kernels/`uname -r`
    export KERN_DIR
    cd /media/VirtualBoxGuestAdditions/
    ./VBoxLinuxAdditions.run
    exit
  3. shutdown the guest.
  4. configure core usage for guest on host via virtualbox ui.
  5. configure bridged networking for guest on host via virtualbox ui.
  6. boot guest and use virtualbox ui on host to configure shared folder.
  7. add guest shell user to vboxsf user and logout, then login.
  8. create ~/.ssh/authorized_keys on the guest.
  9. use shared folder to copy local public ssh key from host to guest.
  10. cat public ssh key from shared folder to ~/.ssh/authorized_keys.
  11. run chmod -R go= ~/.ssh on the guest to correct permissions.
  12. run VBoxManage guestproperty get <vm-name> "/VirtualBox/GuestInfo/Net/0/V4/IP" | cut -f2 -d " " on the host to get the guest's IP.
  13. test ssh access from host to guest.