Repository: lima-vm/lima
Pull request #1951 (2023-10-26 12:32:04)

 Use VZ by default for new instances on macOS >= 13.5
VZ is now the default type for new instances >= 13.5, unless the config is incompatible with vz (e.g., `firmware.legacyBIOS=true`, `mountType=9p`).
    
Existing instances will continue to use QEMU by default, unless `vz-identifier` is present in the instance directory.
    
Run `limactl start` with `--debug` to see how the vmType is resolved.

AkihiroSuda: @lima-vm/maintainers 

I'll release v1.0 beta after merging this.

hasan4791: Here is the logs
```

(vz-default) lima-vm-lima> limactl --version
limactl version 0.5.0-2060-ged39486
(vz-default) lima-vm-lima> which limactl 
/Users/chasan/Work/go/src/github.com/temp/lima-vm-lima/_output/bin/limactl
(vz-default) lima-vm-lima> limactl --debug start
DEBU[0000] Evaluating yq expression: ""                 
? Creating an instance "default" Proceed with the current configuration
DEBU[0001] ResolveVMType: resolved VMType "vz" (default for macOS 13.5 and later) 
DEBU[0001] ResolveVMType: resolved VMType "vz" (default for macOS 13.5 and later) 
DEBU[0001] ResolveVMType: resolved VMType "vz" (default for macOS 13.5 and later) 
DEBU[0001] ResolveVMType: resolved VMType "vz" (default for macOS 13.5 and later) 
DEBU[0001] ResolveVMType: resolved VMType "vz" (explicitly specified in []*LimaYAML{o,y,d}[1]) 
DEBU[0001] ResolveVMType: resolved VMType "vz" (explicitly specified in []*LimaYAML{o,y,d}[1]) 
DEBU[0001] ResolveVMType: resolved VMType "qemu" (existing instance, without "/Users/chasan/.lima/podman-rootful-x86/vz-identifier") 
DEBU[0001] ResolveVMType: resolved VMType "qemu" (existing instance, without "/Users/chasan/.lima/test/vz-identifier") 
DEBU[0001] ResolveVMType: resolved VMType "vz" (explicitly specified in []*LimaYAML{o,y,d}[1]) 
DEBU[0001] Make sure "host" network is stopped          
DEBU[0001] Make sure "user-v2" network is stopped       
DEBU[0001] Make sure usernet network is stopped         
DEBU[0001] Make sure "shared" network is stopped        
DEBU[0001] Make sure "bridged" network is stopped       
INFO[0001] Starting the instance "default" with VM driver "vz" 
DEBU[0001] ResolveVMType: resolved VMType "vz" (default for macOS 13.5 and later) 
INFO[0001] Attempting to download the image              arch=aarch64 digest="sha256:78d35a2f551d281912ee7e5202660d94d713aa1b5de86a17e261328cc2f093d4" location="https://cloud-images.ubuntu.com/releases/23.10/release-20231011/ubuntu-23.10-server-cloudimg-arm64.img"
DEBU[0001] downloading "https://cloud-images.ubuntu.com/releases/23.10/release-20231011/ubuntu-23.10-server-cloudimg-arm64.img" into "/Users/chasan/Library/Caches/lima/download/by-url-sha256/aaadf19ec428e9ce95eb976df0ab7dc6b76e4537c681aadf637892e49b0c6b95/data" 
Downloading the image (ubuntu-23.10-server-cloudimg-arm64.img)
714.88 MiB / 714.88 MiB [-----------------------------------] 100.00% 5.02 MiB/s
DEBU[0145] res.ValidatedDigest=true                     
INFO[0145] Downloaded the image from "https://cloud-images.ubuntu.com/releases/23.10/release-20231011/ubuntu-23.10-server-cloudimg-arm64.img" 
INFO[0145] Converting "/Users/chasan/.lima/default/basedisk" (qcow2) to a raw disk "/Users/chasan/.lima/default/diffdisk" 
3.50 GiB / 3.50 GiB [-------------------------------------] 100.00% 221.74 MiB/s
INFO[0161] Expanding to 100GiB                          
INFO[0161] Attempting to download the nerdctl archive    arch=aarch64 digest="sha256:ea30ab544c057e3a0457194ecd273ffbce58067de534bdfaffe4edf3a4da6357" location="https://github.com/containerd/nerdctl/releases/download/v1.6.2/nerdctl-full-1.6.2-linux-arm64.tar.gz"
DEBU[0161] file "" is cached as "/Users/chasan/Library/Caches/lima/download/by-url-sha256/21921213c0426e38e2f26d2844446767e2a19c0b6655c774f9e4adbb5c368d8f/data" 
DEBU[0161] Comparing digest "sha256:ea30ab544c057e3a0457194ecd273ffbce58067de534bdfaffe4edf3a4da6357" with the cached digest file "/Users/chasan/Library/Caches/lima/download/by-url-sha256/21921213c0426e38e2f26d2844446767e2a19c0b6655c774f9e4adbb5c368d8f/sha256.digest", not computing the actual digest of "/Users/chasan/Library/Caches/lima/download/by-url-sha256/21921213c0426e38e2f26d2844446767e2a19c0b6655c774f9e4adbb5c368d8f/data" 
DEBU[0161] res.ValidatedDigest=true                     
INFO[0161] Using cache "/Users/chasan/Library/Caches/lima/download/by-url-sha256/21921213c0426e38e2f26d2844446767e2a19c0b6655c774f9e4adbb5c368d8f/data" 
DEBU[0161] [hostagent] ResolveVMType: resolved VMType "vz" (existing instance, with "/Users/chasan/.lima/default/vz-identifier") 
DEBU[0161] [hostagent] ResolveVMType: resolved VMType "vz" (existing instance, with "/Users/chasan/.lima/default/vz-identifier") 
DEBU[0161] [hostagent] Creating iso file /Users/chasan/.lima/default/cidata.iso 
DEBU[0161] [hostagent] Using /var/folders/11/07zj9vzj4hq4j9y3kjk4dhg80000gn/T/diskfs_iso1003621884 as workspace 
DEBU[0162] [hostagent] Failed to detect CPU features. Assuming that AES acceleration is available on this Apple silicon. 
DEBU[0162] [hostagent] OpenSSH version 9.4.1 detected   
DEBU[0162] [hostagent] AES accelerator seems available, prioritizing aes128-gcm@openssh.com and aes256-gcm@openssh.com 
INFO[0162] [hostagent] hostagent socket created at /Users/chasan/.lima/default/ha.sock 
DEBU[0162] [hostagent] Start udp DNS listening on: 127.0.0.1:60805 
INFO[0162] [hostagent] Starting VZ (hint: to watch the boot progress, see "/Users/chasan/.lima/default/serial*.log") 
DEBU[0162] [hostagent] Start tcp DNS listening on: 127.0.0.1:64395 
DEBU[0162] [hostagent] Using search domains: [softlayer.local] 
INFO[0162] [hostagent] new connection from  to          
DEBU[0162] received an event                             event="{2023-10-27 16:49:37.725529 +0530 IST {false false false [] 60022}}"
INFO[0162] SSH Local Port: 60022                        
DEBU[0162] [hostagent] [VZ] - vm state change: "VirtualMachineStateStarting" 
INFO[0162] [hostagent] Waiting for the essential requirement 1 of 3: "ssh" 
DEBU[0162] [hostagent] executing script "ssh"           
INFO[0162] [hostagent] [VZ] - vm state change: running  
DEBU[0162] [hostagent] executing ssh for script "ssh": /usr/bin/ssh [ssh -F /dev/null -o IdentityFile="/Users/chasan/.lima/_config/user" -o IdentityFile="/Users/chasan/.ssh/id_rsa" -o IdentityFile="/Users/chasan/.ssh/id_rsa_git" -o IdentityFile="/Users/chasan/.ssh/podman-machine-default" -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o NoHostAuthenticationForLocalhost=yes -o GSSAPIAuthentication=no -o PreferredAuthentications=publickey -o Compression=no -o BatchMode=yes -o IdentitiesOnly=yes -o Ciphers="^aes128-gcm@openssh.com,aes256-gcm@openssh.com" -o User=chasan -o ControlMaster=auto -o ControlPath="/Users/chasan/.lima/default/ssh.sock" -o ControlPersist=yes -p 60022 127.0.0.1 -- /bin/bash] 
DEBU[0162] [hostagent] stdout="", stderr="ssh: connect to host 127.0.0.1 port 60022: Connection refused\r\n", err=failed to execute script "ssh": stdout="", stderr="ssh: connect to host 127.0.0.1 port 60022: Connection refused\r\n": exit status 255 
INFO[0172] [hostagent] Waiting for the essential requirement 1 of 3: "ssh" 
DEBU[0172] [hostagent] executing script "ssh"           
DEBU[0172] [hostagent] executing ssh for script "ssh": /usr/bin/ssh [ssh -F /dev/null -o IdentityFile="/Users/chasan/.lima/_config/user" -o IdentityFile="/Users/chasan/.ssh/id_rsa" -o IdentityFile="/Users/chasan/.ssh/id_rsa_git" -o IdentityFile="/Users/chasan/.ssh/podman-machine-default" -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o NoHostAuthenticationForLocalhost=yes -o GSSAPIAuthentication=no -o PreferredAuthentications=publickey -o Compression=no -o BatchMode=yes -o IdentitiesOnly=yes -o Ciphers="^aes128-gcm@openssh.com,aes256-gcm@openssh.com" -o User=chasan -o ControlMaster=auto -o ControlPath="/Users/chasan/.lima/default/ssh.sock" -o ControlPersist=yes -p 60022 127.0.0.1 -- /bin/bash] 
DEBU[0173] [hostagent] stdout="", stderr="\"System is booting up. Unprivileged users are not permitted to log in yet. Please come back later. For technical details, see pam_nologin(8).\"\nConnection closed by 127.0.0.1 port 60022\r\n", err=failed to execute script "ssh": stdout="", stderr="\"System is booting up. Unprivileged users are not permitted to log in yet. Please come back later. For technical details, see pam_nologin(8).\"\nConnection closed by 127.0.0.1 port 60022\r\n": exit status 255 
INFO[0183] [hostagent] Waiting for the essential requirement 1 of 3: "ssh" 
DEBU[0183] [hostagent] executing script "ssh"           
DEBU[0183] [hostagent] executing ssh for script "ssh": /usr/bin/ssh [ssh -F /dev/null -o IdentityFile="/Users/chasan/.lima/_config/user" -o IdentityFile="/Users/chasan/.ssh/id_rsa" -o IdentityFile="/Users/chasan/.ssh/id_rsa_git" -o IdentityFile="/Users/chasan/.ssh/podman-machine-default" -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o NoHostAuthenticationForLocalhost=yes -o GSSAPIAuthentication=no -o PreferredAuthentications=publickey -o Compression=no -o BatchMode=yes -o IdentitiesOnly=yes -o Ciphers="^aes128-gcm@openssh.com,aes256-gcm@openssh.com" -o User=chasan -o ControlMaster=auto -o ControlPath="/Users/chasan/.lima/default/ssh.sock" -o ControlPersist=yes -p 60022 127.0.0.1 -- /bin/bash] 
DEBU[0183] [hostagent] stdout="", stderr="\"System is booting up. Unprivileged users are not permitted to log in yet. Please come back later. For technical details, see pam_nologin(8).\"\nConnection closed by 127.0.0.1 port 60022\r\n", err=failed to execute script "ssh": stdout="", stderr="\"System is booting up. Unprivileged users are not permitted to log in yet. Please come back later. For technical details, see pam_nologin(8).\"\nConnection closed by 127.0.0.1 port 60022\r\n": exit status 255 
ERRO[0183] [hostagent] r.CreateEndpoint() = connection was refused 
ERRO[0185] [hostagent] r.CreateEndpoint() = connection was refused 
ERRO[0187] [hostagent] r.CreateEndpoint() = connection was refused 
INFO[0193] [hostagent] Waiting for the essential requirement 1 of 3: "ssh" 
DEBU[0193] [hostagent] executing script "ssh"           
DEBU[0193] [hostagent] executing ssh for script "ssh": /usr/bin/ssh [ssh -F /dev/null -o IdentityFile="/Users/chasan/.lima/_config/user" -o IdentityFile="/Users/chasan/.ssh/id_rsa" -o IdentityFile="/Users/chasan/.ssh/id_rsa_git" -o IdentityFile="/Users/chasan/.ssh/podman-machine-default" -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o NoHostAuthenticationForLocalhost=yes -o GSSAPIAuthentication=no -o PreferredAuthentications=publickey -o Compression=no -o BatchMode=yes -o IdentitiesOnly=yes -o Ciphers="^aes128-gcm@openssh.com,aes256-gcm@openssh.com" -o User=chasan -o ControlMaster=auto -o ControlPath="/Users/chasan/.lima/default/ssh.sock" -o ControlPersist=yes -p 60022 127.0.0.1 -- /bin/bash] 
DEBU[0193] [hostagent] stdout="", stderr="", err=<nil>  
INFO[0193] [hostagent] The essential requirement 1 of 3 is satisfied 
INFO[0193] [hostagent] Waiting for the essential requirement 2 of 3: "user session is ready for ssh" 
DEBU[0193] [hostagent] executing script "user session is ready for ssh" 
DEBU[0193] [hostagent] executing ssh for script "user session is ready for ssh": /usr/bin/ssh [ssh -F /dev/null -o IdentityFile="/Users/chasan/.lima/_config/user" -o IdentityFile="/Users/chasan/.ssh/id_rsa" -o IdentityFile="/Users/chasan/.ssh/id_rsa_git" -o IdentityFile="/Users/chasan/.ssh/podman-machine-default" -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o NoHostAuthenticationForLocalhost=yes -o GSSAPIAuthentication=no -o PreferredAuthentications=publickey -o Compression=no -o BatchMode=yes -o IdentitiesOnly=yes -o Ciphers="^aes128-gcm@openssh.com,aes256-gcm@openssh.com" -o User=chasan -o ControlMaster=auto -o ControlPath="/Users/chasan/.lima/default/ssh.sock" -o ControlPersist=yes -p 60022 127.0.0.1 -- /bin/bash] 
DEBU[0193] [hostagent] stdout="", stderr="+ timeout 30s bash -c 'until sudo diff -q /run/lima-ssh-ready /mnt/lima-cidata/meta-data 2>/dev/null; do sleep 3; done'\n", err=<nil> 
INFO[0193] [hostagent] The essential requirement 2 of 3 is satisfied 
INFO[0193] [hostagent] Waiting for the essential requirement 3 of 3: "the guest agent to be running" 
DEBU[0193] [hostagent] executing script "the guest agent to be running" 
DEBU[0193] [hostagent] executing ssh for script "the guest agent to be running": /usr/bin/ssh [ssh -F /dev/null -o IdentityFile="/Users/chasan/.lima/_config/user" -o IdentityFile="/Users/chasan/.ssh/id_rsa" -o IdentityFile="/Users/chasan/.ssh/id_rsa_git" -o IdentityFile="/Users/chasan/.ssh/podman-machine-default" -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o NoHostAuthenticationForLocalhost=yes -o GSSAPIAuthentication=no -o PreferredAuthentications=publickey -o Compression=no -o BatchMode=yes -o IdentitiesOnly=yes -o Ciphers="^aes128-gcm@openssh.com,aes256-gcm@openssh.com" -o User=chasan -o ControlMaster=auto -o ControlPath="/Users/chasan/.lima/default/ssh.sock" -o ControlPersist=yes -p 60022 127.0.0.1 -- /bin/bash] 
DEBU[0193] [hostagent] stdout="", stderr="+ sock=/run/lima-guestagent.sock\n+ timeout 30s bash -c 'until [ -S \"/run/lima-guestagent.sock\" ]; do sleep 3; done'\n", err=<nil> 
INFO[0193] [hostagent] The essential requirement 3 of 3 is satisfied 
INFO[0193] [hostagent] Waiting for the optional requirement 1 of 2: "systemd must be available" 
DEBU[0193] [hostagent] executing script "systemd must be available" 
DEBU[0193] [hostagent] Forwarding unix sockets          
DEBU[0193] [hostagent] executing ssh for script "systemd must be available": /usr/bin/ssh [ssh -F /dev/null -o IdentityFile="/Users/chasan/.lima/_config/user" -o IdentityFile="/Users/chasan/.ssh/id_rsa" -o IdentityFile="/Users/chasan/.ssh/id_rsa_git" -o IdentityFile="/Users/chasan/.ssh/podman-machine-default" -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o NoHostAuthenticationForLocalhost=yes -o GSSAPIAuthentication=no -o PreferredAuthentications=publickey -o Compression=no -o BatchMode=yes -o IdentitiesOnly=yes -o Ciphers="^aes128-gcm@openssh.com,aes256-gcm@openssh.com" -o User=chasan -o ControlMaster=auto -o ControlPath="/Users/chasan/.lima/default/ssh.sock" -o ControlPersist=yes -p 60022 127.0.0.1 -- /bin/bash] 
INFO[0193] [hostagent] Forwarding "/run/lima-guestagent.sock" (guest) to "/Users/chasan/.lima/default/ga.sock" (host) 
DEBU[0193] [hostagent] stdout="", stderr="+ command -v systemctl\n", err=<nil> 
INFO[0193] [hostagent] The optional requirement 1 of 2 is satisfied 
DEBU[0193] [hostagent] guest agent info: &{LocalPorts:[{IP::: Port:22} {IP:127.0.0.54 Port:53} {IP:127.0.0.53 Port:53}]} 
INFO[0193] [hostagent] Waiting for the optional requirement 2 of 2: "containerd binaries to be installed" 
DEBU[0193] [hostagent] executing script "containerd binaries to be installed" 
DEBU[0193] [hostagent] guest agent event: {Time:2023-10-27 11:20:08.872640988 +0000 UTC LocalPortsAdded:[{IP:127.0.0.54 Port:53} {IP:127.0.0.53 Port:53} {IP::: Port:22}] LocalPortsRemoved:[] Errors:[]} 
INFO[0193] [hostagent] Not forwarding TCP 127.0.0.54:53 
DEBU[0193] [hostagent] executing ssh for script "containerd binaries to be installed": /usr/bin/ssh [ssh -F /dev/null -o IdentityFile="/Users/chasan/.lima/_config/user" -o IdentityFile="/Users/chasan/.ssh/id_rsa" -o IdentityFile="/Users/chasan/.ssh/id_rsa_git" -o IdentityFile="/Users/chasan/.ssh/podman-machine-default" -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o NoHostAuthenticationForLocalhost=yes -o GSSAPIAuthentication=no -o PreferredAuthentications=publickey -o Compression=no -o BatchMode=yes -o IdentitiesOnly=yes -o Ciphers="^aes128-gcm@openssh.com,aes256-gcm@openssh.com" -o User=chasan -o ControlMaster=auto -o ControlPath="/Users/chasan/.lima/default/ssh.sock" -o ControlPersist=yes -p 60022 127.0.0.1 -- /bin/bash] 
INFO[0193] [hostagent] Not forwarding TCP 127.0.0.53:53 
INFO[0193] [hostagent] Not forwarding TCP [::]:22       
DEBU[0205] [hostagent] stdout="/usr/local/bin/nerdctl\n", stderr="+ timeout 30s bash -c 'until command -v nerdctl || test -x /usr/local/bin/nerdctl; do sleep 3; done'\n", err=<nil> 
INFO[0205] [hostagent] The optional requirement 2 of 2 is satisfied 
INFO[0205] [hostagent] Waiting for the final requirement 1 of 1: "boot scripts must have finished" 
DEBU[0205] [hostagent] executing script "boot scripts must have finished" 
DEBU[0205] [hostagent] executing ssh for script "boot scripts must have finished": /usr/bin/ssh [ssh -F /dev/null -o IdentityFile="/Users/chasan/.lima/_config/user" -o IdentityFile="/Users/chasan/.ssh/id_rsa" -o IdentityFile="/Users/chasan/.ssh/id_rsa_git" -o IdentityFile="/Users/chasan/.ssh/podman-machine-default" -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o NoHostAuthenticationForLocalhost=yes -o GSSAPIAuthentication=no -o PreferredAuthentications=publickey -o Compression=no -o BatchMode=yes -o IdentitiesOnly=yes -o Ciphers="^aes128-gcm@openssh.com,aes256-gcm@openssh.com" -o User=chasan -o ControlMaster=auto -o ControlPath="/Users/chasan/.lima/default/ssh.sock" -o ControlPersist=yes -p 60022 127.0.0.1 -- /bin/bash] 
DEBU[0215] [hostagent] stdout="", stderr="+ timeout 30s bash -c 'until sudo diff -q /run/lima-boot-done /mnt/lima-cidata/meta-data 2>/dev/null; do sleep 3; done'\n", err=<nil> 
INFO[0215] [hostagent] The final requirement 1 of 1 is satisfied 
DEBU[0215] received an event                             event="{2023-10-27 16:50:30.072711 +0530 IST {true false false [] 60022}}"
INFO[0215] READY. Run `lima` to open the shell.         
(vz-default) lima-vm-lima> 
(vz-default) lima-vm-lima> 
(vz-default) lima-vm-lima> limactl ls --json default | jq -r .vmType
vz
(vz-default) lima-vm-lima>
```
hasan4791: ```
(vz-default) lima-vm-lima> limactl --debug start --mount-type 9p
DEBU[0000] Evaluating yq expression: ".mountType = \"9p\"" 
? Creating an instance "default" Proceed with the current configuration
DEBU[0001] ResolveVMType: resolved VMType "qemu" (mountType="9p" is specified in []*LimaYAML{o,y,d}[1]) 
WARN[0001] `mountType: 9p` is experimental              
DEBU[0001] ResolveVMType: resolved VMType "qemu" (mountType="9p" is specified in []*LimaYAML{o,y,d}[1]) 
DEBU[0001] ResolveVMType: resolved VMType "qemu" (mountType="9p" is specified in []*LimaYAML{o,y,d}[1]) 
DEBU[0001] ResolveVMType: resolved VMType "qemu" (mountType="9p" is specified in []*LimaYAML{o,y,d}[1]) 
DEBU[0001] ResolveVMType: resolved VMType "vz" (explicitly specified in []*LimaYAML{o,y,d}[1]) 
DEBU[0001] ResolveVMType: resolved VMType "vz" (explicitly specified in []*LimaYAML{o,y,d}[1]) 
DEBU[0001] ResolveVMType: resolved VMType "qemu" (existing instance, without "/Users/chasan/.lima/podman-rootful-x86/vz-identifier") 
DEBU[0001] ResolveVMType: resolved VMType "qemu" (existing instance, without "/Users/chasan/.lima/test/vz-identifier") 
DEBU[0001] ResolveVMType: resolved VMType "vz" (explicitly specified in []*LimaYAML{o,y,d}[1]) 
DEBU[0001] Make sure "user-v2" network is stopped       
DEBU[0001] Make sure usernet network is stopped         
DEBU[0001] Make sure "shared" network is stopped        
DEBU[0001] Make sure "bridged" network is stopped       
DEBU[0001] Make sure "host" network is stopped          
INFO[0001] Starting the instance "default" with VM driver "qemu" 
DEBU[0001] Executed [codesign --verify /opt/homebrew/bin/qemu-system-aarch64]: out=""  error="<nil>"
DEBU[0001] Executed [codesign --display --entitlements - --xml /opt/homebrew/bin/qemu-system-aarch64]: out="Executable=/opt/homebrew/Cellar/qemu/8.1.1/bin/qemu-system-aarch64\n<?xml version=\"1.0\" encoding=\"UTF-8\"?><!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"https://www.apple.com/DTDs/PropertyList-1.0.dtd\"><plist version=\"1.0\"><dict><key>com.apple.security.hypervisor</key><true/></dict></plist>\n"  error="<nil>"
INFO[0001] QEMU binary "/opt/homebrew/bin/qemu-system-aarch64" seems properly signed with the "com.apple.security.hypervisor" entitlement 
DEBU[0001] ResolveVMType: resolved VMType "qemu" (mountType="9p" is specified in []*LimaYAML{o,y,d}[1]) 
INFO[0001] Attempting to download the image              arch=aarch64 digest="sha256:78d35a2f551d281912ee7e5202660d94d713aa1b5de86a17e261328cc2f093d4" location="https://cloud-images.ubuntu.com/releases/23.10/release-20231011/ubuntu-23.10-server-cloudimg-arm64.img"
DEBU[0001] file "/Users/chasan/.lima/default/basedisk" is cached as "/Users/chasan/Library/Caches/lima/download/by-url-sha256/aaadf19ec428e9ce95eb976df0ab7dc6b76e4537c681aadf637892e49b0c6b95/data" 
DEBU[0001] Comparing digest "sha256:78d35a2f551d281912ee7e5202660d94d713aa1b5de86a17e261328cc2f093d4" with the cached digest file "/Users/chasan/Library/Caches/lima/download/by-url-sha256/aaadf19ec428e9ce95eb976df0ab7dc6b76e4537c681aadf637892e49b0c6b95/sha256.digest", not computing the actual digest of "/Users/chasan/Library/Caches/lima/download/by-url-sha256/aaadf19ec428e9ce95eb976df0ab7dc6b76e4537c681aadf637892e49b0c6b95/data" 
DEBU[0001] res.ValidatedDigest=true                     
INFO[0001] Using cache "/Users/chasan/Library/Caches/lima/download/by-url-sha256/aaadf19ec428e9ce95eb976df0ab7dc6b76e4537c681aadf637892e49b0c6b95/data" 
INFO[0001] Attempting to download the nerdctl archive    arch=aarch64 digest="sha256:ea30ab544c057e3a0457194ecd273ffbce58067de534bdfaffe4edf3a4da6357" location="https://github.com/containerd/nerdctl/releases/download/v1.6.2/nerdctl-full-1.6.2-linux-arm64.tar.gz"
DEBU[0001] file "" is cached as "/Users/chasan/Library/Caches/lima/download/by-url-sha256/21921213c0426e38e2f26d2844446767e2a19c0b6655c774f9e4adbb5c368d8f/data" 
DEBU[0001] Comparing digest "sha256:ea30ab544c057e3a0457194ecd273ffbce58067de534bdfaffe4edf3a4da6357" with the cached digest file "/Users/chasan/Library/Caches/lima/download/by-url-sha256/21921213c0426e38e2f26d2844446767e2a19c0b6655c774f9e4adbb5c368d8f/sha256.digest", not computing the actual digest of "/Users/chasan/Library/Caches/lima/download/by-url-sha256/21921213c0426e38e2f26d2844446767e2a19c0b6655c774f9e4adbb5c368d8f/data" 
DEBU[0001] res.ValidatedDigest=true                     
INFO[0001] Using cache "/Users/chasan/Library/Caches/lima/download/by-url-sha256/21921213c0426e38e2f26d2844446767e2a19c0b6655c774f9e4adbb5c368d8f/data" 
DEBU[0001] [hostagent] ResolveVMType: resolved VMType "qemu" (existing instance, without "/Users/chasan/.lima/default/vz-identifier") 
DEBU[0001] [hostagent] ResolveVMType: resolved VMType "qemu" (existing instance, without "/Users/chasan/.lima/default/vz-identifier") 
DEBU[0002] [hostagent] Creating iso file /Users/chasan/.lima/default/cidata.iso 
DEBU[0002] [hostagent] Using /var/folders/11/07zj9vzj4hq4j9y3kjk4dhg80000gn/T/diskfs_iso4038845048 as workspace 
DEBU[0002] [hostagent] Failed to detect CPU features. Assuming that AES acceleration is available on this Apple silicon. 
DEBU[0002] [hostagent] OpenSSH version 9.4.1 detected   
DEBU[0002] [hostagent] AES accelerator seems available, prioritizing aes128-gcm@openssh.com and aes256-gcm@openssh.com 
INFO[0002] [hostagent] hostagent socket created at /Users/chasan/.lima/default/ha.sock 
DEBU[0002] [hostagent] Start udp DNS listening on: 127.0.0.1:49224 
DEBU[0002] [hostagent] Start tcp DNS listening on: 127.0.0.1:64661 
DEBU[0002] [hostagent] QEMU version 8.1.1 detected      
DEBU[0002] [hostagent] firmware candidates = [/Users/chasan/.local/share/qemu/edk2-aarch64-code.fd /opt/homebrew/share/qemu/edk2-aarch64-code.fd /usr/share/AAVMF/AAVMF_CODE.fd /usr/share/qemu-efi-aarch64/QEMU_EFI.fd] 
INFO[0002] [hostagent] Starting QEMU (hint: to watch the boot progress, see "/Users/chasan/.lima/default/serial*.log") 
DEBU[0002] [hostagent] qCmd.Args: [/opt/homebrew/bin/qemu-system-aarch64 -m 4096 -cpu host -machine virt,accel=hvf -smp 4,sockets=1,cores=4,threads=1 -drive if=pflash,format=raw,readonly=on,file=/opt/homebrew/share/qemu/edk2-aarch64-code.fd -boot order=c,splash-time=0,menu=on -drive file=/Users/chasan/.lima/default/diffdisk,if=virtio,discard=on -drive id=cdrom0,if=none,format=raw,readonly=on,file=/Users/chasan/.lima/default/cidata.iso -device virtio-scsi-pci,id=scsi0 -device scsi-cd,bus=scsi0.0,drive=cdrom0 -netdev user,id=net0,net=192.168.5.0/24,dhcpstart=192.168.5.15,hostfwd=tcp:127.0.0.1:60022-:22 -device virtio-net-pci,netdev=net0,mac=52:55:55:ca:83:9e -device virtio-rng-pci -display none -device virtio-gpu -device virtio-keyboard-pci -device virtio-mouse-pci -device qemu-xhci,id=usb-bus -parallel none -chardev socket,id=char-serial,path=/Users/chasan/.lima/default/serial.sock,server=on,wait=off,logfile=/Users/chasan/.lima/default/serial.log -serial chardev:char-serial -chardev socket,id=char-serial-pci,path=/Users/chasan/.lima/default/serialp.sock,server=on,wait=off,logfile=/Users/chasan/.lima/default/serialp.log -device pci-serial,chardev=char-serial-pci -chardev socket,id=char-serial-virtio,path=/Users/chasan/.lima/default/serialv.sock,server=on,wait=off,logfile=/Users/chasan/.lima/default/serialv.log -device virtio-serial-pci,id=virtio-serial0,max_ports=1 -device virtconsole,chardev=char-serial-virtio,id=console0 -virtfs local,mount_tag=mount0,path=/Users/chasan,security_model=none,readonly -virtfs local,mount_tag=mount1,path=/tmp/lima,security_model=none -chardev socket,id=char-qmp,path=/Users/chasan/.lima/default/qmp.sock,server=on,wait=off -qmp chardev:char-qmp -name lima-default -pidfile /Users/chasan/.lima/default/qemu.pid] 
DEBU[0002] received an event                             event="{2023-10-27 17:00:36.442189 +0530 IST {false false false [] 60022}}"
INFO[0002] SSH Local Port: 60022                        
INFO[0002] [hostagent] Waiting for the essential requirement 1 of 3: "ssh" 
DEBU[0002] [hostagent] executing script "ssh"           
DEBU[0002] [hostagent] executing ssh for script "ssh": /usr/bin/ssh [ssh -F /dev/null -o IdentityFile="/Users/chasan/.lima/_config/user" -o IdentityFile="/Users/chasan/.ssh/id_rsa" -o IdentityFile="/Users/chasan/.ssh/id_rsa_git" -o IdentityFile="/Users/chasan/.ssh/podman-machine-default" -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o NoHostAuthenticationForLocalhost=yes -o GSSAPIAuthentication=no -o PreferredAuthentications=publickey -o Compression=no -o BatchMode=yes -o IdentitiesOnly=yes -o Ciphers="^aes128-gcm@openssh.com,aes256-gcm@openssh.com" -o User=chasan -o ControlMaster=auto -o ControlPath="/Users/chasan/.lima/default/ssh.sock" -o ControlPersist=yes -p 60022 127.0.0.1 -- /bin/bash] 
DEBU[0002] [hostagent] qemu[stderr]: qemu-system-aarch64: -virtfs local,mount_tag=mount0,path=/Users/chasan,security_model=none,readonly: warning: short-form boolean option 'readonly' deprecated 
DEBU[0002] [hostagent] qemu[stderr]: Please use readonly=on instead 
DEBU[0002] [hostagent] stdout="", stderr="ssh: connect to host 127.0.0.1 port 60022: Connection refused\r\n", err=failed to execute script "ssh": stdout="", stderr="ssh: connect to host 127.0.0.1 port 60022: Connection refused\r\n": exit status 255 
INFO[0012] [hostagent] Waiting for the essential requirement 1 of 3: "ssh" 
DEBU[0012] [hostagent] executing script "ssh"           
DEBU[0012] [hostagent] executing ssh for script "ssh": /usr/bin/ssh [ssh -F /dev/null -o IdentityFile="/Users/chasan/.lima/_config/user" -o IdentityFile="/Users/chasan/.ssh/id_rsa" -o IdentityFile="/Users/chasan/.ssh/id_rsa_git" -o IdentityFile="/Users/chasan/.ssh/podman-machine-default" -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o NoHostAuthenticationForLocalhost=yes -o GSSAPIAuthentication=no -o PreferredAuthentications=publickey -o Compression=no -o BatchMode=yes -o IdentitiesOnly=yes -o Ciphers="^aes128-gcm@openssh.com,aes256-gcm@openssh.com" -o User=chasan -o ControlMaster=auto -o ControlPath="/Users/chasan/.lima/default/ssh.sock" -o ControlPersist=yes -p 60022 127.0.0.1 -- /bin/bash] 
DEBU[0013] [hostagent] stdout="", stderr="\"System is booting up. Unprivileged users are not permitted to log in yet. Please come back later. For technical details, see pam_nologin(8).\"\nConnection closed by 127.0.0.1 port 60022\r\n", err=failed to execute script "ssh": stdout="", stderr="\"System is booting up. Unprivileged users are not permitted to log in yet. Please come back later. For technical details, see pam_nologin(8).\"\nConnection closed by 127.0.0.1 port 60022\r\n": exit status 255 
INFO[0023] [hostagent] Waiting for the essential requirement 1 of 3: "ssh" 
DEBU[0023] [hostagent] executing script "ssh"           
DEBU[0023] [hostagent] executing ssh for script "ssh": /usr/bin/ssh [ssh -F /dev/null -o IdentityFile="/Users/chasan/.lima/_config/user" -o IdentityFile="/Users/chasan/.ssh/id_rsa" -o IdentityFile="/Users/chasan/.ssh/id_rsa_git" -o IdentityFile="/Users/chasan/.ssh/podman-machine-default" -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o NoHostAuthenticationForLocalhost=yes -o GSSAPIAuthentication=no -o PreferredAuthentications=publickey -o Compression=no -o BatchMode=yes -o IdentitiesOnly=yes -o Ciphers="^aes128-gcm@openssh.com,aes256-gcm@openssh.com" -o User=chasan -o ControlMaster=auto -o ControlPath="/Users/chasan/.lima/default/ssh.sock" -o ControlPersist=yes -p 60022 127.0.0.1 -- /bin/bash] 
DEBU[0023] [hostagent] stdout="", stderr="\"System is booting up. Unprivileged users are not permitted to log in yet. Please come back later. For technical details, see pam_nologin(8).\"\nConnection closed by 127.0.0.1 port 60022\r\n", err=failed to execute script "ssh": stdout="", stderr="\"System is booting up. Unprivileged users are not permitted to log in yet. Please come back later. For technical details, see pam_nologin(8).\"\nConnection closed by 127.0.0.1 port 60022\r\n": exit status 255 
INFO[0033] [hostagent] Waiting for the essential requirement 1 of 3: "ssh" 
DEBU[0033] [hostagent] executing script "ssh"           
DEBU[0033] [hostagent] executing ssh for script "ssh": /usr/bin/ssh [ssh -F /dev/null -o IdentityFile="/Users/chasan/.lima/_config/user" -o IdentityFile="/Users/chasan/.ssh/id_rsa" -o IdentityFile="/Users/chasan/.ssh/id_rsa_git" -o IdentityFile="/Users/chasan/.ssh/podman-machine-default" -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o NoHostAuthenticationForLocalhost=yes -o GSSAPIAuthentication=no -o PreferredAuthentications=publickey -o Compression=no -o BatchMode=yes -o IdentitiesOnly=yes -o Ciphers="^aes128-gcm@openssh.com,aes256-gcm@openssh.com" -o User=chasan -o ControlMaster=auto -o ControlPath="/Users/chasan/.lima/default/ssh.sock" -o ControlPersist=yes -p 60022 127.0.0.1 -- /bin/bash] 
DEBU[0033] [hostagent] handleQuery lookup SRV failed    
DEBU[0034] [hostagent] stdout="", stderr="", err=<nil>  
INFO[0034] [hostagent] The essential requirement 1 of 3 is satisfied 
INFO[0034] [hostagent] Waiting for the essential requirement 2 of 3: "user session is ready for ssh" 
DEBU[0034] [hostagent] executing script "user session is ready for ssh" 
DEBU[0034] [hostagent] executing ssh for script "user session is ready for ssh": /usr/bin/ssh [ssh -F /dev/null -o IdentityFile="/Users/chasan/.lima/_config/user" -o IdentityFile="/Users/chasan/.ssh/id_rsa" -o IdentityFile="/Users/chasan/.ssh/id_rsa_git" -o IdentityFile="/Users/chasan/.ssh/podman-machine-default" -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o NoHostAuthenticationForLocalhost=yes -o GSSAPIAuthentication=no -o PreferredAuthentications=publickey -o Compression=no -o BatchMode=yes -o IdentitiesOnly=yes -o Ciphers="^aes128-gcm@openssh.com,aes256-gcm@openssh.com" -o User=chasan -o ControlMaster=auto -o ControlPath="/Users/chasan/.lima/default/ssh.sock" -o ControlPersist=yes -p 60022 127.0.0.1 -- /bin/bash] 
DEBU[0034] [hostagent] stdout="", stderr="+ timeout 30s bash -c 'until sudo diff -q /run/lima-ssh-ready /mnt/lima-cidata/meta-data 2>/dev/null; do sleep 3; done'\n", err=<nil> 
INFO[0034] [hostagent] The essential requirement 2 of 3 is satisfied 
INFO[0034] [hostagent] Waiting for the essential requirement 3 of 3: "the guest agent to be running" 
DEBU[0034] [hostagent] executing script "the guest agent to be running" 
DEBU[0034] [hostagent] executing ssh for script "the guest agent to be running": /usr/bin/ssh [ssh -F /dev/null -o IdentityFile="/Users/chasan/.lima/_config/user" -o IdentityFile="/Users/chasan/.ssh/id_rsa" -o IdentityFile="/Users/chasan/.ssh/id_rsa_git" -o IdentityFile="/Users/chasan/.ssh/podman-machine-default" -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o NoHostAuthenticationForLocalhost=yes -o GSSAPIAuthentication=no -o PreferredAuthentications=publickey -o Compression=no -o BatchMode=yes -o IdentitiesOnly=yes -o Ciphers="^aes128-gcm@openssh.com,aes256-gcm@openssh.com" -o User=chasan -o ControlMaster=auto -o ControlPath="/Users/chasan/.lima/default/ssh.sock" -o ControlPersist=yes -p 60022 127.0.0.1 -- /bin/bash] 
DEBU[0034] [hostagent] stdout="", stderr="+ sock=/run/lima-guestagent.sock\n+ timeout 30s bash -c 'until [ -S \"/run/lima-guestagent.sock\" ]; do sleep 3; done'\n", err=<nil> 
INFO[0034] [hostagent] The essential requirement 3 of 3 is satisfied 
INFO[0034] [hostagent] Waiting for the optional requirement 1 of 2: "systemd must be available" 
DEBU[0034] [hostagent] executing script "systemd must be available" 
DEBU[0034] [hostagent] Forwarding unix sockets          
DEBU[0034] [hostagent] executing ssh for script "systemd must be available": /usr/bin/ssh [ssh -F /dev/null -o IdentityFile="/Users/chasan/.lima/_config/user" -o IdentityFile="/Users/chasan/.ssh/id_rsa" -o IdentityFile="/Users/chasan/.ssh/id_rsa_git" -o IdentityFile="/Users/chasan/.ssh/podman-machine-default" -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o NoHostAuthenticationForLocalhost=yes -o GSSAPIAuthentication=no -o PreferredAuthentications=publickey -o Compression=no -o BatchMode=yes -o IdentitiesOnly=yes -o Ciphers="^aes128-gcm@openssh.com,aes256-gcm@openssh.com" -o User=chasan -o ControlMaster=auto -o ControlPath="/Users/chasan/.lima/default/ssh.sock" -o ControlPersist=yes -p 60022 127.0.0.1 -- /bin/bash] 
INFO[0034] [hostagent] Forwarding "/run/lima-guestagent.sock" (guest) to "/Users/chasan/.lima/default/ga.sock" (host) 
DEBU[0034] [hostagent] stdout="", stderr="+ command -v systemctl\n", err=<nil> 
INFO[0034] [hostagent] The optional requirement 1 of 2 is satisfied 
DEBU[0034] [hostagent] guest agent info: &{LocalPorts:[{IP::: Port:22} {IP:127.0.0.54 Port:53} {IP:127.0.0.53 Port:53}]} 
INFO[0034] [hostagent] Waiting for the optional requirement 2 of 2: "containerd binaries to be installed" 
DEBU[0034] [hostagent] executing script "containerd binaries to be installed" 
DEBU[0034] [hostagent] guest agent event: {Time:2023-10-27 11:31:07.934438501 +0000 UTC LocalPortsAdded:[{IP:127.0.0.54 Port:53} {IP:127.0.0.53 Port:53} {IP::: Port:22}] LocalPortsRemoved:[] Errors:[]} 
INFO[0034] [hostagent] Not forwarding TCP 127.0.0.54:53 
DEBU[0034] [hostagent] executing ssh for script "containerd binaries to be installed": /usr/bin/ssh [ssh -F /dev/null -o IdentityFile="/Users/chasan/.lima/_config/user" -o IdentityFile="/Users/chasan/.ssh/id_rsa" -o IdentityFile="/Users/chasan/.ssh/id_rsa_git" -o IdentityFile="/Users/chasan/.ssh/podman-machine-default" -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o NoHostAuthenticationForLocalhost=yes -o GSSAPIAuthentication=no -o PreferredAuthentications=publickey -o Compression=no -o BatchMode=yes -o IdentitiesOnly=yes -o Ciphers="^aes128-gcm@openssh.com,aes256-gcm@openssh.com" -o User=chasan -o ControlMaster=auto -o ControlPath="/Users/chasan/.lima/default/ssh.sock" -o ControlPersist=yes -p 60022 127.0.0.1 -- /bin/bash] 
INFO[0034] [hostagent] Not forwarding TCP 127.0.0.53:53 
INFO[0034] [hostagent] Not forwarding TCP [::]:22       
DEBU[0036] [hostagent] handleQuery lookup SRV failed    
DEBU[0046] [hostagent] stdout="/usr/local/bin/nerdctl\n", stderr="+ timeout 30s bash -c 'until command -v nerdctl || test -x /usr/local/bin/nerdctl; do sleep 3; done'\n", err=<nil> 
INFO[0046] [hostagent] The optional requirement 2 of 2 is satisfied 
INFO[0046] [hostagent] Waiting for the final requirement 1 of 1: "boot scripts must have finished" 
DEBU[0046] [hostagent] executing script "boot scripts must have finished" 
DEBU[0046] [hostagent] executing ssh for script "boot scripts must have finished": /usr/bin/ssh [ssh -F /dev/null -o IdentityFile="/Users/chasan/.lima/_config/user" -o IdentityFile="/Users/chasan/.ssh/id_rsa" -o IdentityFile="/Users/chasan/.ssh/id_rsa_git" -o IdentityFile="/Users/chasan/.ssh/podman-machine-default" -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o NoHostAuthenticationForLocalhost=yes -o GSSAPIAuthentication=no -o PreferredAuthentications=publickey -o Compression=no -o BatchMode=yes -o IdentitiesOnly=yes -o Ciphers="^aes128-gcm@openssh.com,aes256-gcm@openssh.com" -o User=chasan -o ControlMaster=auto -o ControlPath="/Users/chasan/.lima/default/ssh.sock" -o ControlPersist=yes -p 60022 127.0.0.1 -- /bin/bash] 
DEBU[0058] [hostagent] stdout="", stderr="+ timeout 30s bash -c 'until sudo diff -q /run/lima-boot-done /mnt/lima-cidata/meta-data 2>/dev/null; do sleep 3; done'\n", err=<nil> 
INFO[0058] [hostagent] The final requirement 1 of 1 is satisfied 
DEBU[0058] received an event                             event="{2023-10-27 17:01:32.011059 +0530 IST {true false false [] 60022}}"
INFO[0058] READY. Run `lima` to open the shell.         
(vz-default) lima-vm-lima>
```
AkihiroSuda: Thanks @hasan4791 , so, is it working as expected?
hasan4791: > Thanks @hasan4791 , so, is it working as expected?

