Page 1 of 2

how to run a vm in terminal, RESOLVED -RESOLVED

Posted: 4. Dec 2007, 19:38
by ylan
Hi everybody!!
I'm a newbie with virtualbox
I tried to install from the site the last version of it, 1.5.2. I've succeeded to create a vm and also a vdi. I've mount ab iso file for the guest OS. Till ther allright.
Where I'm having problem is that I don't know how to run my vm to install the os on boot.
Here's details:

Code: Select all

root@ubuntu:/home/ylan# VBoxManage showvminfo ns1
VirtualBox Command Line Management Interface Version 1.5.2
(C) 2005-2007 innotek GmbH
All rights reserved.

Name:            ns1
Guest OS:        Linux 2.6
UUID:            25d8b52d-1b44-4c4e-84b5-88fc95dffbfd
Config file:     /home/virtualbox/machines/ns1/ns1.xml
Memory size:     256MB
VRAM size:       128MB
Boot menu mode:  message and menu
ACPI:            on
IOAPIC:          off
Time offset:     0 ms
Hardw. virt.ext: off
State:           powered off (since 2007-12-03T21:05:54.000000000)
Monitor count:   1
Floppy:          empty
Primary master:  /home/virtualbox/vdi/vdns1 (UUID: 1bd223e7-ad62-4d2e-d0b6-5e302b3adfad)
DVD:             /home/virtualbox/iso/Fedora-8-i386-DVD.iso (UUID: f783f20a-f67a-4d64-4bac-8a4b9126c332)
NIC 1:           MAC: 080027BE49EA, Attachment: Host Interface, Trace: off (file: <NULL>)
NIC 2:           disabled
NIC 3:           disabled
NIC 4:           disabled
UART 1:          disabled
UART 2:          disabled
Audio:           disabled (Driver: Unknown)
Clipboard Mode:  Bidirectional
VRDP:            disabled
Shared folders:  <none>
When I start it, I got:

Code: Select all

root@ubuntu:/home/naly# VBoxManage startvm ns1
VirtualBox Command Line Management Interface Version 1.5.2
(C) 2005-2007 innotek GmbH
All rights reserved.

Waiting for the remote session to open...
Is there anyone who can show me how to boot my vm.
I'm not using GUI so command is welcome.

Thanks

Posted: 5. Dec 2007, 11:45
by Ingo
First of all, the # on your command line indicates that you are logged in as root, isn't it? Are you coming from Windows?
Innotek strongly recommend VirtualBox not to run with root rights. That may cause problems. Please login as normal user before proceeding (it's also a security issue).

You have to boot an installation CD and install the OS onto the virtual disk. Enable passthrough.

Code: Select all

$ VBoxManage modifyvm -boot1 dvd -boot2 disk -boot3 none -boot4 none -dvdpassthrough on
I also recommend for the first step to setup the network to default NAT:

Code: Select all

$ VBoxManage modifyvm -nic1 nat

Virtualbox with shell

Posted: 5. Dec 2007, 13:24
by ylan
Hi Ingo, thanks for your answer

Yes I'm coming from windows that's why I don't wanna use GUI. I'd like to master shell command.
Yes, I use a root right ==>I'll change it
My boot order is already as you wrote
Well, I'm using a bridging on nic because I'thought to access my guest from another pc in the LAN
I'll add a nic2 as nat.

I'll share you the result in few hour

Posted: 5. Dec 2007, 23:33
by ylan
Hi Ingo, HI the all

I don't understand why should I set the nic into nat? It doesn't fit with my needs because I'm already behind a dhcp server and I don't wanna install a port forwarding.
Anyway, after visiting /etc I found a VirtualBox file. I read it and I understand that it's a script ......
when I execute it I had

Code: Select all

ylan@ubuntu:~$ sudo VirtualBox
Qt WARNING: VirtualBox: cannot connect to X server 
I've already configure xserver-xorg but nothing change. Any Ideas?

Re: Virtualbox with shell

Posted: 6. Dec 2007, 12:26
by Ingo
ylan wrote:I'd like to master shell command.
Nice, very good :-)) It also simplifies the communication here.
I don't understand why should I set the nic into nat?
My thinking was you not even have a running virtual machine. So first keep anything as simple as possible. NAT is very robust and works out of the box. Setting up a bridge is a little bit sophisticated and may cause you additional problems. After having a running VM you can setup the bridge, step by step.
Anyway, after visiting /etc I found a VirtualBox file.
I do not have any script named VirtualBox in /etc.
You tried to start sudo VirtualBox from within your home directory. That's ok but

