View Issue Details

IDProjectCategoryView StatusLast Update
0006415Linux server softwareDebianpublic2023-08-28 14:41
ReporterDigitalMy 
PrioritynormalSeverityminorReproducibilityhave not tried
Status assignedResolutionopen 
Summary0006415: Convert Windows server into virtual machine in Debian
DescriptionUse Oracle VirtualBox software
TagsNo tags attached.

Activities

DigitalMy

2023-08-25 05:44

administrator   ~0011218

Install VM

apt -y install curl wget gnupg2 lsb-release
curl -fsSL https://www.virtualbox.org/download/oracle_vbox_2016.asc|sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/oracle_vbox_2016.gpg
curl -fsSL https://www.virtualbox.org/download/oracle_vbox.asc|sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/oracle_vbox.gpg
echo "deb [arch=amd64] http://download.virtualbox.org/virtualbox/debian $(lsb_release -cs) contrib" | sudo tee /etc/apt/sources.list.d/virtualbox.list
sudo apt update
sudo apt install linux-headers-$(uname -r) dkms
sudo apt install virtualbox-7.0

DigitalMy

2023-08-28 02:43

administrator   ~0011222

Last edited: 2023-08-28 14:41

View 5 revisions

Simply used SI tool to create VHD on source system. Moved this virtual disk to host with VM.

Add file /etc/vbox/autostart.cfg:
default_policy=allow
startup_delay=30
root={
allow=true
startup_delay=30
}
In this file remove all white spaces. End of file is new line.

Add file /etc/default/virtualbox:
VBOXAUTOSTART_DB=/etc/vbox
VBOXAUTOSTART_CONFIG=/etc/vbox/autostart.cfg

Get GUID of VM:
VBoxManage list vms
Add VM to autostart:
VBoxManage modifyvm 0a084a52-b91c-4e05-97ba-9a80dbf04971 --autostart-enabled on --autostart-delay 30
VBoxManage modifyvm 0a084a52-b91c-4e05-97ba-9a80dbf04971 --autostop-type acpishutdown

sudo chgrp vboxusers /etc/vbox
sudo chmod 1775 /etc/vbox
chmod +x /etc/default/virtualbox
VBoxManage setproperty autostartdbpath /etc/vbox
sudo update-rc.d vboxautostart-service.sh defaults 24 24
systemctl daemon-reload

Check and edit path to /etc/vbox/autostart.cfg in /usr/lib/virtualbox/vboxautostart-service.sh

test:
sudo service vboxautostart-service restart
systemctl status vboxautostart-service.service

DigitalMy

2023-08-28 13:59

administrator   ~0011223

Manual start of one VM in background:
VBoxHeadless --startvm 0a084a52-b91c-4e05-97ba-9a80dbf04971