Erstellen einer VirtualBox-VM: Unterschied zwischen den Versionen

Aus Xinux Wiki
Zur Navigation springen Zur Suche springen
 
(8 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt)
Zeile 1: Zeile 1:
 +
=Variblen setzen=
 +
*GUEST=debian1
 +
*ORIGINAL=debian
 +
 
=Grundkonfiguration erstellen=
 
=Grundkonfiguration erstellen=
*VBoxManage createvm --name u20 --ostype Ubuntu_20  --register
+
*VBoxManage createvm --name $GUEST --ostype Ubuntu_20  --register
 
=Speicher und Netzwerk konfigurieren=
 
=Speicher und Netzwerk konfigurieren=
*VBoxManage modifyvm u20 --ioapic on                    
+
*VBoxManage modifyvm $GUEST --ioapic on
*VBoxManage modifyvm u20 --memory 2048 --vram 128      
+
*VBoxManage modifyvm $GUEST --memory 2048 --vram 128
*VBoxManage modifyvm u20 --nic1 nat
+
*VBoxManage modifyvm $GUEST --nic1 nat
 
=SATA Controller erstellen=
 
=SATA Controller erstellen=
*VBoxManage storhttps://xinux.net/index.php/Hauptseiteagectl u20 --name "SATA Controller" --add sata --controller IntelAhci  
+
*VBoxManage storagectl $GUEST --name "SATA Controller" --add sata --controller IntelAhci
 +
 
 
=Harddisk anbringen=
 
=Harddisk anbringen=
*cp ubuntu.vdi  ~/"VirtualBox VMs/u20/u20.vdi"     
+
*cd ~/"VirtualBox VMs/"
*VBoxManage storageattach u20 --storagectl "SATA Controller" --port 0 --device 0 --type hdd --medium ~/"VirtualBox VMs/u20/u20.vdi"                 
+
*VBoxManage clonemedium disk $ORIGINAL/$ORIGINAL.vdi $GUEST/$GUEST.vdi
 +
*VBoxManage storageattach $GUEST --storagectl "SATA Controller" --port 0 --device 0 --type hdd --medium $GUEST/$GUEST.vdi
 +
 
 
=Boot Einstellungen=
 
=Boot Einstellungen=
*VBoxManage modifyvm u20 --boot1 disk1 --boot2 none --boot3 none --boot4 none
+
*VBoxManage modifyvm $GUEST --boot1 disk --boot2 none --boot3 none --boot4 none
  
=BlaBla=
+
=RDP Server anschalten=
*VBoxManage modifyvm [MACHINE NAME] --vrde on                
+
*VBoxManage modifyvm $GUEST --vrde on
*VBoxManage modifyvm [MACHINE NAME] --vrdemulticon on --vrdeport 10001
+
*VBoxManage modifyvm $GUEST --vrdemulticon on --vrdeport 10001
*VBoxHeadless --startvm [MACHINE NAME]
+
=Maschine starten=
 +
*VBoxHeadless --startvm $GUEST

Aktuelle Version vom 29. März 2022, 07:21 Uhr

Variblen setzen

  • GUEST=debian1
  • ORIGINAL=debian

Grundkonfiguration erstellen

  • VBoxManage createvm --name $GUEST --ostype Ubuntu_20 --register

Speicher und Netzwerk konfigurieren

  • VBoxManage modifyvm $GUEST --ioapic on
  • VBoxManage modifyvm $GUEST --memory 2048 --vram 128
  • VBoxManage modifyvm $GUEST --nic1 nat

SATA Controller erstellen

  • VBoxManage storagectl $GUEST --name "SATA Controller" --add sata --controller IntelAhci

Harddisk anbringen

  • cd ~/"VirtualBox VMs/"
  • VBoxManage clonemedium disk $ORIGINAL/$ORIGINAL.vdi $GUEST/$GUEST.vdi
  • VBoxManage storageattach $GUEST --storagectl "SATA Controller" --port 0 --device 0 --type hdd --medium $GUEST/$GUEST.vdi

Boot Einstellungen

  • VBoxManage modifyvm $GUEST --boot1 disk --boot2 none --boot3 none --boot4 none

RDP Server anschalten

  • VBoxManage modifyvm $GUEST --vrde on
  • VBoxManage modifyvm $GUEST --vrdemulticon on --vrdeport 10001

Maschine starten

  • VBoxHeadless --startvm $GUEST