+ Post New Thread
Page 1 of 2 12 LastLast
Results 1 to 15 of 20
*nix Thread, virtual windows server on gentoo with no gui in Technical; How would I go about installing virtualbox or vmware so I can run a virtual Windows XP / Server2008 on ...
  1. #1

    RabbieBurns's Avatar
    Join Date
    Apr 2008
    Location
    Sydney
    Posts
    4,510
    Blog Entries
    6
    Thank Post
    930
    Thanked 402 Times in 257 Posts
    Rep Power
    141

    virtual windows server on gentoo with no gui

    How would I go about installing virtualbox or vmware so I can run a virtual Windows XP / Server2008 on a gentoo server which doesnt run X, and that I have only SSH/FTP access to.

    Is it possible??

  2. #2


    Join Date
    Feb 2007
    Location
    Northamptonshire
    Posts
    4,411
    Thank Post
    322
    Thanked 715 Times in 644 Posts
    Rep Power
    199
    Hi Robert,

    So you get a version of VBox from this century

    echo "app-emulation/virtualbox-bin" >> /etc/portage/package.keywords
    echo "app-emulation/virtualbox-modules" >> /etc/portage /package.keywords
    emerge virtualbox-bin
    Once that's installed, run the following commands to create the vm.

    VBoxManage createvm -name "Test" -register
    VBoxManage modifyvm "Test" -memory "256MB" -acpi on -boot1 dvd -nic1 nat
    VBoxManage createvdi -filename "Test.vdi" -size 1000 -register
    VBoxManage modifyvm "Test" -hda "Test.vdi"
    VBoxManage registerimage dvd /root/install-x86-minimal-20090623.iso
    VBoxManage modifyvm "Test" -dvd /root/install-x86-minimal-20090623.iso
    Run this to start the virtual machine

    VBoxHeadless -startvm "Test"
    It'll be listening on port 3389 for an RDP Client unless you change this port in the VBoxHeadless command above.

    I note you mention you only have SSH/SFTP access, I figure you could tunnel this over SSH or have a port opened or so but I've tested this out to run an installation of Gentoo internally in itself and it seems to work fine.

    Worth a go.

  3. Thanks to kmount from:

    RabbieBurns (2nd July 2009)

  4. #3

    RabbieBurns's Avatar
    Join Date
    Apr 2008
    Location
    Sydney
    Posts
    4,510
    Blog Entries
    6
    Thank Post
    930
    Thanked 402 Times in 257 Posts
    Rep Power
    141
    Thanks so much for that! Ive got openvpn setup now so am pretty much local now. Ill get right on trying this out.

    Thanks again for all that time and effort.

  5. #4


    Join Date
    Feb 2007
    Location
    Northamptonshire
    Posts
    4,411
    Thank Post
    322
    Thanked 715 Times in 644 Posts
    Rep Power
    199
    No problem, it was something I needed to do anyway so it served a dual purpose.

    Let me know how you get on

  6. #5

    RabbieBurns's Avatar
    Join Date
    Apr 2008
    Location
    Sydney
    Posts
    4,510
    Blog Entries
    6
    Thank Post
    930
    Thanked 402 Times in 257 Posts
    Rep Power
    141
    OK so for the interest of everyone else thats gonna be doing this ill paste a detailed account of the stages.

    Code:
    oasis ~ # emerge -av virtualbox-bin 
    
    These are the packages that would be merged, in order:
    
    Calculating dependencies... done!
    
    emerge: there are no ebuilds built with USE flags to satisfy "media-libs/libsdl[X]".
    !!! One of the following packages is required to complete your request:
    - media-libs/libsdl-1.2.13-r1 (Change USE: +X)
    (dependency required by "app-emulation/virtualbox-bin-2.2.4" [ebuild])
    (dependency required by "virtualbox-bin" [argument])
    So i figure I needed the libsdl package installed...

    Code:
    oasis ~ # emerge -av libsdl
    
    These are the packages that would be merged, in order:
    
    Calculating dependencies... done!
    [ebuild  N    ] media-libs/libsdl-1.2.13-r1  USE="alsa audio esd joystick oss video xv -X -aalib -arts -custom-cflags -dga -directfb -fbcon -ggi -libcaca -nas -opengl -pulseaudio (-svga) -xinerama" 3,295 kB
    
    Total: 1 package (1 new), Size of downloads: 3,295 kB
    Once thats installed, I try to emerge vbox again..

    Code:
    oasis ~ # emerge -av virtualbox-bin 
    
    These are the packages that would be merged, in order:
    
    Calculating dependencies... done!
    
    emerge: there are no ebuilds built with USE flags to satisfy "media-libs/libsdl[X]".
    !!! One of the following packages is required to complete your request:
    - media-libs/libsdl-1.2.13-r1 (Change USE: +X)
    (dependency required by "app-emulation/virtualbox-bin-2.2.4" [ebuild])
    (dependency required by "virtualbox-bin" [argument])
    Failed again, so I look closer and i see the Change USE: +X line..

    Am i right in thinking I need to change my make.conf to incluse USE +X and then remerge libsdl?

  7. #6

    RabbieBurns's Avatar
    Join Date
    Apr 2008
    Location
    Sydney
    Posts
    4,510
    Blog Entries
    6
    Thank Post
    930
    Thanked 402 Times in 257 Posts
    Rep Power
    141
    OK, so I changed /etc/make.conf to have USE=X rather than USE= -X

    Code:
    oasis ~ # emerge -av libsdl
    
    These are the packages that would be merged, in order:
    
    Calculating dependencies... done!
    [ebuild   R   ] media-libs/libsdl-1.2.13-r1  USE="X* alsa audio esd joystick oss video xv -aalib -arts -custom-cflags -dga -directfb -fbcon -ggi -libcaca -nas -opengl -pulseaudio (-svga) -xinerama" 0 kB
    
    Total: 1 package (1 reinstall), Size of downloads: 0 kB
    
    Would you like to merge these packages? [Yes/No]
    So I install that again... and then try to emerge virtual box:

    Code:
    oasis ~ # emerge -av virtualbox-bin 
    
    These are the packages that would be merged, in order:
    
    Calculating dependencies... done!
    [ebuild  N    ] media-libs/libmng-1.0.10  USE="-lcms" 1,068 kB
    [ebuild  N    ] app-emulation/virtualbox-modules-2.2.4  470 kB
    [ebuild  N    ] app-emulation/virtualbox-bin-2.2.4  USE="additions chm -headless -sdk -vboxwebsrv" 44,399 kB
    
    Total: 3 packages (3 new), Size of downloads: 45,937 kB
    
    Would you like to merge these packages? [Yes/No]
    So far So good...

  8. #7

    RabbieBurns's Avatar
    Join Date
    Apr 2008
    Location
    Sydney
    Posts
    4,510
    Blog Entries
    6
    Thank Post
    930
    Thanked 402 Times in 257 Posts
    Rep Power
    141
    Once thats done I scroll up to see if theres any important messages, and take note of them just in case..

    Code:
    * To launch VirtualBox just type: "VirtualBox"
     * 
     * You must be in the vboxusers group to use VirtualBox.
     * 
     * For advanced networking setups you should emerge:
     * net-misc/bridge-utils and sys-apps/usermode-utilities
    Code:
    * Starting with the 2.1 release a new kernel module was added,
     * be sure to load all the needed modules.
     * 
     * Please add "vboxdrv" and "vboxnetflt" to:
     * /etc/modules.autoload.d/kernel-2.6
    Onwards we go..

  9. #8

    RabbieBurns's Avatar
    Join Date
    Apr 2008
    Location
    Sydney
    Posts
    4,510
    Blog Entries
    6
    Thank Post
    930
    Thanked 402 Times in 257 Posts
    Rep Power
    141
    Code:
    oasis ~ # VBoxManage createvm -name "Test" -register 
    VirtualBox Command Line Management Interface Version 2.0.2
    (C) 2005-2008 Sun Microsystems, Inc.
    All rights reserved.
    
    Virtual machine 'Test' is created and registered.
    UUID: 34187ba8-7f1a-4db6-92f8-cf445f3259b9
    Settings file: '/root/.VirtualBox/Machines/Test/Test.xml'
    Code:
    oasis ~ # VBoxManage modifyvm "Test" -memory "256MB" -acpi on -boot1 dvd -nic1 nat
    VirtualBox Command Line Management Interface Version 2.0.2
    (C) 2005-2008 Sun Microsystems, Inc.
    All rights reserved.
    Code:
    oasis ~ # VBoxManage createvdi -filename "Test.vdi" -size 1000 -register
    VirtualBox Command Line Management Interface Version 2.0.2
    (C) 2005-2008 Sun Microsystems, Inc.
    All rights reserved.
    
    Disk image created. UUID: c130be56-b0f2-4c2a-829d-c37b92f5cde3
    Code:
    oasis ~ # VBoxManage modifyvm "Test" -hda "Test.vdi"
    VirtualBox Command Line Management Interface Version 2.0.2
    (C) 2005-2008 Sun Microsystems, Inc.
    All rights reserved.
    Code:
    oasis ~ # VBoxManage registerimage dvd /root/install-x86-minimal-20090623.iso
    VirtualBox Command Line Management Interface Version 2.0.2
    (C) 2005-2008 Sun Microsystems, Inc.
    All rights reserved.
    
    [!] FAILED calling virtualBox->OpenDVDImage(filepath, Guid(), dvdImage.asOutParam()) at line 6661!
    [!] Primary RC  = NS_ERROR_FAILURE (0x80004005) - Operation failed
    [!] Full error info present: true , basic error info present: true 
    [!] Result Code = NS_ERROR_FAILURE (0x80004005) - Operation failed
    [!] Text        = Could not open the CD/DVD image '/root/install-x86-minimal-20090623.iso' (VERR_FILE_NOT_FOUND)
    [!] Component   = DVDImage, Interface: IDVDImage, {140fff03-e479-4194-8562-abc4f8171009}
    [!] Callee      = IVirtualBox, {557a07bc-e6ae-4520-a361-4a8493199137}
    Well, I dont have that ISO in that location, so that was obvious it was going to fail... Ill try my Windows 2003 Server image Ive just made.

    Code:
    oasis ~ # wget http://192.168.2.4/win2003serv.iso
    --2009-07-02 18:08:16--  http://192.168.2.4/win2003serv.iso
    Connecting to 192.168.2.4:80... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 596588544 (569M) [application/x-iso9660-image]
    Saving to: `win2003serv.iso'
    
    100%[=============================================================================================================================>] 596,588,544 11.2M/s   in 51s     
    
    2009-07-02 18:09:07 (11.2 MB/s) - `win2003serv.iso' saved [596588544/596588544]
    Code:
    oasis ~ # VBoxManage registerimage dvd /root/win2003serv.iso 
    VirtualBox Command Line Management Interface Version 2.0.2
    (C) 2005-2008 Sun Microsystems, Inc.
    All rights reserved.
    Code:
    oasis ~ # VBoxManage modifyvm "Test" -dvd /root/win2003serv.iso                  
    VirtualBox Command Line Management Interface Version 2.0.2
    (C) 2005-2008 Sun Microsystems, Inc.
    All rights reserved.
    So far so good.. now to test if it runs...

  10. #9

    RabbieBurns's Avatar
    Join Date
    Apr 2008
    Location
    Sydney
    Posts
    4,510
    Blog Entries
    6
    Thank Post
    930
    Thanked 402 Times in 257 Posts
    Rep Power
    141
    Code:
    oasis ~ # VBoxHeadless -startvm "Test" 
    VirtualBox Headless Interface 2.0.2
    (C) 2008 Sun Microsystems, Inc.
    All rights reserved
    
    Listening on port 3389
    No errors. But I cant seem to get my ubuntu RDP to connect to it. Ill try in my XP VM.

    And here it is in all its glory. Windows XP Virtual Machine, running on an Ubuntu Host, connecting over VPN, to a Gentoo server, running a virtual Windows 2003 Server setup.

    NICE. Many thanks to kmount.


  11. #10


    Join Date
    Feb 2007
    Location
    Northamptonshire
    Posts
    4,411
    Thank Post
    322
    Thanked 715 Times in 644 Posts
    Rep Power
    199
    A pleasure Robert.

  12. #11

    RabbieBurns's Avatar
    Join Date
    Apr 2008
    Location
    Sydney
    Posts
    4,510
    Blog Entries
    6
    Thank Post
    930
    Thanked 402 Times in 257 Posts
    Rep Power
    141
    Is this worth turning into a wiki does anyone think? I might add that I used x64 gentoo, so it works for both.

  13. #12

    RabbieBurns's Avatar
    Join Date
    Apr 2008
    Location
    Sydney
    Posts
    4,510
    Blog Entries
    6
    Thank Post
    930
    Thanked 402 Times in 257 Posts
    Rep Power
    141
    couple of additional questions... im running the VBoxHeadless -startvm "Test" command in screen just now, so i can detatch from the terminal and leave it running.. is there any way to run it as a daemon, or even set it to run on startup? And also, Ive got 2003 serv up and running, sitting at the logon screen, how can i send a crtl-alt-del over rdp?

  14. #13


    Join Date
    Feb 2007
    Location
    Northamptonshire
    Posts
    4,411
    Thank Post
    322
    Thanked 715 Times in 644 Posts
    Rep Power
    199
    You can push it into the background by putting & after the command which should suffice.

    Quick script to check whether it's running and if not could be the following. (Written kind of from memory so would be worth testing!)

    VBoxManage -q list runningvms | grep "Test" || (VBoxHeadless -startvm "Test" &)

    Depending upon what rdp client you're using, you should be able to set up a hotkey to push CTRL/ALT/DEL across or try CTRL ALT INSERT first.

  15. Thanks to kmount from:

    RabbieBurns (4th July 2009)

  16. #14

    Ric_'s Avatar
    Join Date
    Jun 2005
    Location
    London
    Posts
    7,603
    Thank Post
    96
    Thanked 678 Times in 523 Posts
    Rep Power
    156
    @RabbieBurns: Di you try (Righthand)Ctrl+Del? This is the default shortcut to send Ctrl+Alt+Del in VirtualBox.

    Please do post on the wiki too... or ask EduTech or FN-GM REALLY nicely for a hand

  17. Thanks to Ric_ from:

    RabbieBurns (4th July 2009)

  18. #15

    RabbieBurns's Avatar
    Join Date
    Apr 2008
    Location
    Sydney
    Posts
    4,510
    Blog Entries
    6
    Thank Post
    930
    Thanked 402 Times in 257 Posts
    Rep Power
    141
    ctrl-alt-ins worked on xp remote desktop, but in ubuntu I cant get anything working.

    Do I need to install the virtualbox-toolbox thing as well for the client os so I can get proper resolution?

SHARE:
+ Post New Thread
Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 0
    Last Post: 5th May 2009, 02:45 PM
  2. Replies: 5
    Last Post: 11th December 2008, 04:34 PM
  3. GUI interface for Server Core
    By cookie_monster in forum Windows Server 2008
    Replies: 9
    Last Post: 8th April 2008, 09:23 AM
  4. Virtual Server 2005 R2 kills server network connection
    By ajbritton in forum Thin Client and Virtual Machines
    Replies: 0
    Last Post: 31st August 2006, 06:19 AM
  5. Gentoo issues
    By _Bob_ in forum *nix
    Replies: 1
    Last Post: 31st October 2005, 03:29 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •