Page 1 of 1

[TIPP] Ohne GUI "mal eben" eine VirtualBox erstellen

Posted: 15. Oct 2010, 15:11
by Hobbystern
Hallo Gemeinde,

nachdem ich nun 2 Monate mit VB im produkten Status bin und der Anfang wie ein Sprung ins Eiswasser war, finde ich mich mittlerweile (ganz ohne GUI) sehr gut zurecht und bin zufrieden -- alle Probleme die ich hatte (ausnahmslos) waren beim Gast zu suchen, der Host läuft absolut reibungslos.

Das Forum gab mir viel - ich dachte ich gebe etwas zurück - "wie man 'mal eben' eine VirtualBox ohne GUI erstellt" - ohne große Erklärungen, sind sehr einfache Befehle :

Was wir tun, wir erstellen einen "einsamen XP" - mit wenig RAM (256MB) und nur dem notwendigsten um die DVD zu laden und WinXP zu installieren .. :

Pfade erstellen..(absolut so wie man es braucht, bei mir immer /freigabe)

Code: Select all

mkdir freigabe
cd freigabe
mkdir vm-server
cd vm-server
mkdir WindowsLONE
cd WindowsLONE
Die Maschine (die Steuerdatei erstellen und vorallem - sicherstellen wohin sie geht!)

Code: Select all

VBoxManage createvm --name WinLONE --ostype WindowsXP --register --basefolder /freigabe/vm-server/WindowsLONE/
Die kleinen - aber wichtigen Einstellungen an der VM vornehmen, ich habe keine Virtualisierungs-CPU, daher muss einiges raus

Code: Select all

VBoxManage modifyvm WinLONE --vram 16 --ioapic on --pae off --hpet on --hwvirtex off --nestedpaging off --vtxvpid off                  
VBoxManage modifyvm WinLONE --nictype1 Am79C970A --nicspeed1 1000000 --mouse usb --keyboard usb --vrdp on --vrdpport 3391 --vrdpvideochannelquality 50
VBoxManage modifyvm WinLONE --usb on --usbehci on --snapshotfolder /freigabe/vm-server/WindowsLONE
HDD erstellen

Code: Select all

VBoxManage createhd --filename /freigabe/vm-server/WindowsLONE/WinLONE-Boot.vdi --size 8000 --format VDI --variant Split2G
Controller erstellen (ich pflege mittlerweile nur noch SATA zu nehmen)

Code: Select all

VBoxManage storagectl WinLONE --name SATA --add sata --controller IntelAHCI --hostiocache on
Den IDE (DVD) Controller erstellen

Code: Select all

VBoxManage storagectl WinLONE --name IDE --add ide
Die Laufwerke anbinden (genauer gesagt - die Dateien als Laufwerke anbinden)

Code: Select all

VBoxManage storageattach WinLONE --storagectl SATA --port 0 --device 0 --type hdd --medium /freigabe/vm-server/WindowsLONE/WinLONE-Boot.vdi
USB ist AN - jedoch findet VB wiederkehrende Laufwerke nicht automatisch, dafür gibt es den USB Filter - dort gibt man, nachdem man sich das USB Device anzeigen lassen hat (VBoxManage list -l usbhost) die genauen Parameter des USB Devices an! Das ist IMHO schon ganz großes Kino! Im grunde auch seeeehr einfach.

Schmeissen wir die Kiste an!
VBoxHeadless -s WinLONE (oder mit "&disown" - wie man mag)

Fertig :)

Re: [TIPP] Ohne GUI "mal eben" eine VirtualBox erstellen

Posted: 15. Oct 2010, 15:23
by Katrin
Ja das ist aber nichts neues, dass man die Oracle VM VirtualBox per Console und somit auch per Script kommandieren kann. Das kann als Serverlösung für Remotedesktopzugriffe sehr sinnvoll sein.

Re: [TIPP] Ohne GUI "mal eben" eine VirtualBox erstellen

Posted: 3. Jan 2011, 00:01
by Operaiter
Hallo,

wenn ich die VM nun wie bei dir beschrieben habe gestartet habe, wie kann ich dann das OS installieren?

Code: Select all

server:# vboxheadless -s TestWin
Oracle VM VirtualBox Headless Interface 4.0.0
(C) 2008-2010 Oracle Corporation
All rights reserved.

Würdem ich sehr über Hilfe freuen! :]

Re: [TIPP] Ohne GUI "mal eben" eine VirtualBox erstellen

