Compartilhar Pasta Virtual e Real Virtualbox  [Resolvido]

Para aqueles que estão iniciando no mundo GNU/Linux, sobretudo no Manjaro Linux.
Regras do fórum Leia as Regras Gerais do Manjaro Brasil em "Normatividade" e pesquise antes de postar.
Se sua dúvida foi respondida, não esqueça de marcar RESOLVIDO em seus tópicos, botão com a marca verde Imagem

Compartilhar Pasta Virtual e Real Virtualbox  [Resolvido]

Mensagempor Davidson0 » 20 Nov 2016, 19:22  •  MS 1

Boa tarde!!

Eu gostaria de saber como compartilhar uma pasta entre o PC e a pasta de uma máquina virtual usando o Windows 7?

No caso usarei a Virtualbox mais recente e o Manjaro JWM. Infelizmente eu farei um curso de Excel 2010 e terei de instalar o Windows 7 :| :| :| :| :| :| :| :|

Eu não tenho pc potente para ter o Windows em uma máquina virtual.

No caso eu até configuro a máquina para compartilhar a pasta. Mas eu não a encontro quando acesso o pcmanfm para encontrar pastas. No caso estou usando só o Manjaro KDE 16.10, mas nas experiencias anteriores não consegui achar a tal pasta compartilhada. Por isso antes de formatar o PC e migrar eu queria achar uma solução para esse problema, já que tem uns softwares via linha de comando que são muito show no Manjaro!

Desde já agradeço pela atenção.
Imagem
Avatar do usuário
Davidson0
Membro

 
Mensagens: 113
Artigos: 1
Registro: 15 Set 2015, 20:09
Localização: Vespasiano
Agradeceu: 46 vez(es)
Agradecido: 15 vez(es)
Distro utilizada: Manjaro
Versão: Architect 2019
Ambiente: Gnome Vanilla
Repositório: Stable
Habilidade: Franguinho

Compartilhar Pasta Virtual e Real Virtualbox

Mensagempor Jean Michel Kowalski » 21 Nov 2016, 07:08  •  MS 2

Tem que ter instalado o virtual box guest no sistema que estiver na virtual box. Creio que no Manjaro já tenha esse pacote instalado por padrão. A pasta costuma aparecer nos locais de rede. Já consegui usar com Windows estando na VM e o Manjaro como host, o contrário nunca tentei.
abraço
"I see you on the dark side of the moon..." :roll:

Linux Counter #606350

Imagem
Avatar do usuário
Jean Michel Kowalski
Moderador

 
Mensagens: 717
Registro: 19 Mai 2016, 08:57
Agradeceu: 18 vez(es)
Agradecido: 117 vez(es)
Distro utilizada: Manjaro
Versão: 17.1
Ambiente: KDE
Repositório: Stable
Habilidade: Novice

Compartilhar Pasta Virtual e Real Virtualbox

Mensagempor chmercesmoreira » 22 Nov 2016, 07:00  •  MS 3

É isso mesmo que o Jean falou, segundo a wiki do Ubuntu: https://help.ubuntu.com/community/Virtu ... redFolders
Required: Virtualbox Guest Additions

Before sharing folders, you must install Guest Additions.


Veja qual é a versão do Kernel Linux instalado no seu sistema e instale a versão dos adicionais de convidado correspondente a ela:
Código: Selecionar todos
$ pacman -Ss virtualbox | grep -i guest
extra/linux310-virtualbox-guest-modules 5.1.8-1 (linux310-extramodules)
    Guest kernel modules for VirtualBox
extra/linux312-virtualbox-guest-modules 5.1.8-3 (linux312-extramodules)
    Guest kernel modules for VirtualBox
extra/linux316-virtualbox-guest-modules 5.1.8-1 (linux316-extramodules)
    Guest kernel modules for VirtualBox
extra/linux318-virtualbox-guest-modules 5.1.8-1 (linux318-extramodules)
    Guest kernel modules for VirtualBox
