Simple CentOS 7 VM configuration
This setup allows you to ssh into your VM easily (without port forwarding)
- Create a new VirtualBox VM with name vm-name of type Linux, Version Linux 2.6 / 3.xd /4.x (64-bit)
- Start the VM, select the install iso, follow dialog boxes to complete installation then shutdown the vm
- run these commands on the host
VBoxManage modifyvm "vm-name" --nictype1 82543GC VBoxManage modifyvm "vm-name" --nic2 hostonly VBoxManage modifyvm "vm-name" --nictype2 82543GC VBoxManage modifyvm "vm-name" --hostonlyadapter2 "VirtualBox Host-Only Ethernet Adapter"
- run these command on the guest
sed -ie "s/ONBOOT=no/ONBOOT=yes/" /etc/sysconfig/network-scripts/ifcfg-enp0s3 sed -ie "s/ONBOOT=no/ONBOOT=yes/" /etc/sysconfig/network-scripts/ifcfg-enp0s8 systemctl stop NetworkManager.service systemctl start NetworkManager.service
No comments:
Post a Comment