Posted: 3. Jan 2011, 08:09
by Hobbystern
Benutze als Beispiel unter einem Windows PC die Remotedesktopverbindung -

also zBsp.

STart -> Zubehör -> Remotedesktopv.

<IP>:<Port für Zugriff>

also zBsp.

192.168.192.10:3390

Viel Erfolg!

Re: [TIPP] Ohne GUI "mal eben" eine VirtualBox erstellen

Posted: 19. Jul 2011, 14:50
by dagnom
Hallo,

also ich hab die virtualbox soweit installiert wie oben beschrieben. Windows 7 Image heruntergeladen in die Virtualbox. Die VM starte auch. Bloss ich komme nicht per Remotedesktopverbindung zur Intallation von Windows. Es kommt eine Fehlermeldung das 1)Der Remotezugriff auf dem Server aktive ist oder 2) Der Remotecomputer ausgeschalten ist oder 3)Der Remotecomputer ist nicht im netzwerk verfügbar also die standartfehlermeldung von windows denk ich. Muss man da was zusätzlich auf dem Debianserver Installieren? Oder könnt ihr mir sagen wo ich nachschauen soll bzw. was ihr wissen müsst damit ich das Problem beheben kann.

Ich bin noch relativ neu im Linux bereich also bitte keine dummen sprüchen. Danke schonmal an jeden der mir Hilft :)

Grüßle
Dagnom

Re: [TIPP] Ohne GUI "mal eben" eine VirtualBox erstellen

Posted: 20. Jul 2011, 16:33
by dagnom
hat keiner eine idee vrde ist an und port und ip adresse ist gesetzt ich komm aber einfach net mit remot desktop drauf um windows zu installieren. Ich hab eine debian 6 server mit vb 4.

Re: [TIPP] Ohne GUI "mal eben" eine VirtualBox erstellen

Posted: 20. Jul 2011, 17:45
by fixedwheel
dagnom wrote:debian 6 server mit vb 4.
als oben die Anleitung geschrieben wurde war VBox 3.<irgendwas> aktuell, seitdem hat sich etwas geändert: mit Version 4 wurden die "closed-source" Features in ein ExtensionPack ausgelagert und das Virtualbox Paket enthält nur noch den GPL Code. Du brauchst also zusätzlich das ExtensionPack für das VRDP-Feature => http://www.virtualbox.org/wiki/Downloads

Re: [TIPP] Ohne GUI "mal eben" eine VirtualBox erstellen

Posted: 20. Jul 2011, 18:54
by dagnom
Das ist schon installiert ^^

Code: Select all

root@debian:~# VBoxManage extpack install /home/dagnom/Oracle_VM_VirtualBox_Extension_Pack-4.0.12-72916.vbox-extpack
0%...
Progress state: NS_ERROR_FAILURE
VBoxManage: error: Failed to install "/home/dagnom/Oracle_VM_VirtualBox_Extension_Pack-4.0.12-72916.vbox-extpack": Extension pack 'Oracle VM VirtualBox Extension Pack' is already installed. In case of a reinstallation, please uninstall it first
aber danke für die hilfe

Re: [TIPP] Ohne GUI "mal eben" eine VirtualBox erstellen

Posted: 20. Jul 2011, 19:14
by fixedwheel
dagnom wrote:Das ist schon installiert ^^
ok

wenn Du das Beispiel oben
Hobbystern wrote:

Code: Select all

VBoxManage modifyvm WinLONE --nictype1 Am79C970A --nicspeed1 1000000 --mouse usb --keyboard usb --vrdp on --vrdpport 3391 --vrdpvideochannelquality 50
benutzt hast: der Standard RDP Port ist 3389 ... und wenn du das in deinem Remotedesktop-Client Programm nicht anpasst bekommst Du keine Verbindung ;)

Du musst mit "--vrdpport 3391" auch nur dann auf den nicht-standard Port ausweichen wenn auf dem echten Server auch ein RDP-Service läuft, oder wenn mehrere virtuelle Maschinen so bedient werden sollen (jeder bekommt einen eigenen)

Re: [TIPP] Ohne GUI "mal eben" eine VirtualBox erstellen

Posted: 20. Jul 2011, 19:27
by dagnom
port und ip ist auch eingerichtet hier mal die info:

Code: Select all

Name:            Win7
Guest OS:        Windows 7
UUID:            b9c749d6-c166-4cc6-86c4-acad7fe1a040
Config file:     /home/vmuser/VirtualBox VMs/Win7/Win7.vbox
Snapshot folder: /home/vmuser/VirtualBox VMs/Win7/Snapshots
Log folder:      /home/vmuser/VirtualBox VMs/Win7/Logs
Hardware UUID:   b9c749d6-c166-4cc6-86c4-acad7fe1a040
Memory size:     1024MB
Page Fusion:     off
VRAM size:       16MB
HPET:            on
Chipset:         piix3
Firmware:        BIOS
Number of CPUs:  1
Synthetic Cpu:   off
CPUID overrides: None
Boot menu mode:  message and menu
Boot Device (1): DVD
Boot Device (2): DVD
Boot Device (3): HardDisk
Boot Device (4): Not Assigned
ACPI:            on
IOAPIC:          on
PAE:             off
Time offset:     0 ms
RTC:             local time
Hardw. virt.ext: off
Hardw. virt.ext exclusive: on
Nested Paging:   off
Large Pages:     off
VT-x VPID:       off
State:           running (since 2011-07-20T15:52:07.419000000)
Monitor count:   1
3D Acceleration: off
2D Video Acceleration: off
Teleporter Enabled: off
Teleporter Port: 0
Teleporter Address:
Teleporter Password:
Storage Controller Name (0):            IDE Controller
Storage Controller Type (0):            PIIX4
Storage Controller Instance Number (0): 0
Storage Controller Max Port Count (0):  2
Storage Controller Port Count (0):      2
Storage Controller Bootable (0):        on
IDE Controller (0, 0): /home/vmuser/Win7.vdi (UUID: 16feb9f7-2b87-474d-8851-ba19942af2d2)
IDE Controller (1, 1): /home/vmuser/X15-65740.iso (UUID: 36902bc1-0dbd-4321-bdad-92b4e379e6bb)
NIC 1:           MAC: 080027C63289, Attachment: NAT, Cable connected: on, Trace: off (file: none), Type: Am79C970A, Reported speed: 1000 Mbps, Boot priority: 0
NIC 1 Settings:  MTU: 0, Socket( send: 64, receive: 64), TCP Window( send:64, receive: 64)
NIC 2:           disabled
NIC 3:           disabled
NIC 4:           disabled
NIC 5:           disabled
NIC 6:           disabled
NIC 7:           disabled
NIC 8:           disabled
Pointing Device: USB Mouse
Keyboard Device: USB Keyboard
UART 1:          disabled
UART 2:          disabled
Audio:           disabled
Clipboard Mode:  Bidirectional
Video mode:      800x600x32
VRDE:            enabled (Address 192.168.112.23, Ports 3391, MultiConn: off, ReuseSingleConn: off, Authentication type: null)
Video redirection: disabled
USB:             disabled

USB Device Filters:

<none>

Available remote USB devices:

<none>

Currently Attached USB Devices:

<none>

Shared folders:  <none>

VRDE Connection:    not active
Clients so far:     0

Guest:

OS type:                             Windows7
Additions run level:                 0
Configured memory balloon size:      0 MB
ich verzweifel sollangsam daran hab jetzt schon es halbe internet abgesucht....

Re: [TIPP] Ohne GUI "mal eben" eine VirtualBox erstellen

Posted: 20. Jul 2011, 19:47
by fixedwheel
dagnom wrote:

Code: Select all

VRDE:            enabled (Address 192.168.112.23, Ports 3391, MultiConn: off, ReuseSingleConn: off, Authentication type: null)
ja, Du benutzt nicht den Standard-Port 3389, also musst Du dein "Remotedesktopverbindung" oder wasauchimmer auf den nicht-standard 3391 umstellen

Re: [TIPP] Ohne GUI "mal eben" eine VirtualBox erstellen

Posted: 20. Jul 2011, 21:25
by dagnom
ja ich nutze windows Remotedesktopverbindung zum verbinden, da mit 192.168.112:3391

edit:
Ich habs jetzt auch mal unter 3389 Port probiert. Geht auch nicht.

Re: [TIPP] Ohne GUI "mal eben" eine VirtualBox erstellen

Posted: 21. Jul 2011, 08:18
by dagnom
JUHU es geht ich hab den server jetzt nochmal komplett neu aufgesetzt und es klappt ich hab keine ahnung woran es lag ...
Aber trozdem danke für deine mühen :)