将虚拟机移至外部磁盘并更新虚拟机的磁盘映像文件后,启动虚拟机将显示此警告
开始“默认” ... (默认)检查网络以根据需要重新创建... 检查是否启用了硬件虚拟化失败:打开/Users/hanxue/.docker/machine/machines/default/default/Logs/VBox.log:没有此类文件或目录
VBoxManage modifyvm
命令似乎没有指定日志文件的选项
modifyvm <uuid|vmname>
[--name <name>]
[--groups <group>, ...]
[--description <desc>]
[--ostype <ostype>]
[--iconfile <filename>]
[--memory <memorysize in MB>]
[--pagefusion on|off]
[--vram <vramsize in MB>]
[--acpi on|off]
[--pciattach 03:04.0]
[--pciattach 03:04.0@02:01.0]
[--pcidetach 03:04.0]
[--ioapic on|off]
[--hpet on|off]
[--triplefaultreset on|off]
[--apic on|off]
[--x2apic on|off]
[--paravirtprovider none|default|legacy|minimal|
hyperv|kvm]
[--paravirtdebug <key=value> [,<key=value> ...]]
[--hwvirtex on|off]
[--nestedpaging on|off]
[--largepages on|off]
[--vtxvpid on|off]
[--vtxux on|off]
[--pae on|off]
[--longmode on|off]
[--ibpb-on-vm-exit on|off]
[--ibpb-on-vm-entry on|off]
[--spec-ctrl on|off]
[--l1d-flush-on-sched on|off]
[--l1d-flush-on-vm-entry on|off]
[--cpu-profile "host|Intel 80[86|286|386]"]
[--cpuid-portability-level <0..3>
[--cpuid-set <leaf[:subleaf]> <eax> <ebx> <ecx> <edx>]
[--cpuid-remove <leaf[:subleaf]>]
[--cpuidremoveall]
[--hardwareuuid <uuid>]
[--cpus <number>]
[--cpuhotplug on|off]
[--plugcpu <id>]
[--unplugcpu <id>]
[--cpuexecutioncap <1-100>]
[--rtcuseutc on|off]
[--graphicscontroller none|vboxvga|vmsvga]
[--monitorcount <number>]
[--accelerate3d on|off]
[--accelerate2dvideo on|off]
[--firmware bios|efi|efi32|efi64]
[--chipset ich9|piix3]
[--bioslogofadein on|off]
[--bioslogofadeout on|off]
[--bioslogodisplaytime <msec>]
[--bioslogoimagepath <imagepath>]
[--biosbootmenu disabled|menuonly|messageandmenu]
[--biosapic disabled|apic|x2apic]
[--biossystemtimeoffset <msec>]
[--biospxedebug on|off]
[--boot<1-4> none|floppy|dvd|disk|net>]
[--nic<1-N> none|null|nat|bridged|intnet|hostonly|
generic|natnetwork]
[--nictype<1-N> Am79C970A|Am79C973|
82540EM|82543GC|82545EM|
virtio]
[--cableconnected<1-N> on|off]
[--nictrace<1-N> on|off]
[--nictracefile<1-N> <filename>]
[--nicproperty<1-N> name=[value]]
[--nicspeed<1-N> <kbps>]
[--nicbootprio<1-N> <priority>]
[--nicpromisc<1-N> deny|allow-vms|allow-all]
[--nicbandwidthgroup<1-N> none|<name>]
[--bridgeadapter<1-N> none|<devicename>]
[--hostonlyadapter<1-N> none|<devicename>]
[--intnet<1-N> <network name>]
[--nat-network<1-N> <network name>]
[--nicgenericdrv<1-N> <driver>
[--natnet<1-N> <network>|default]
[--natsettings<1-N> [<mtu>],[<socksnd>],
[<sockrcv>],[<tcpsnd>],
[<tcprcv>]]
[--natpf<1-N> [<rulename>],tcp|udp,[<hostip>],
<hostport>,[<guestip>],<guestport>]
[--natpf<1-N> delete <rulename>]
[--nattftpprefix<1-N> <prefix>]
[--nattftpfile<1-N> <file>]
[--nattftpserver<1-N> <ip>]
[--natbindip<1-N> <ip>
[--natdnspassdomain<1-N> on|off]
[--natdnsproxy<1-N> on|off]
[--natdnshostresolver<1-N> on|off]
[--nataliasmode<1-N> default|[log],[proxyonly],
[sameports]]
[--macaddress<1-N> auto|<mac>]
[--mouse ps2|usb|usbtablet|usbmultitouch]
[--keyboard ps2|usb
[--uart<1-N> off|<I/O base> <IRQ>]
[--uartmode<1-N> disconnected|
server <pipe>|
client <pipe>|
tcpserver <port>|
tcpclient <hostname:port>|
file <file>|
<devicename>]
[--guestmemoryballoon <balloonsize in MB>]
[--audio none|null|coreaudio]
[--audioin on|off]
[--audioout on|off]
[--audiocontroller ac97|hda|sb16]
[--audiocodec stac9700|ad1980|stac9221|sb16]
[--clipboard disabled|hosttoguest|guesttohost|
bidirectional]
[--draganddrop disabled|hosttoguest]
[--vrde on|off]
[--vrdeextpack default|<name>
[--vrdeproperty <name=[value]>]
[--vrdeport <hostport>]
[--vrdeaddress <hostip>]
[--vrdeauthtype null|external|guest]
[--vrdeauthlibrary default|<name>
[--vrdemulticon on|off]
[--vrdereusecon on|off]
[--vrdevideochannel on|off]
[--vrdevideochannelquality <percent>]
[--usb on|off]
[--usbehci on|off]
[--usbxhci on|off]
[--usbrename <oldname> <newname>]
[--snapshotfolder default|<path>]
[--teleporter on|off]
[--teleporterport <port>]
[--teleporteraddress <address|empty>
[--teleporterpassword <password>]
[--teleporterpasswordfile <file>|stdin]
[--tracing-enabled on|off]
[--tracing-config <config-string>]
[--tracing-allow-vm-access on|off]
[--usbcardreader on|off]
[--autostart-enabled on|off]
[--autostart-delay <seconds>]
[--videocap on|off]
[--videocapscreens all|<screen ID> [<screen ID> ...]]
[--videocapfile <filename>]
[--videocapres <width> <height>]
[--videocaprate <rate>]
[--videocapfps <fps>]
[--videocapmaxtime <ms>]
[--videocapmaxsize <MB>]
[--videocapopts <key=value> [,<key=value> ...]]
[--defaultfrontend default|<name>]
如何修改VBox.log的位置? default.vbox
文件也未指定日志位置
<?xml version="1.0"?>
<!--
** DO NOT EDIT THIS FILE.
** If you make changes to this file while any VirtualBox related application
** is running, your changes will be overwritten later, without taking effect.
** Use VBoxManage or the VirtualBox Manager GUI to make changes.
-->
<VirtualBox xmlns="http://www.virtualbox.org/" version="1.15-macosx">
<Machine uuid="{d2610ffb-f00c-4d36-8a4b-29043b02d2c4}" name="default" OSType="Linux26_64" snapshotFolder="Snapshots" lastStateChange="2019-01-18T11:27:07Z">
<MediaRegistry>
<HardDisks>
<HardDisk uuid="{fa1480e6-6cf8-410f-a16a-720bbf08ff22}" location="/Volumes/USB/docker/machine/machines/default/disk.vmdk" format="VMDK" type="Normal"/>
</HardDisks>
<DVDImages>
<Image uuid="{e85e5ef4-2c06-401f-9321-d7517a66b321}" location="/Users/hanxue/.docker/machine/machines/default/boot2docker.iso"/>
<Image uuid="{ab50127f-f7d5-415f-aa05-5981060f0eb4}" location="/Volumes/USB/docker/machine/machines/default/boot2docker.iso"/>
</DVDImages>
</MediaRegistry>
<ExtraData>
<ExtraDataItem name="GUI/LastNormalWindowPosition" value="71,198,720,421"/>
<ExtraDataItem name="VBoxInternal2/SharedFoldersEnableSymlinksCreate/Users" value="1"/>
</ExtraData>
<Hardware>
<CPU>
<PAE enabled="true"/>
<LongMode enabled="true"/>
<HardwareVirtExLargePages enabled="true"/>
</CPU>
<Memory RAMSize="1024"/>
<HPET enabled="true"/>
<Paravirt provider="Default"/>
<Boot>
<Order position="1" device="DVD"/>
<Order position="2" device="DVD"/>
<Order position="3" device="HardDisk"/>
<Order position="4" device="None"/>
</Boot>
<VideoCapture fps="25" options="ac_enabled=false"/>
<RemoteDisplay enabled="false"/>
<BIOS>
<IOAPIC enabled="true"/>
<Logo fadeIn="false" fadeOut="false" displayTime="0"/>
<BootMenu mode="Disabled"/>
</BIOS>
<Network>
<Adapter slot="0" enabled="true" MACAddress="08002725C9F6" cable="true" type="82540EM">
<DisabledModes>
<InternalNetwork name="intnet"/>
<NATNetwork name="NatNetwork"/>
</DisabledModes>
<NAT>
<DNS use-proxy="true"/>
<Forwarding name="ssh" proto="1" hostip="127.0.0.1" hostport="61378" guestport="22"/>
</NAT>
</Adapter>
<Adapter slot="1" enabled="true" MACAddress="080027E950C0" cable="true" type="82540EM">
<DisabledModes>
<InternalNetwork name="intnet"/>
<NATNetwork name="NatNetwork"/>
</DisabledModes>
<HostOnlyInterface name="vboxnet6"/>
</Adapter>
<Adapter slot="2" cable="true" type="Am79C973"/>
<Adapter slot="3" cable="true" type="Am79C973"/>
<Adapter slot="4" cable="true" type="Am79C973"/>
<Adapter slot="5" cable="true" type="Am79C973"/>
<Adapter slot="6" cable="true" type="Am79C973"/>
<Adapter slot="7" cable="true" type="Am79C973"/>
</Network>
<AudioAdapter driver="CoreAudio" enabled="true" enabledIn="false" enabledOut="false"/>
<RTC localOrUTC="UTC"/>
<SharedFolders>
<SharedFolder name="Users" hostPath="/Users" writable="true" autoMount="true"/>
</SharedFolders>
<GuestProperties>
<GuestProperty name="/VirtualBox/GuestAdd/Revision" value="125813" timestamp="1547810530818115000" flags=""/>
<GuestProperty name="/VirtualBox/GuestAdd/SharedFolders/MountDir" value="/" timestamp="1545727366043887000" flags=""/>
<GuestProperty name="/VirtualBox/GuestAdd/SharedFolders/MountPrefix" value="/" timestamp="1545727365986899000" flags=""/>
<GuestProperty name="/VirtualBox/GuestAdd/Version" value="5.2.20" timestamp="1547810530817930000" flags=""/>
<GuestProperty name="/VirtualBox/GuestAdd/VersionExt" value="5.2.20" timestamp="1547810530818010000" flags=""/>
<GuestProperty name="/VirtualBox/GuestInfo/OS/Product" value="Linux" timestamp="1547810530817144000" flags=""/>
<GuestProperty name="/VirtualBox/GuestInfo/OS/Release" value="4.14.79-boot2docker" timestamp="1547810530817276000" flags=""/>
<GuestProperty name="/VirtualBox/GuestInfo/OS/Version" value="#1 SMP Thu Nov 8 01:56:42 UTC 2018" timestamp="1547810530817380000" flags=""/>
<GuestProperty name="/VirtualBox/HostInfo/GUI/LanguageID" value="en_US" timestamp="1547810545759333000" flags=""/>
</GuestProperties>
</Hardware>
<StorageControllers>
<StorageController name="SATA" type="AHCI" PortCount="30" useHostIOCache="true" Bootable="true" IDE0MasterEmulationPort="0" IDE0SlaveEmulationPort="1" IDE1MasterEmulationPort="2" IDE1SlaveEmulationPort="3">
<AttachedDevice passthrough="false" type="DVD" hotpluggable="false" port="0" device="0">
<Image uuid="{ab50127f-f7d5-415f-aa05-5981060f0eb4}"/>
</AttachedDevice>
<AttachedDevice type="HardDisk" hotpluggable="false" port="1" device="0">
<Image uuid="{fa1480e6-6cf8-410f-a16a-720bbf08ff22}"/>
</AttachedDevice>
</StorageController>
</StorageControllers>
</Machine>
</VirtualBox>
答案 0 :(得分:0)
我认为问题在于VirtualBox目录的重组,可能是由于升级了VirtalBox所致。我遇到了问题,今天找到了解决方法。
我遇到了同样的Checking if hardware virtualization is enabled failed: open /Users/ZZZZZ/.docker/machine/machines/default/default/Logs/VBox.log
问题。该问题发生在我顺利使用了数周的docker-machine VM上。出了什么问题?
我注意到在错误消息中,docker-machine
正在寻找 VirtualBox 日志,而不是Docker的特殊记录。现在docker-machine
在.docker
下创建文件,但是就VirtualBox而言,它们似乎相当常规,好像docker-machine
给VBoxManage create
只是一个文件夹一样。
我打开了VirtualBox管理器GUI,并打开了该VM的日志。在那里,我看到VBox.Log
文件的路径与docker-machine
所寻找的内容略有不同。我的日志文件位于以下位置:
~/.docker/machine/machines/default/Utility/default/Logs/VBox.log
我通过符号链接而不是Logs
子目录,而是Utility/default
子目录来修复它:
ln -s ~/.docker/machine/machines/default/Utility/default ~/.docker/machine/machines/default/
现在我的default
码头工人机器像以前一样运行。
我希望这对某人有帮助!