extra/linux41-virtualbox-guest-modules 5.1.8-1 (linux41-extramodules)
    Guest kernel modules for VirtualBox
extra/linux44-virtualbox-guest-modules 5.1.8-5 (linux44-extramodules)
    Guest kernel modules for VirtualBox
extra/linux47-virtualbox-guest-modules 5.1.8-1 (linux47-extramodules)
    Guest kernel modules for VirtualBox
extra/linux48-virtualbox-guest-modules 5.1.8-6 (linux48-extramodules)
    Guest kernel modules for VirtualBox


Na wiki do Arch existe uma série de procedimentos que você precisa adotar para conseguir ativar a pasta compartilhada: https://wiki.archlinux.org/index.html/Vi ... ed_folders
Código: Selecionar todos
Enable shared folders

Shared folders are managed on the host, in the settings of the Virtual Machine accessible via the GUI of VirtualBox, in the Shared Folders tab. There, Folder Path, the name of the mount point identified by Folder name, and options like Read-only, Auto-mount and Make permanent can be specified. These parameters can be defined with the VBoxManage command line utility. See there for more details.

No matter which method you will use to mount your folder, all methods require some steps first.

To avoid this issue /sbin/mount.vboxsf: mounting failed with the error: No such device, make sure the vboxsf kernel module is properly loaded. It should be, since we enabled all guest kernel modules previously.

Two additional steps are needed in order for the mount point to be accessible from users other than root:

    the virtualbox-guest-utils package created a group vboxsf (done in a previous step);
    your username must be in vboxsf group.

Manual mounting

Use the following command to mount your folder in your Arch Linux guest:

# mount -t vboxsf shared_folder_name mount_point_on_guest_system

The vboxsf filesystem offers other options which can be displayed with this command:

# mount.vboxsf

For example if the user was not in the vboxsf group, we could have used this command to give access our mountpoint to him:

# mount -t vboxsf -o uid=1000,gid=1000 home /mnt/

Where uid and gid are values corresponding to the users we want to give access to. These values are obtained from the id command run against this user.
Automounting
Note: Automounting requires the vboxservice to be enabled/started.

In order for the automounting feature to work you must have checked the auto-mount checkbox in the GUI or used the optional --automount argument with the command VBoxManage sharedfolder.

The shared folder should now appear in /media/sf_shared_folder_name. If users in media cannot access the shared folders, check that media has permissions 755 or has group ownership vboxsf if using permission 750. This is currently not the default if media is created by installing the virtualbox-guest-utils.

You can use symlinks if you want to have a more convenient access and avoid to browse in that directory, e.g.:

$ ln -s /media/sf_shared_folder_name ~/my_documents


Eu nunca tentei esse procedimento, mas se você tiver problemas eu posso tenta reproduzir aqui na minha máquina e ver se te ajudo.
Imagem Imagem
chmercesmoreira
Especial

 
Mensagens: 751
Artigos: 1
Registro: 31 Jan 2016, 10:58
Agradeceu: 15 vez(es)
Agradecido: 223 vez(es)
Distro utilizada: Manjaro
Versão: 2018
Ambiente: KDE
Repositório: Stable
Habilidade: Intermediate

Compartilhar Pasta Virtual e Real Virtualbox

Mensagempor Davidson0 » 25 Nov 2016, 01:08  •  MS 4

chmercesmoreira escreveu:É isso mesmo que o Jean falou, segundo a wiki do Ubuntu: https://help.ubuntu.com/community/Virtu ... redFolders
Required: Virtualbox Guest Additions

Before sharing folders, you must install Guest Additions.


Veja qual é a versão do Kernel Linux instalado no seu sistema e instale a versão dos adicionais de convidado correspondente a ela:
Código: Selecionar todos
$ pacman -Ss virtualbox | grep -i guest
extra/linux310-virtualbox-guest-modules 5.1.8-1 (linux310-extramodules)
    Guest kernel modules for VirtualBox
