Giter Site home page Giter Site logo

vfuse's People

Contributors

avjokela avatar chilcote avatar clburlison avatar erikng avatar gmarnin avatar grahamgilbert avatar magervalp avatar michalmmac avatar mscottblake avatar nmcspadden avatar rderewianko avatar rmanly avatar timsutton avatar vmiller avatar zhaokai-vm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vfuse's Issues

Creating thin provisioned VM for ESXi need remote destination

Hi

I need to create a thin provisioned disk to use with vSphere. It's the disk option 6.

Here is the template I've used:

{
    "source_dmg": "/Users/yoann/Pro/SystemImage/osx_updated_160626-10.11.5-15F34.hfs.dmg",
    "output_dir": "/Users/yoann/Pro/vSphereTemplate",
    "output_name": "OS X 10.11.5",
    "cache": false,
    "hw_version": 11,
    "mem_size": 2048,
    "disk_type": 6,
    "bridged": false,
    "hw_model": "11",
    "use_qemu": false
}

And here is the run log:

If you don't want to be prompted in the GUI for an admin password, run this script with sudo rights

Mounting /Users/yoann/Pro/SystemImage/osx_updated_160626-10.11.5-15F34.hfs.dmg
OS X version is 10.11.5
VMware hardware version 11 does not officially support 10.11
Using VMware Fusion path: /Applications/VMware Fusion.app
Converting DMG to VMDK
Error: VMware Virtual Disk Manager can only convert to ESX thin disks if the destination is remote.
Unmounting Base OS DMG

According to the VMware documentation the right command to use is vmware-vdiskmanager -r sourceDisk.vmdk -t 4 -h esx3.example.com -u root -f password.txt "[storage1] <VMname>/targetDisk.vmdk"

https://pubs.vmware.com/vsphere-50/index.jsp?topic=%2Fcom.vmware.vddk.utils.doc_50%2Fdiskutils_diskmgr.5.4.html

Detecting VMware Fusion installs in locations besides /Applications

..for example, if you install Fusion via brew-cask, you'll have somewhere in /opt/caskroom and a symlink in ~/Applications/VMware Fusion.app.

Would you consider a PR to support alternate install directories? This could be done either by:

  1. A manually-set option
  2. Using Spotlight: cmd = ['/usr/bin/mdfind', 'kMDItemCFBundleIdentifier == com.vmware.fusion'] and picking the first result.

Unable to create the source of raw disk

Hello,

This week I upgraded my Mac to macOS Catalina and my VMWare Fusion to 11.5. When I try to create new VMDK from DMGs made from AutoDMG I get the following:

Desktop % sudo /usr/local/vfuse/bin/vfuse -i /Volumes/SuperMac-Extreme/JAMFCompatibleVM/osx-10.14.6-18G95.apfs.dmg
Password:
Mounting /Volumes/SuperMac-Extreme/JAMFCompatibleVM/osx-10.14.6-18G95.apfs.dmg
macOS version is 10.14.6
Unmounting /Volumes/Macintosh HD 1
Using VMware Fusion path: /Applications/VMware Fusion.app
Converting DMG to VMDK
|Error: Unable to create the source raw disk: The specified device is not a valid physical disk device (20).
There is a problem with your DMG; please re-create it and try again

These dmg files worked prior to my upgrades with vfuse. Are there any known issues with macOS Catalina, VMWare Fusion 11.5, and vfuse 2.2.4? I even upgraded my AutoDMG 1.10b and tried creating a macOS Catalina dmg and ended up with the same thing:

Desktop % sudo /usr/local/vfuse/bin/vfuse -i /Volumes/SuperMac-Extreme/JAMFCompatibleVM/osx-10.15-19A602.apfs.dmg
Password:
Mounting /Volumes/SuperMac-Extreme/JAMFCompatibleVM/osx-10.15-19A602.apfs.dmg
macOS version is 10.15
Unmounting /Volumes/Macintosh HD 1
Using VMware Fusion path: /Applications/VMware Fusion.app
Converting DMG to VMDK
|Error: Unable to create the source raw disk: The specified device is not a valid physical disk device (20).
There is a problem with your DMG; please re-create it and try again

Thanks for your assistance!

Errno 2 when building 10.13 VM on 10.13 host machine with VMware Fusion

We've discussed this a bit in #virtualization on the MacAdmins Slack but I thought I'd open it here so there'd be a record of the issue. When attempting to build a 10.13 VM with VMware Fusion on a 10.13 machine I get the following error:

[Errno 2] No such file or directory: '/Volumes/Preboot 1/System/Library/CoreServices/SystemVersion.plist'

artifact packaging issue

relates to Homebrew/homebrew-core#54541

==> brew test --verbose vfuse
==> FAILED
Testing vfuse
/usr/bin/sandbox-exec -f /private/tmp/homebrew20200510-10086-1namqwk.sb ruby -W0 -I $LOAD_PATH -- /usr/local/Homebrew/Library/Homebrew/test.rb /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/vfuse.rb --verbose
==> /usr/local/Cellar/vfuse/2.2.6/bin/vfuse --version
Error: vfuse: failed
An exception occurred within a child process:
  Test::Unit::AssertionFailedError: </2\.2\.6/> was expected to be =~
<"2.2.5\n">.

packer versions > 0.8 require strings not bool

I got the following error when attempting to follow instructions from PSU talk and Creating a vagrant box using packer-template.json included in the repo.

ryan@AIR-ML-RMANLY vfuse $ /usr/local/packer/packer build ./packer-template.jsonFailed to parse template: 2 error(s) occurred:

* variable install_vagrant_keys: '' expected type 'string', got unconvertible type 'bool'
* variable update_system: '' expected type 'string', got unconvertible type 'bool'

I also found that Tim addressed this a few days ago.

timsutton/osx-vm-templates@c2332b1

Template option to specify VM build path when using Netboot option

When using a vfuse template to build a Netboot ready VM, it would be great to have the ability to specify the (temp) build path. While the default is understandably "/tmp/", this can be problematic if adequate space isnt available.

Perhaps something akin to:
"tmp_dir": "/Volumes/PlentyoSpace/VMs/",

Thanks.

Error: "This virtual machine was created by a newer version of VMware Fusion. "

Yesterday I was creating VMs fine using using the latest version of vfuse and VMware Fusion Pro 10.1.3. Today, any VMs I create with vfuse throw an error This virtual machine was created by a newer version of VMware Fusion. I've tried updating to Fusion Pro 11, downgrading to Fusion Pro 10.1.1, and I always get the same error with VMs generated by vfuse and opened in VMware Fusion Pro.

screen shot 2018-10-31 at 11 31 44 am

Something Failing

Hello,

I used DiskUtility to create an image of a never-booted hard drive. The file is called MacHD.dmg.

This is the traceback I get:

Traceback (most recent call last):
File "./vfuse", line 327, in
main()
File "./vfuse", line 295, in main
mount_point, disk_id = mount_dmg(source_dmg)
File "./vfuse", line 104, in mount_dmg
mount_point = output.split('\n')[-3].split('\t')[-1].strip()
IndexError: list index out of range

I have successfully converted a dmg created from AutoDMG.

Thanks for any thoughts.

Default path for qemu-img

Hi

Looking at https://github.com/chilcote/vfuse/wiki/Received-signal-11 you say

First, you need to install qemu-img. Now, you could use homebrew, like an animal. Which is fine. I mean, if you have to. But the more discerning among you will prefer to install it with macports

Which a perfectly fine point of view :-)

But latter you also say:

If you don't supply a path, then vfuse will plug its nose and assume you installed it with brew and look for it at /usr/local/bin/qemu-img.

Why making things simpler for animals and not for people who do things right? :p

More than a troll, I would like to propose to replace the default value by a call to qemu-img with no path, and let the system rely on a properly configured PATH, regardless of the species of sys admin.

Error when escaping a path in template

When i escape a directory in the template, I get a ValueError

Example with "output_dir": "/Users/fti/Documents/Virtual\ Machines.localized",

berry:~ $ /usr/local/vfuse/vfuse -t /Volumes/SONY_16X/2-vfuse_vanilla_template.json
If you don't want to be prompted in the GUI for an admin password, run this script with sudo rights

Traceback (most recent call last):
File "/usr/local/vfuse/vfuse", line 649, in
main()
File "/usr/local/vfuse/vfuse", line 526, in main
d = import_template(args.template)
File "/usr/local/vfuse/vfuse", line 77, in import_template
d = json.load(f)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/init.py", line 290, in load
**kw)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/init.py", line 338, in loads
return _default_decoder.decode(s)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 366, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 382, in raw_decode
obj, end = self.scan_once(s, idx)
ValueError: Invalid \escape: line 3 column 48 (char 137)
berry:~ $

hardware version 14

latest vmware fusion uses hardware version 14. vfuse should use this version to reduce the "would you like to upgrade this machine?" message every time when booting up a vm.

Key Error

