Sometimes there is a need to start a virtual machine on a host without X. I will talk about how to do this, having access to the host system only via ssh + rdp (Remote Desktop Protocol). I will describe the process for OC Ubuntu 9.10 as a host. sudo apt-get install dkmsdeb download.virtualbox.org/virtualbox/debian karmic non-free deb download.virtualbox.org/virtualbox/debian karmic non-free ) in /etc/apt/sources.list or download and install the deb package. When I registered the source and did sudo apt-get install virtualbox-3.1 , I pulled a bunch of dependency packages (including some for the GUI interface). Therefore, it is better to download the deb package. Download, install:sudo dpkg -i virtualbox-3.1_3.1.0-55467_Ubuntu_karmic_i386.debsudo apt-get -f installVBoxManage createvm --name ubuntu --ostype Ubuntu --registerVBoxManage list ostypes )VBoxManage modifyvm ubuntu --memory 512 --floppy disabled --audio none --nic1 bridged --bridgeadapter1 eth0 --vram 4 --accelerate3d off --boot1 disk --acpi on --cableconnected1 on --usb off --vrdp on --vrdpport 3390--nic1 nat ). also include rdpVBoxManage createhd --filename /home/user/vbox/ubuntu.vdi --size 20000 --registerVBoxManage storagectl ubuntu --name "IDE Controller" --add ideVBoxManage storageattach ubuntu --storagectl "IDE Controller" --port 0 --device 0 --type hdd --medium /home/user/vbox/ubuntu.vdiVBoxManage storageattach ubuntu --storagectl "IDE Controller" --port 1 --device 0 --type dvddrive --medium /home/user/vbox/iso/ubuntu-9.10-alternate-i386.isoVBoxManage modifyvm ubuntu --boot1 dvdnohup VBoxHeadless --startvm ubuntu &--vrdpport 3390 ), set the system, do sudo apt-get install openssh-server . now you can access the virtual machine via sshVBoxManage controlvm ubuntu acpipowerbuttonVBoxManage controlvm ubuntu poweroffVBoxManage modifyvm ubuntu --boot1 diskVBoxManage storageattach ubuntu --storagectl "IDE Controller" --port 1 --device 0 --medium nonenohup VBoxHeadless --startvm ubuntu &VBoxManage list runningvmsVBoxManage showvminfo ubuntuSource: https://habr.com/ru/post/77834/
All Articles