Nested VM Setup — Oracle Linux 7.x

ssh-keygen -t rsa
ssh -i<private_key> opc@<public_ip> (ssh as an opc user)
sudo yum -y install qemu-kvm qemu-img virt-manager libvirt libvirt-python libvirt-client virt-install virt-viewer
sudo yum group list
sudo yum groupinstall “Server with GUI”
sudo yum install xorg-x11-xauth xorg-x11-fonts-* xorg-x11-utils tigervnc-server -y
cd /lib/systemd/system
sudo cp vncserver@.service vncserver@:1.service
sudo vi vncserver\@\:1.service
vncpasswdPassword:Verify:
sudo yum install firewalldsudo systemctl start firewalldsudo systemctl enable firewalld
sudo firewall-cmd --zone=public --add-service vnc-serverfirewall-cmd --zone=public --permanent --add-port=5901/tcp
sudo systemctl daemon-reloadsudo systemctl enable vncserver@:1.servicesudo systemctl start vncserver@:1.service
Source/CIDR Range: 0.0.0.0/0IP Protocol: TCPSource Port Range: AllDestination Port Range: 5901Allows: TCP traffic for ports: 5901
<public_ip>:<5901>(the port that you configured)
yum -y install xrdp tigervnc-server
systemctl start xrdp
netstat -antup | grep xrdp
sudo rebootsystemctl enable xrdp
firewall-cmd --permanent --add-port=3389/tcpfirewall-cmd --reload
passwd root
Source/CIDR Range: 0.0.0.0/0IP Protocol: TCPSource Port Range: AllDestination Port Range: 3389Allows: TCP traffic for ports: 3389
uname -a
yum install kernel-uek-devel-$(uname -r)
yum install VirtualBox-5.1

Conclusion

Nested virtualization allows you to run a virtual machine (VM) inside another VM while still using hardware acceleration from the host. In this article, I have done the nested virtualization on the Oracle Cloud Infrastructure (OCI).

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store