Linux parallels shared folders

No core dump on Ubuntu on a Parallels shared folder

I have an application that I’m working on, and I’m having trouble getting a core dump when it segfaults. In fact, I’m having trouble getting real core dump files at all. A simple test case will generate a core dump file, but it’s zero length. I’ve got ulimit -c unlimited set. This is 64-bit Ubuntu Maverick. Any hint what to do next?

[dlee@dlee-oak t]$ ulimit -c unlimited [dlee@dlee-oak t]$ cat mkcore.cpp int main() < *((int *)0) = 0; >[dlee@dlee-oak t]$ g++ -g mkcore.cpp -o mkcore [dlee@dlee-oak t]$ ./mkcore Segmentation fault [dlee@dlee-oak t]$ ls -l core* -rw-r--r-- 1 dlee dlee 0 2010-12-21 15:00 core.2993 
[dlee@dlee-oak t]$ tail -n +1 /proc/sys/kernel/core_* ==> /proc/sys/kernel/core_pattern /proc/sys/kernel/core_pipe_limit /proc/sys/kernel/core_uses_pid Dec 21 16:07:40 dlee-oak kernel: [ 133.863045] mkcore[1589]: segfault at 0 ip 000000000040043d sp 00007fffbd025510 error 6 in mkcore[400000+aa000] 

I’ve just realized that the filesystem the core file is being generated on is a Parallels Shared Folder. (This Ubuntu instance is running on a Parallels VM on my Mac). When I run the app from a directory that’s on local disk, core file is generated as expected. So I’ll change the question slightly: why isn’t it generating the core file on the prl_fs filesystem? Just curious. Edit #2: You’ll note that when it generates the zero length core file, it does not print (core dumped) . I did double check my sanity, and yes the zero length core file is really being created.

[dlee@dlee-oak t]$ X=$(pwd) [dlee@dlee-oak t]$ ls -l core* ls: cannot access core*: No such file or directory [dlee@dlee-oak t]$ ./mkcore Segmentation fault [dlee@dlee-oak t]$ ls -l core* -rw-r--r-- 1 dlee dlee 0 2010-12-22 00:41 core.6009 [dlee@dlee-oak t]$ cd ~ [dlee@dlee-oak ~]$ $X/mkcore Segmentation fault (core dumped) 

Источник

Parallels Desktop

Parallels Desktop is a hypervisor for macOS which allows users to install a variety of operating systems as «virtual machines» (guests) on the host system, reducing the need for managing multiple physical machines. A more complete description on virtualization can be found at Wikipedia.

Installation of Arch as a guest

Parallels Desktop supports Linux guests out of the box, but only offers support for a few Linux distributions — excluding Arch Linux. This means the installation of Parallels tools have not been tested by the vendor, and requires some manual intervention to work under Arch. If you do not wish to use Parallels tools, installation is as simple as choosing «other linux» when creating a new virtual machine and proceeding as you would on any real machine.

Читайте также:  Deep packet inspection in linux

Parallels Desktop on an Apple Mac x86_64 hardware

In addition to the instructions below, there is an installation guide for Arch Linux in Parallels Knowledgebase.

Parallels Desktop on an Apple Mac M1 and higher

You can use the Archboot aarch64 images to install a VM as you like it.

If you want a plain image right to start: Download VM, for login information please look at the Readme

Parallels tools

Overview

To improve interoperability between the host and the guest operating systems, Parallels provides a package called «Parallels tools» which contains kernel modules and userspace utilities. See Parallels Tools Overview for a list of its features.

This article assumes users want to make full use of the tools, including Xorg configuration. If you are running a headless server, you can skip over the sections relating to X.

When referring to the version of parallel tools the form is .. For example: 9.0.24237.1028877 corresponds to Parallels version 9.0.24237 with tools version 1028877

Configuring Xorg

The Parallels tools installer will take care of configuring Xorg, so just follow the instructions at Xorg to install the relevant packages on your system. Install the xf86-video-vesa package to use the vesa driver.

Preparing dependencies

You need to install standard build utilities gcc , dkms and linux-headers .

Installing Parallels tools

This article or section is out of date.

Reason: Those kernel versions are outdated and not the LTS kernel. Are the patching instructions still relevant? (Discuss in Talk:Parallels Desktop)

Choose «install Parallels Tools» from the «Virtual Machine» menu. Parallels Tools are located on a cd-image, which will be connected to your virtual machine. You have to mount it first:

Now you can proceed to install Parallels tools using the installation script as follows:

Parallels tools work fine out of the box in most cases, but sometimes you need to patch it:

Liunx Kernel Parallels Desktop Parallels Tools Work out of box
5.17 17.1.4 51567 Yes
5.18 17.1.4 51567 No
5.18 18.0.0 53049 Yes

If you have Parallels Desktop 17.1.4 but installed a VM with kernel version 5.18 (check with uname -a ), follow the troubleshooting section below:

Troubleshooting: Patch Parallels 17 to support Kernel 5.18

Choose «install Parallels Tools» from the «Virtual Machine» menu. Parallels Tools are located on a cd-image, which will be connected to your virtual machine.

You need root permission in this process. Become root user, then mount the Tools virtual CD in your Linux VM:

Copy the full CD directory to home directory and rename it to prl-tools-build :

$ cp -R /mnt ~ $ cd ~ $ mv mnt prl-tools-build

Download the community patch, then prepare kmods/ to be patched::