extra/linux312-virtualbox-guest-modules 5.1.8-3 (linux312-extramodules)
    Guest kernel modules for VirtualBox
extra/linux316-virtualbox-guest-modules 5.1.8-1 (linux316-extramodules)
    Guest kernel modules for VirtualBox
extra/linux318-virtualbox-guest-modules 5.1.8-1 (linux318-extramodules)
    Guest kernel modules for VirtualBox
extra/linux41-virtualbox-guest-modules 5.1.8-1 (linux41-extramodules)
    Guest kernel modules for VirtualBox
extra/linux44-virtualbox-guest-modules 5.1.8-5 (linux44-extramodules)
    Guest kernel modules for VirtualBox
extra/linux47-virtualbox-guest-modules 5.1.8-1 (linux47-extramodules)
    Guest kernel modules for VirtualBox
extra/linux48-virtualbox-guest-modules 5.1.8-6 (linux48-extramodules)
    Guest kernel modules for VirtualBox


Na wiki do Arch existe uma série de procedimentos que você precisa adotar para conseguir ativar a pasta compartilhada: https://wiki.archlinux.org/index.html/Vi ... ed_folders
Código: Selecionar todos
Enable shared folders

Shared folders are managed on the host, in the settings of the Virtual Machine accessible via the GUI of VirtualBox, in the Shared Folders tab. There, Folder Path, the name of the mount point identified by Folder name, and options like Read-only, Auto-mount and Make permanent can be specified. These parameters can be defined with the VBoxManage command line utility. See there for more details.

No matter which method you will use to mount your folder, all methods require some steps first.

To avoid this issue /sbin/mount.vboxsf: mounting failed with the error: No such device, make sure the vboxsf kernel module is properly loaded. It should be, since we enabled all guest kernel modules previously.

Two additional steps are needed in order for the mount point to be accessible from users other than root:

    the virtualbox-guest-utils package created a group vboxsf (done in a previous step);
    your username must be in vboxsf group.

Manual mounting

Use the following command to mount your folder in your Arch Linux guest:

# mount -t vboxsf shared_folder_name mount_point_on_guest_system

The vboxsf filesystem offers other options which can be displayed with this command:

# mount.vboxsf

For example if the user was not in the vboxsf group, we could have used this command to give access our mountpoint to him:

# mount -t vboxsf -o uid=1000,gid=1000 home /mnt/

Where uid and gid are values corresponding to the users we want to give access to. These values are obtained from the id command run against this user.
Automounting
Note: Automounting requires the vboxservice to be enabled/started.

In order for the automounting feature to work you must have checked the auto-mount checkbox in the GUI or used the optional --automount argument with the command VBoxManage sharedfolder.

The shared folder should now appear in /media/sf_shared_folder_name. If users in media cannot access the shared folders, check that media has permissions 755 or has group ownership vboxsf if using permission 750. This is currently not the default if media is created by installing the virtualbox-guest-utils.

You can use symlinks if you want to have a more convenient access and avoid to browse in that directory, e.g.:

$ ln -s /media/sf_shared_folder_name ~/my_documents


Eu nunca tentei esse procedimento, mas se você tiver problemas eu posso tenta reproduzir aqui na minha máquina e ver se te ajudo.


Obrigado! Vou tentar.
Imagem
Avatar do usuário
Davidson0
Membro

 
Mensagens: 113
Artigos: 1
Registro: 15 Set 2015, 20:09
Localização: Vespasiano
Agradeceu: 46 vez(es)
Agradecido: 15 vez(es)
Distro utilizada: Manjaro
Versão: Architect 2019
Ambiente: Gnome Vanilla
Repositório: Stable
Habilidade: Franguinho


Voltar para Iniciante



Quem está online

Usuários navegando neste fórum: Nenhum usuário registrado e 4 visitantes

^ Voltar ao Topo