When trying to convert a DMG I'm getting the following returned:

Traceback (most recent call last):
File "/Users/admin/Downloads/vfuse-master/pkgroot/usr/local/vfuse/vfuse", line 844, in
main()
File "/Users/admin/Downloads/vfuse-master/pkgroot/usr/local/vfuse/vfuse", line 746, in main
mount_point, disk_id, volume_kind = mount_dmg(source_dmg)
File "/Users/admin/Downloads/vfuse-master/pkgroot/usr/local/vfuse/vfuse", line 144, in mount_dmg
if i['content-hint'] == 'GUID_partition_scheme':
KeyError: 'content-hint'

I'm unsure what this means or how to resolve it.

Support for High Sierra?

Hey Joe,

You planning on supporting High Sierra (10.13)?

I just tried it and got this:

Mounting osx-10.13-17A365.apfs.dmg
macOS version is 10.13
This macOS version is not supported: 10.13
Unmounting Base OS DMG

YAML support requires external Python module

YAML is a nice format but sadly there is no support for it in Cocoa or the Python standard library. Is YAML a requirement for your integration needs or would you consider a patch replacing it with something supported by the built-in modules (e.g. plist/json/ini)?

Error: local variable 'mount_point' referenced before assignment vfuse 3.0.0

Given:

  • MacBookPro15,2 running macOS Catalina 10.15.4 (19E287)
  • VMware Fusion 11.5.3 (not the Pro edition)
  • AutoDMG 1.10b (587)
  • python 3.7.7
  • vfuse 3.0.0
  • macOS 10.15.4 .dmg created using AutoDMG called osx-10.15.4-19E287.apfs.dmg
  • and much gratitude that you provided vfuse in the first place.

...when I run...

% vfuse -i osx-10.15.4-19E287.apfs.dmg

...I was expecting a virtual machine to be generated with the default name macos-vm.vmwarevm.

Actually I get the following error and no VM is generated:

Mounting osx-10.15.4-19E287.apfs.dmg
Traceback (most recent call last):
  File "/usr/local/vfuse/bin/vfuse", line 1201, in <module>
    main()
  File "/usr/local/vfuse/bin/vfuse", line 1051, in main
    mount_point, disk_id, volume_kind = mount_dmg(source_dmg)
  File "/usr/local/vfuse/bin/vfuse", line 282, in mount_dmg
    return mount_point, disk_id, volume_kind
UnboundLocalError: local variable 'mount_point' referenced before assignment

%

hdiutil shows the .dmg as mounted after the failure. Cleaning that up using

hdiutil info | grep /dev/disk | grep partition | cut -f 1 | xargs -I {} hdiutil detach {}

...and retrying vfuse produces the same result.

Make sure vfuse is in the $PATH

A few options here:

  • Symlink it to /usr/local/bin

Or

  • Change folder structure to /usr/local/vfuse/bin/
  • Add this path via /etc/paths.d

Vfuse 3 package drops an empty config.json

This means that you can't configure vfuse prior to installing the package. Perhaps this should be up to the admin and not just putting one there?

This will then help with facebooks's cpe_vfuse so you can configure vfuse but not necessarily install it with chef and then later install it and not need another chef run.

Error: Received Signal 11

When trying to use vfuse to create the VMware image, we're getting the error "Error: Received Signal 11" during then immediately having the process fail.

I have replicated this with the following.

System OS: macOS 10.13.6
Original DMG: macOS 10.13.6
vFuse Version: 2.0.6
AutoDMG Version: 1.9

and

Round 1
System OS: macOS 10.14.0
Original DMG: macOS 10.13.6
vFuse Version: 2.0.6 
AutoDMG Version: 1.9

Round 2
System OS: macOS 10.14.0
Original DMG: macOS 10.14.0
vFuse Version: 2.0.6 
AutoDMG Version: 1.9

Output

