[Solved] VirtualBox and Privileges

Discussions related to using VirtualBox on Linux hosts.
Post Reply
weworika
Posts: 13
Joined: 11. May 2009, 23:52
Primary OS: Ubuntu other
VBox Version: OSE Debian
Guest OSses: ?

[Solved] VirtualBox and Privileges

Post by weworika »

Hello,
i have a running VB with XP under Ubuntu 9.04.

I added the group permissions, but can only access the VB XP from terminal with sudo.

What did i wrong or how can i access the VB XP from just user account?

Thanks
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: VirtualBox and Privileges

Post by Perryg »

Have you tried adding the user to the vboxusers account?
weworika
Posts: 13
Joined: 11. May 2009, 23:52
Primary OS: Ubuntu other
VBox Version: OSE Debian
Guest OSses: ?

Re: VirtualBox and Privileges

Post by weworika »

I added the default ubuntu user to the virtualbox group, but installed the VB XP with sudo.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: VirtualBox and Privileges

Post by Perryg »

weworika wrote:I added the default ubuntu user to the virtualbox group, but installed the VB XP with sudo.
Should not matter as long as the default user is in the vboxusers group.
Did you log out of the (host) and back in after you added the default user to the vboxusers group?
weworika
Posts: 13
Joined: 11. May 2009, 23:52
Primary OS: Ubuntu other
VBox Version: OSE Debian
Guest OSses: ?

Re: VirtualBox and Privileges

Post by weworika »

Yes, i restarted too but now when i use the link from the Application menu i get just the default VirtualBox GUI without the already installed Client with XP.

But maybe this is because i first installed the deb file and than installed from terminal and used this variant?
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: VirtualBox and Privileges

Post by Perryg »

Sounds like you forgot to register the guest install.
Read up on VBoxManage reference Chapter 8 of the VBox Users Manual.
weworika
Posts: 13
Joined: 11. May 2009, 23:52
Primary OS: Ubuntu other
VBox Version: OSE Debian
Guest OSses: ?

Re: VirtualBox and Privileges

Post by weworika »

Thanks,
ok on page 98 i find this:
VBoxManage registervm <filename>
and this
ostypes lists all guest operating systems presently known to VirtualBox, along
with the identifiers used to refer to them with the modifyvm command.

The registervm command allows you to import a virtual machine definition in an
XML file into VirtualBox. There are some restrictions here: the machine must not
conflict with one already registered in VirtualBox and it may not have any hard or
removable disks attached. It is advisable to place the definition file in the machines
folder before registering it.
Note: When creating a new virtual machine with VBoxManage createvm
(see below), you can directly specify the --register option to avoid having
to register it separately.
and
To register the VM instantly, use the optional
--register option, or run VBoxManage registervm separately afterwards.
So i tried

Code: Select all

VBoxManage registervm windows.vdi
i recive a File not found, because my *.vdi file is on a diffrent partition than /home/USERNAME/.VirtualBox/

Code: Select all

sudo VBoxManage registervm /media/disk-1/windows.vdi
i get

Code: Select all

VirtualBox Command Line Management Interface Version 2.1.4_OSE
(C) 2005-2009 Sun Microsystems, Inc.
All rights reserved.

[!] FAILED calling a->virtualBox->OpenMachine(Bstr(a->argv[0]), machine.asOutParam()) at line 762!
[!] Primary RC  = VBOX_E_XML_ERROR (0x80BB000A) - Invalid XML found
[!] Full error info present: true , basic error info present: true 
[!] Result Code = VBOX_E_XML_ERROR (0x80BB000A) - Invalid XML found
[!] Text        = Could not load the settings file '/media/disk-1/windows.vdi'.
Extra content at the end of the document.
Location: '/media/disk-1/windows.vdi', line 1 (0), column 2
[!] Component   = VirtualBox, Interface: IVirtualBox, {339abca2-f47a-4302-87f5-7bc324e6bbde}
[!] Callee      = IVirtualBox, {339abca2-f47a-4302-87f5-7bc324e6bbde}
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: VirtualBox and Privileges

Post by Perryg »

OK then try this:
Open the VBox program and create a new VM. Then attach the VDI file to the newly created machine. Keep in mind that you will need to play with the settings to get it to work unless you know before hand what they are.
weworika
Posts: 13
Joined: 11. May 2009, 23:52
Primary OS: Ubuntu other
VBox Version: OSE Debian
Guest OSses: ?

Re: VirtualBox and Privileges

Post by weworika »

When i try to create a new VDI Image i get a Access Denied, because i have not run VB from terminal with sudo. I used the menu application link.

Is it a problem if i run the VB as sudo?
weworika
Posts: 13
Joined: 11. May 2009, 23:52
Primary OS: Ubuntu other
VBox Version: OSE Debian
Guest OSses: ?

Re: VirtualBox and Privileges

Post by weworika »

Fixed it with using same partition.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: VirtualBox and Privileges

Post by Perryg »

Thank you. I will mark this solved.
Post Reply