1. it will not start any script in /etc this way. It will start executables on the path. Look with

Code: Select all

$ which VirtualBox
what executable will start.

2. you tried to start VirtualBox with root rights (sudo). That may cause the error message. Only

Code: Select all

$ VirtualBox
should start the GUI.

Posted: 6. Dec 2007, 23:58
by ylan
Hi everybody,
Here I am again
After the "which" command I got this:

Code: Select all

ylan@ubuntu:~$ which VirtualBox
/usr/bin/VirtualBox
Here's the details about my vm for now:

Code: Select all

ylan@ubuntu:~$ sudo VBoxManage showvminfo ns1
VirtualBox Command Line Management Interface Version 1.5.2
(C) 2005-2007 innotek GmbH
All rights reserved.

Name:            ns1
Guest OS:        Linux 2.6
UUID:            25d8b52d-1b44-4c4e-84b5-88fc95dffbfd
Config file:     /home/virtualbox/machines/ns1/ns1.xml
Memory size:     256MB
VRAM size:       128MB
Boot menu mode:  message and menu
ACPI:            on
IOAPIC:          off
Time offset:     0 ms
Hardw. virt.ext: off
State:           powered off (since 2007-12-03T21:05:54.000000000)
Monitor count:   1
Floppy:          empty
Primary master:  /home/virtualbox/vdi/vdns1 (UUID: 1bd223e7-ad62-4d2e-d0b6-5e302b3adfad)
DVD:             /home/virtualbox/iso/ubuntu-7.10-jeos-i386.iso (UUID: 737a55de-c2fc-49e9-1fa1-cd7d172d2b83)
NIC 1:           MAC: 080027BE49EA, Attachment: NAT, Trace: off (file: <NULL>)
NIC 2:           disabled
NIC 3:           disabled
NIC 4:           disabled
UART 1:          disabled
UART 2:          disabled
Audio:           disabled (Driver: Unknown)
Clipboard Mode:  Bidirectional
VRDP:            disabled
Shared folders:  <none>
And last thing is my ifconfig configuration

Code: Select all

ylan@ubuntu:~$ ifconfig
eth0      Link encap:Ethernet  HWaddr 00:11:D8:07:FD:52  
          inet addr:192.168.25.4  Bcast:192.168.25.255  Mask:255.255.255.0
          inet6 addr: fe80::211:d8ff:fe07:fd52/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:123 errors:0 dropped:0 overruns:0 frame:0
          TX packets:90 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:12631 (12.3 KB)  TX bytes:11436 (11.1 KB)
          Interrupt:17 Base address:0xa400 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
To be frank, from now on I don't klnow what to do. I've always got the Qt warning even with user right.
Waiting for your help...please

Re: how to run a vm in terminal

Posted: 7. Dec 2007, 10:21
by Ingo
ylan wrote:I'm not using GUI so command is welcome.
I've always got the Qt warning even with user right.
Do you mean you are sitting on a linux text console?
That doesn't work. For running VirtualBox you need a Graphical User Interface. There you should use a terminal window for the command line, e.g. a xterm or gnome terminal .

Posted: 7. Dec 2007, 11:10
by ylan
Hi Ingo, Hi everybody,

Yes I'm sitting on a linux console.
That doesn't work. For running VirtualBox you need a Graphical User Interface. There you should use a terminal window for the command line, e.g. a xterm or gnome terminal
But as you said if I'll use xterm or gnome terminal I'm becoming a windows-like user again, am not I?
Could you please give me explanation of GUI then, for me that means having start button on the top right of the desktop (windows), all is at click reach (lazy) and so on....