Password:
Mounting osx-10.13.6-17G65.apfs.dmg
macOS version is 10.13.4
Unmounting /Volumes/Macintosh HD 1
Using VMware Fusion path: /Applications/VMware Fusion.app
Converting DMG to VMDK
/Error: Received signal 11.
Unmounting /dev/disk3```

Unsure why this is failing on High Sierra with another High Sierra installer when this worked previously.

Option to add a 'qemu-img' mode?

Thanks to a tip from @morgrowe, I learned it's possible to use the qemu-img to convert a DMG to a VMDK, without a need for VMware Fusion or sudo, and only qemu from homebrew. I tested swapping in the command into vfuse in place of the two vmware- tools and let it set up the rest of the .vmwarevm file as usual, and it works.

The length of time required to convert the image is nearly identical. Would you be interested in a PR that would add this as an alternate "mode" for vfuse? This means it would skip the check for running as root and for VMware, as neither of those things should be required. (As you might guess I like the lack of those requirements, as least for the case of generating this image on a throwaway machine that may not have VMware installed.)

[Errno 2] with 10.14.4

Two different builds of 10.14.4

  • Install_macOS_10.14.4-18E226.dmg
  • Install_macOS_10.14.4-18E2034.dmg

trying to use vfuse with template that worked before creating a new image for 10.14.4

Get the following error.

Thanks

[Errno 2] No such file or directory: '/Volumes/Install macOS Mojave/System/Library/CoreServices/SystemVersion.plist'

Update
Using the Install_macOS_10.14.3-18D42.dmg there are no issues creating a new VM

Installation of vfuse?

Heya... I'm sure this is just about the dumbest question regarding vfuse you've received. I'm new to github and have no idea how to install vfuse so that I can use it locally on my device. I've installed software from other github projects where an installer is present or a dmg (AutoDMG, for example), but have no idea how to install vfuse. Sorry to be such a boneheaded newb, but a step by step would really appreciated. Thanks in advance, and again my apologies for having to deal with such an idiot. :)

colored function used before being defined

The colored function is used in the try/except block wrapping the yaml import but it is defined a few lines down which causes a traceback if yaml could not be imported. Moving the yaml import block after the definition of colored works fine.

High Sierra wont work with shared folders vagrant box

ref: https://github.com/chilcote/vfuse/wiki/Vagrant

When creating my new 10.13 Vagrantbox I got some issue with hgfs not loaded and therefor shared folders not available.

The reason:

Kernel Extensions will not load, because kexts are blocked awaiting userconsent.

The fix:

Before you build your image with AutoDMG do the following modification to the vagrant-outset package.

add the following script in: vagrant-outset/pkgroot/usr/local/outset/boot-every/disable_kext_userconsent.sh

#!/bin/bash

#Disable kernel extensiopn approving
/usr/sbin/spctl --disable

Remember to chmod a+x on the script.

then build a new version of vagrant-outset: make pkg

Add this to the packagearray in autodmg and proceed with the instructions on the https://github.com/chilcote/vfuse/wiki/Vagrant

K

invalid int value: 'MacBookPro11,5'

Hey Joe,

What might be the cause of this?

/usr/local/vfuse/vfuse -s SERIAL -w MacBookPro11,5 -i images/Sierra_170202-10.12.1-16B2657.hfs.dmg
usage: vfuse [-h] [-i INPUT] [-o OUTPUT] [-n NAME] [-w HW_VERSION]
             [-m MEM_SIZE] [-s [SERIAL]] [-t TEMPLATE] [-e] [-p PACKER] [-d D]
             [--hw-model HW_MODEL] [--start [START]] [--stop STOP]
             [--reset RESET] [--use-qemu] [--recovery]
vfuse: error: argument -w/--hw-version: invalid int value: 'MacBookPro11,5'

vfuse 3.0.0 Attribute error

I cloned the package and ran make pkg on it, and installed. everything went according to plan until I tried to run it, and it came up with an attribute error: AttributeError: 'Namespace' object has no attribute 'start' any help?

"File not found" when launching vfuse-produced VMs for the first time

I created a 10.8 VM with vfuse, starting with a plain 10.8 AutoDMG.

Mounting ~/osx10.8.5-12F45-generic.hfs.dmg
OS X version is 10.8.5
Converting DMG to VMDK
Populating VMX file
Unmounting Base OS DMG
VMware Fusion VM created at ~/Documents/Virtual Machines.localized/vFuse Mac OS X 10.8.vmwarevm

However, upon launching the VM, I get this:

screen shot 2015-12-03 at 2 43 55 pm

Clicking Browse doesn't reveal any .vmdk files to choose from:
screen shot 2015-12-03 at 2 46 33 pm

My host Mac has 10.10.1 and VMware Fusion 8.0.2, and is up to date with vfuse commit 12960d7.

Anything I can try to troubleshoot?

Obsolete warning message in vFuse about macOS Sierra and HW12

VMware Fusion 8.5 has been released with an option to create macOS Sierra VMs. Sierra VMs are using Hardware Version 12, so it should no longer be necessary to have the following warning message in vfuse:

VMware hardware version 12 does not officially support 10.12

screen shot 2016-09-13 at 1 03 39 pm

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.