Yes. 
pmalek: While this only flips what's the default, @AkihiroSuda can we first solve https://github.com/lima-vm/lima/issues/1940?
AkihiroSuda: Split trivial parts into:
- https://github.com/lima-vm/lima/pull/1968
chancez: Might also be worth waiting for https://github.com/lima-vm/lima/issues/1957 to be mitigated or resolved
jandubois: > Might also be worth waiting for #1957 to be mitigated or resolved

I think that is the plan to delay the 1.0 release until VZ can safely become the default.

Unfortunately this has become even more complex with QEMU seemingly broken on Apple M3 chips #1996. So people with a brand new machine currently have no choice than to switch to VZ.
EdwardMoyse: > Might also be worth waiting for #1957 to be mitigated or resolved

Just to clarify that despite the title (which I now changed) this was not specific to vz, and we also got corruption with qemu
AkihiroSuda: @lima-vm/maintainers Are we in a good state to merge this? (after rebasing)

AkihiroSuda: Finch is going to switch the default to vz soon
- https://github.com/runfinch/finch/pull/956
afbjorklund: Podman Machine VM changed from qemu to vz (through their own [vfkit](https://github.com/crc-org/vfkit) wrapper), in 5.0:

https://blog.podman.io/2024/03/podman-5-0-is-around-the-corner/ (v5.0.0 tagged Mar 19)
AkihiroSuda: Rebased.
If we can merge this, the next release will be v1.0 (with a few beta/RC releases)

@lima-vm/maintainers PTAL.

Patch:
diff --git a/cmd/limactl/editflags/editflags.go b/cmd/limactl/editflags/editflags.go
index c2dffda4..fc509548 100644
--- a/cmd/limactl/editflags/editflags.go
+++ b/cmd/limactl/editflags/editflags.go
@@ -196,7 +196,7 @@ func YQExpressions(flags *flag.FlagSet, newInstance bool) ([]string, error) {
 				return fmt.Sprintf(".rosetta.enabled = %v | .rosetta.binfmt = %v", b, b), nil
 			},
 			false,
-			true,
+			false,
 		},
 		{"set", d("%s"), false, false},
 		{
diff --git a/examples/default.yaml b/examples/default.yaml
index 083b9018..4df63956 100644
--- a/examples/default.yaml
+++ b/examples/default.yaml
@@ -5,10 +5,10 @@
 # Default values in this YAML file are specified by `null` instead of Lima's "builtin default" values,
 # so they can be overridden by the $LIMA_HOME/_config/default.yaml mechanism documented at the end of this file.
 
-# VM type: "qemu" or "vz" (on macOS 13 and later).
+# VM type: "qemu", "vz" (on macOS 13 and later), or "default".
 # The vmType can be specified only on creating the instance.
 # The vmType of existing instances cannot be changed.
-# 🟢 Builtin default: "qemu"
+# 🟢 Builtin default: "vz" (on macOS 13.5 and later), "qemu" (on others)
 vmType: null
 
 # OS: "Linux".
@@ -99,7 +99,7 @@ mounts:
   writable: true
 
 # Mount type for above mounts, such as "reverse-sshfs" (from sshocker), "9p" (EXPERIMENTAL, from QEMU’s virtio-9p-pci, aka virtfs),
-# or "virtiofs" (EXPERIMENTAL, needs `vmType: vz`)
+# or "virtiofs" (EXPERIMENTAL, needs `vmType: vz`; will graduate from experimental in Lima v1.0)
 # 🟢 Builtin default: "reverse-sshfs" (for QEMU), "virtiofs" (for vz)
 mountType: null
 
@@ -267,7 +267,7 @@ cpuType:
   # x86_64: "qemu64" # (or "host,-pdpe1gb" when running on x86_64 host)
 
 rosetta:
-  # Enable Rosetta for Linux (EXPERIMENTAL).
+  # Enable Rosetta for Linux (EXPERIMENTAL; will graduate from experimental in Lima v1.0).
   # Hint: try `softwareupdate --install-rosetta` if Lima gets stuck at `Installing rosetta...`
   # 🟢 Builtin default: false
   enabled: null
@@ -281,7 +281,7 @@ rosetta:
 timezone: null
 
 firmware:
-  # Use legacy BIOS instead of UEFI. Ignored for aarch64.
+  # Use legacy BIOS instead of UEFI. Ignored for aarch64 and vz.
   # 🟢 Builtin default: false
   legacyBIOS: null
 #  # Override UEFI images
@@ -343,7 +343,7 @@ networks:
 
 
 # The "vzNAT" IP address is accessible from the host, but not from other guests.
-# Needs `vmType: vz` (EXPERIMENTAL).
+# Needs `vmType: vz` (EXPERIMENTAL; will graduate from experimental in Lima v1.0).
 # - vzNAT: true
 
 # Port forwarding rules. Forwarding between ports 22 and ssh.localPort cannot be overridden.
diff --git a/examples/experimental/vz.yaml b/examples/experimental/vz.yaml
index 6af217ed..8620a8d1 100644
--- a/examples/experimental/vz.yaml
+++ b/examples/experimental/vz.yaml
@@ -1,3 +1,11 @@
+# ⚠️ ⚠️ ⚠️ `template://experimental/vz` will be removed in Lima v1.0,
+# as vz will graduate from experimental and will be the default vmType.
+#
+# For Lima v1.0 and later, use the following command instead:
+# ```
+# limactl create template://default
+# ```
+
 # A template to run ubuntu using vmType: vz instead of qemu (Default)
 # This template requires Lima v0.14.0 or later and macOS 13.
 vmType: "vz"
diff --git a/pkg/limayaml/defaults.go b/pkg/limayaml/defaults.go
index f69a320f..160cb978 100644
--- a/pkg/limayaml/defaults.go
+++ b/pkg/limayaml/defaults.go
@@ -3,6 +3,7 @@ package limayaml
 import (
 	"bytes"
 	"crypto/sha256"
+	"errors"
 	"fmt"
 	"net"
 	"os"
@@ -13,6 +14,7 @@ import (
 	"strings"
 	"text/template"
 
+	"github.com/coreos/go-semver/semver"
 	"github.com/docker/go-units"
 	"github.com/pbnjay/memory"
 	"github.com/sirupsen/logrus"
@@ -178,7 +180,7 @@ func FillDefault(y, d, o *LimaYAML, filePath string) {
 	if o.VMType != nil {
 		y.VMType = o.VMType
 	}
-	y.VMType = ptr.Of(ResolveVMType(y.VMType))
+	y.VMType = ptr.Of(ResolveVMType(y, d, o, filePath))
 	if y.OS == nil {
 		y.OS = d.OS
 	}
@@ -924,11 +926,96 @@ func NewVMType(driver string) VMType {
 	}
 }
 
-func ResolveVMType(s *string) VMType {
-	if s == nil || *s == "" || *s == "default" {
+func isExistingInstanceDir(dir string) bool {
+	// existence of "lima.yaml" does not signify existence of the instance,
+	// because the file is created during the initialization of the instance.
+	for _, f := range []string{
+		filenames.HostAgentStdoutLog, filenames.HostAgentStderrLog,
+		filenames.VzIdentifier, filenames.BaseDisk, filenames.DiffDisk, filenames.CIDataISO,
+	} {
+		file := filepath.Join(dir, f)
+		if _, err := os.Lstat(file); !errors.Is(err, os.ErrNotExist) {
+			return true
+		}
+	}
+	return false
+}
+
+func ResolveVMType(y, d, o *LimaYAML, filePath string) VMType {
+	// Check if the VMType is explicitly specified
+	for i, f := range []*LimaYAML{o, y, d} {
+		if f.VMType != nil && *f.VMType != "" && *f.VMType != "default" {
+			logrus.Debugf("ResolveVMType: resolved VMType %q (explicitly specified in []*LimaYAML{o,y,d}[%d])", *f.VMType, i)
+			return NewVMType(*f.VMType)
+		}
+	}
+
+	// If this is an existing instance, guess the VMType from the contents of the instance directory.
+	if dir, basename := filepath.Split(filePath); dir != "" && basename == filenames.LimaYAML && isExistingInstanceDir(dir) {
+		vzIdentifier := filepath.Join(dir, filenames.VzIdentifier) // since Lima v0.14
+		if _, err := os.Lstat(vzIdentifier); !errors.Is(err, os.ErrNotExist) {
+			logrus.Debugf("ResolveVMType: resolved VMType %q (existing instance, with %q)", VZ, vzIdentifier)
+			return VZ
+		}
+		logrus.Debugf("ResolveVMType: resolved VMType %q (existing instance, without %q)", QEMU, vzIdentifier)
+		return QEMU
+	}
+
+	// Resolve the best type, depending on GOOS
+	switch runtime.GOOS {
+	case "darwin":
+		macOSProductVersion, err := osutil.ProductVersion()
+		if err != nil {
+			logrus.WithError(err).Warn("Failed to get macOS product version")
+			logrus.Debugf("ResolveVMType: resolved VMType %q (default for unknown version of macOS)", QEMU)
+			return QEMU
+		}
+		// Virtualization.framework in macOS prior to 13.5 could not boot Linux kernel v6.2 on Intel
+		// https://github.com/lima-vm/lima/issues/1577
+		if macOSProductVersion.LessThan(*semver.New("13.5.0")) {
+			logrus.Debugf("ResolveVMType: resolved VMType %q (default for macOS prior to 13.5)", QEMU)
+			return QEMU
+		}
+		// Use QEMU if the config depends on QEMU
+		for i, f := range []*LimaYAML{o, y, d} {
+			if f.Arch != nil && !IsNativeArch(*f.Arch) {
+				logrus.Debugf("ResolveVMType: resolved VMType %q (non-native arch=%q is specified in []*LimaYAML{o,y,d}[%d])", QEMU, *f.Arch, i)
+				return QEMU
+			}
+			if f.Firmware.LegacyBIOS != nil && *f.Firmware.LegacyBIOS {
+				logrus.Debugf("ResolveVMType: resolved VMType %q (firmware.legacyBIOS is specified in []*LimaYAML{o,y,d}[%d])", QEMU, i)
+				return QEMU
+			}
+			if f.MountType != nil && *f.MountType == NINEP {
+				logrus.Debugf("ResolveVMType: resolved VMType %q (mountType=%q is specified in []*LimaYAML{o,y,d}[%d])", QEMU, NINEP, i)
+				return QEMU
+			}
+			if f.Audio.Device != nil {
+				switch *f.Audio.Device {
+				case "", "none", "default", "vz":
+					// NOP
+				default:
+					logrus.Debugf("ResolveVMType: resolved VMType %q (audio.device=%q is specified in []*LimaYAML{o,y,d}[%d])", QEMU, *f.Audio.Device, i)
+					return QEMU
+				}
+			}
+			if f.Video.Display != nil {
+				switch *f.Video.Display {
+				case "", "none", "default", "vz":
+					// NOP
+				default:
+					logrus.Debugf("ResolveVMType: resolved VMType %q (video.display=%q is specified in []*LimaYAML{o,y,d}[%d])", QEMU, *f.Video.Display, i)
+					return QEMU
+				}
+			}
+		}
+		// Use VZ if the config is compatible with VZ
+		logrus.Debugf("ResolveVMType: resolved VMType %q (default for macOS 13.5 and later)", VZ)
+		return VZ
+	default:
+		logrus.Debugf("ResolveVMType: resolved VMType %q (default for GOOS=%q)", QEMU, runtime.GOOS)
 		return QEMU
 	}
-	return NewVMType(*s)
 }
 
 func ResolveOS(s *string) OS {
diff --git a/pkg/limayaml/validate.go b/pkg/limayaml/validate.go
index 9210e86c..3ceb7771 100644
--- a/pkg/limayaml/validate.go
+++ b/pkg/limayaml/validate.go
@@ -447,9 +447,6 @@ func warnExperimental(y *LimaYAML) {
 	if *y.MountType == VIRTIOFS && runtime.GOOS == "linux" {
 		logrus.Warn("`mountType: virtiofs` on Linux is experimental")
 	}
-	if *y.VMType == VZ {
-		logrus.Warn("`vmType: vz` is experimental")
-	}
 	if *y.Arch == RISCV64 {
 		logrus.Warn("`arch: riscv64` is experimental")
 	}
diff --git a/pkg/vz/vz_driver_darwin.go b/pkg/vz/vz_driver_darwin.go
index 15bba341..e308ce16 100644
--- a/pkg/vz/vz_driver_darwin.go
+++ b/pkg/vz/vz_driver_darwin.go
@@ -80,7 +80,7 @@ func (l *LimaVzDriver) Validate() error {
 		return fmt.Errorf("field `mountType` must be %q or %q for VZ driver , got %q", limayaml.REVSSHFS, limayaml.VIRTIOFS, *l.Yaml.MountType)
 	}
 	if *l.Yaml.Firmware.LegacyBIOS {
-		return fmt.Errorf("`firmware.legacyBIOS` configuration is not supported for VZ driver")
+		logrus.Warnf("vmType %s: ignoring `firmware.legacyBIOS`", *l.Yaml.VMType)
 	}
 	for _, f := range l.Yaml.Firmware.Images {
 		switch f.VMType {
diff --git a/website/content/en/docs/config/multi-arch/_index.md b/website/content/en/docs/config/multi-arch/_index.md
index 09133bdf..26f8fc12 100644
--- a/website/content/en/docs/config/multi-arch/_index.md
+++ b/website/content/en/docs/config/multi-arch/_index.md
@@ -63,7 +63,7 @@ See also https://github.com/containerd/nerdctl/blob/master/docs/multi-platform.m
 ## [Fast mode 2 (Rosetta): Intel containers on ARM VM on ARM Host](#fast-mode-2)
 
 > **Warning**
-> "vz" mode, including support for Rosetta, is experimental
+> "vz" mode, including support for Rosetta, is experimental (will graduate from experimental in Lima v1.0)
 
 | ⚡ Requirement | Lima >= 0.14, macOS >= 13.0, ARM |
 |-------------------|----------------------------------|
diff --git a/website/content/en/docs/config/network/_index.md b/website/content/en/docs/config/network/_index.md
index f9c5351b..48150519 100644
--- a/website/content/en/docs/config/network/_index.md
+++ b/website/content/en/docs/config/network/_index.md
@@ -180,7 +180,7 @@ networks:
 ### vzNAT
 
 > **Warning**
-> "vz" mode is experimental
+> "vz" mode is experimental (will graduate from experimental in Lima v1.0)
 
 | ⚡ Requirement | Lima >= 0.14, macOS >= 13.0 |
 |-------------------|-----------------------------|
diff --git a/website/content/en/docs/config/vmtype/_index.md b/website/content/en/docs/config/vmtype/_index.md
index a9a7d151..25ef8d4a 100644
--- a/website/content/en/docs/config/vmtype/_index.md
+++ b/website/content/en/docs/config/vmtype/_index.md
@@ -22,13 +22,16 @@ flowchart
   intel_on_arm --  "No" --> vz["VZ"]
 ```
 
+The default vmType is QEMU in Lima prior to v1.0.
+Starting with Lima v1.0, Lima will use VZ by default on macOS (>= 13.5) for new instances,
+unless the config is incompatible with VZ. (e.g., legacyBIOS or 9p is enabled)
+
 ## QEMU
 "qemu" option makes use of QEMU to run guest operating system. 
-This option is used by default if "vmType" is not set.
 
 ## VZ
 > **Warning**
-> "vz" mode is experimental
+> "vz" mode is experimental (will graduate from experimental in Lima v1.0)
 
 | ⚡ Requirement | Lima >= 0.14, macOS >= 13.0 |
 |-------------------|-----------------------------|
diff --git a/website/content/en/docs/releases/experimental/_index.md b/website/content/en/docs/releases/experimental/_index.md
index 564208f6..3c183c78 100644
--- a/website/content/en/docs/releases/experimental/_index.md
+++ b/website/content/en/docs/releases/experimental/_index.md
@@ -9,6 +9,7 @@ The following features are experimental and subject to change:
 - `mountType: 9p`
 - `mountType: virtiofs` on Linux
 - `vmType: vz` and relevant configurations (`mountType: virtiofs`, `rosetta`, `[]networks.vzNAT`)
+  (will graduate from experimental in Lima v1.0)
 - `vmType: wsl2` and relevant configurations (`mountType: wsl2`)
 - `arch: riscv64`
 - `video.display: vnc` and relevant configuration (`video.vnc.display`)


Test patch:
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index eea519bf..533ba8da 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -148,6 +148,7 @@ jobs:
 
   integration:
     name: Integration tests
+    # on macOS 12, the default vmType is QEMU
     runs-on: macos-12
     timeout-minutes: 120
     steps:
@@ -405,13 +406,14 @@ jobs:
 
   vz:
     name: "vz"
+    # on macOS 13, the default vmType is VZ
     runs-on: macos-13
     timeout-minutes: 120
     strategy:
       fail-fast: false
       matrix:
         template:
-        - experimental/vz.yaml
+        - default.yaml
         - fedora.yaml
     steps:
     - uses: actions/checkout@v4
@@ -438,8 +440,6 @@ jobs:
     - name: Uninstall qemu
       run: brew uninstall --ignore-dependencies --force qemu
     - name: Test
-      env:
-        LIMACTL_CREATE_ARGS: "--vm-type vz --mount-type virtiofs --rosetta --network vzNAT"
       run: ./hack/test-templates.sh templates/${{ matrix.template }}
     - if: failure()
       uses: ./.github/actions/upload_failure_logs_if_exists
diff --git a/pkg/limayaml/defaults_test.go b/pkg/limayaml/defaults_test.go
index c09fcdbd..9c4ffd9f 100644
--- a/pkg/limayaml/defaults_test.go
+++ b/pkg/limayaml/defaults_test.go
@@ -14,12 +14,16 @@ import (
 	"github.com/lima-vm/lima/pkg/ptr"
 	"github.com/lima-vm/lima/pkg/store/dirnames"
 	"github.com/lima-vm/lima/pkg/store/filenames"
+	"github.com/sirupsen/logrus"
 	"gotest.tools/v3/assert"
 )
 
 func TestFillDefault(t *testing.T) {
+	logrus.SetLevel(logrus.DebugLevel)
 	var d, y, o LimaYAML
 
+	defaultVMType := ResolveVMType(&y, &d, &o, "")
+
 	opts := []cmp.Option{
 		// Consider nil slices and empty slices to be identical
 		cmpopts.EquateEmpty(),
@@ -59,7 +63,7 @@ func TestFillDefault(t *testing.T) {
 
 	// Builtin default values
 	builtin := LimaYAML{
-		VMType:             ptr.Of("qemu"),
+		VMType:             &defaultVMType,
 		OS:                 ptr.Of(LINUX),
 		Arch:               ptr.Of(arch),
 		CPUType:            defaultCPUType(),
@@ -192,6 +196,7 @@ func TestFillDefault(t *testing.T) {
 	}
 
 	expect := builtin
+	expect.VMType = ptr.Of(QEMU) // due to NINEP
 	expect.HostResolver.Hosts = map[string]string{
 		"MY.Host": "host.lima.internal",
 	}
@@ -472,6 +477,8 @@ func TestFillDefault(t *testing.T) {
 
 	expect.Param["TWO"] = d.Param["TWO"]
 
+	t.Logf("d.vmType=%q, y.vmType=%q, expect.vmType=%q", *d.VMType, *y.VMType, *expect.VMType)
+
 	FillDefault(&y, &d, &LimaYAML{}, filePath)
 	assert.DeepEqual(t, &y, &expect, opts...)