$ wget https://raw.githubusercontent.com/wegank/nixos-config/7b89b4c6d1a87c83f10aa5d0f96fe0229795056e/hardware/parallels-unfree/prl-tools.patch $ cd ~/prl-tools-build/kmods $ tar zxf prl_mod.tar.gz $ rm prl_mod.tar.gz

Apply the patch, then install:

$ cd ~/prl-tools-build $ patch -p1 < prl-tools.patch $ cd kmods $ tar zcf prl_mod.tar.gz * $ cd ~/prl-tools-build $ ./install

(See this thread for a community-provided patch from Parallels forum.) (See this thread for a step-by-step instruction on how to apply any Parallels Tools patch provided in the forum.)

Читайте также:  Astra linux domain настройка

Using the tools

Sharing folders

  • You can specify which folders on your hosts system you would like to share with your guests under "virtual machine > configuration > sharing".
  • The folder will appear at /mnt/psf .

Dynamic Display Resolution

A very helpful tool is prlcc . It changes the resolution of the display (in the guest - not the host) automatically when your resize your window. If this tool is not running, the contents of the window gets stretched or shrunken. prlcc is usually started automatically and runs in the background. If not, run the following (or place it in a configuration file like /etc/X11/xinit/xinitrc.d/90-prlcc ):

Synchronize clipboard

The tool prlcp can be run to synchronize the clipboard between guest and host. Like the previous tool, if it is not executed automatically, it is recommended to start it in a configuration file like .xinitrc :

Future work

In general, updating system packages like the linux kernel or Xorg can break Parallels tools and you will need to re-install them. In some cases, new packages will be incompatible with the tools and they will stop working - in that case you will need to roll back the newly installed packages and wait until Parallels releases a new product build before updating your guest (in the hope they have resolved any previous incompatibilities).

See also

Источник

Linux parallels shared folders

A shared folder is a folder on your Mac that can be accessed from your virtual machine. Such folders can be used for exchanging files between the primary OS (Mac OS X) and the virtual machine or between several virtual machines. You can also share the virtual machine disk volumes with Mac OS X - they will be mounted on the Mac OS X Desktop.

In the operating system, where a shared folder resides, it appears as a usual folder, while in the virtual machine it is shared to, it appears as an object of the network neighborhood.

A shared folder or volume resides on the computer (host computer or a virtual machine) to which it initially belongs. It means, that it occupies space on the hard disk of the computer or virtual machine it originally belongs to.

Using shared folders is possible in the following guest operating systems:

  • Windows 2000, Windows Server 2003, Windows XP, and Windows Vista
  • Linux operating systems supported by Parallels Desktop as guest OSs. See the list of supported guest operating systems.

Setting up a shared folder requires two steps:

  1. Make sure that Parallels Tools are installed in your guest OS. See Installing Parallels Tools for detailed descriptions on how to do so in a particular guest OS.
  2. Add a shared folder(s) to your virtual machine configuration. For the instruction on how to do that, see Shared Folders Settings.
  1. Start Parallels Desktop and open a virtual machine.
  2. Open the Virtual Machine Configuration dialog by:
    • choosing Configure from the Virtual Machine menu, or
    • clicking the Configure button on the toolbar of the virtual machine main window.
  3. In the Virtual Machine Configuration dialog, select the Shared Folders pane. Enable the User-defined folders option to be able to add shared folders to the list.
  4. Click the Add button . The Add Shared Folder dialog will appear.
  5. In the Add Shared Folder dialog:
    • Specify a folder in the Mac OS X file system that will be shared in the Path field.
    • Specify a name for the folder which will appear in your guest OS in the Name field.
    • Provide a description for the shared folder if needed in the Description field.
    • If you want to restrict writing to this folder from inside the guest OS, select the Read-Only option. You will be able to save files to this folder in Mac OS X only.
    • Make sure the Enabled option is selected and click OK.
  6. Click OK in the Virtual Machine Configuration dialog to save the changes and quit the dialog.
  7. Now you can start your virtual machine and view the shared folders in the guest OS.
Читайте также:  Mac os отличия от линукс

Viewing Shared Folders in Windows Guest OS

  1. After you have created a shared folder, start your Windows virtual machine and you will see the Parallels Shared Folders shortcut on the Windows desktop.
  2. Double-clicking this shortcut will lead you to the \\.psf directory where all your shared folders are stored.

Note: To be able to save files to a shared folder from inside the virtual machine, make sure that the Read-Only option is disabled.

Viewing Shared Folders in Linux Guest OS

  1. After you have created a shared folder, start your Linux virtual machine.
  2. Shared folders will be automatically mounted to the / media/psf or /mnt/psf directory upon the virtual machine start. Note: Automatic mounting may be blocked by SELinux. For more information, refer to Setting Up Shared Folders in Linux Virtual Machines.

Sharing Windows Disks to Mac OS

If you want to access your virtual machine's volumes from Mac OS X, you can enable inverse sharing. To do so:

  1. Start Parallels Desktop and open a virtual machine.
  2. Open the Virtual Machine Configuration dialog by:
    • choosing Configure from the Virtual Machine menu, or
    • clicking the Configure button on the toolbar of the virtual machine main window.
  3. In the Virtual Machine Configuration dialog, select the Shared Folders pane and enable the Mount virtual disks to Mac OS X desktop option.

The virtual machine's volumes will be accessible from Mac OS X desktop where they will appear as connected volumes.

Note: If the virtual machine's volumes are not mounted on Mac OS X desktop, go to Finder > Preferences > General and make sure that the Connected servers option is selected.

For more information about accessing the virtual machine's disks from Mac OS, see Browsing Virtual Hard Disks In Finder.

Источник

Оцените статью
Adblock
detector