Posted: 7. Dec 2007, 11:41
by Ingo
The output of VirtualBox and the output of most virtual machines (Windows) IS graphical. So you MUST use a GUI (X-server) to show it. Simply maximize the xterm to the whole screen and you have the console like feeling.
You are on linux and there are of course possibilities to strip the GUI down to the minimal needs without any buttons and clicks or so with a lean window manager (not gnome or KDE). If you want this look here:
http://www.debian-administration.org/articles/432
But I think that isn't worth the trouble for this. And you get better assistance with a standard environment.
We should get a Virtual Machine running.

Posted: 7. Dec 2007, 14:51
by ylan
Hi, after installing gdm and doing startx
I got this

Code: Select all

ylan@ubuntu:~$ startx
xauth:  creating new authority file /home/ylan/.serverauth.4580

X Window System Version 1.3.0
Release Date: 19 April 2007
X Protocol Version 11, Revision 0, Release 1.3
Build Operating System: Linux Ubuntu (xorg-server 2:1.3.0.0.dfsg-12ubuntu8)
Current Operating System: Linux ubuntu 2.6.22-14-server #1 SMP Sun Oct 14 23:34:23 GMT 2007 i686
Build Date: 29 September 2007
        Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.
Module Loader present
Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Fri Dec  7 13:44:44 2007
(==) Using config file: "/etc/X11/xorg.conf"

(EE) VGA(0): Given depth (16) is not supported by this driver.
(EE) Screen(s) found, but none have a usable configuration.

Fatal server error:
no screens found
XIO:  fatal IO error 104 (Connection reset by peer) on X server ":0.0"
      after 0 requests (0 known processed) with 0 events remaining.
Couldnt get a file descriptor referring to the console
I made this after:

Code: Select all

ylan@ubuntu:~$ sudo dpkg-reconfigure xserver-xorg
xserver-xorg postinst warning: overwriting possibly-customised configuration
   file; backup in /etc/X11/xorg.conf.20071207134435
What's wrong, I don't understand
I think I'm having a driver problem. I didn't put the right driver for my video card, didn't I?
That will be a big stuff to work, will that?

I think I need a big help.
Now my vm is just waiting for a GUI problem. grrrrr

Posted: 9. Dec 2007, 11:31
by Ingo
Hi ylan,
for VirtualBox you need a stable running operating system.
I suggest to reinstall Ubuntu from scratch.

ubuntu from scratch

Posted: 10. Dec 2007, 16:37
by ylan
Hi Ingo,

Thanks for helping again.
You 've just shown me new thing today, the "from scratch" installation.

I was looking around about this version but I didn't find anything except LFS http://http://www.linuxfromscratch.org/. When I went onto Ubuntu official website. I didn't find the FS version anymore.

Is my OS not a stable version, I downloaded it from the ubuntu website and copy it on a CD.

Posted: 10. Dec 2007, 19:45
by Ingo
Ubuntu is stable but it is not running stable on your computer. If you start Ubuntu you should have a graphical user interface, that what you need for VirtualBox.

"From scratch" means from the beginning, means format your disk and install Ubuntu again.

Posted: 11. Dec 2007, 10:57
by ylan
Hi Ingo,

I think that's my problem. You know that when I install my ubuntu on my computer I don't have GUI. However I've downloaded it from ubuntu.com.
I took the Gutsy server version. Do I need to install at least one server (e.g. LAMP) to get a GUI?
Could you tell me where you took yours?

Posted: 11. Dec 2007, 12:30
by AliBaba
Sorry to tell you, but you quite didn't get the point:

Most of the distributions using the word "server" don't have X installed, nor set up, because for a working apache-, file-, whatever-sever you don't need any GUI.

You want a graphical user interface in a virtual machine. You will need an X server, which was already stated.

My suggestion, because you seem to be afraid to use an easy system:
Get Debian/unstable (sid) as netinstall from http://cdimage.debian.org/cdimage/daily ... etinst.iso

I'm using unstable for years now. It needs lots of administration, but is completely up-to-date and - in my case - completely stable.

After successfully installing Sid, you can get gnome, gdm, an X-server and finally your virtual machine running. The procedure has the advantage, that all those nice Ubuntu tools are not available and for a lot of tasks you will need to use the command line.