Skip to content

Commit 730dc93

Browse files
authored
Merge pull request #30 from anyvm-org/dev
sync
2 parents 971b99f + d46474a commit 730dc93

File tree

2 files changed

+19
-11
lines changed

2 files changed

+19
-11
lines changed

README.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ anyvm is a single-file tool for bootstrapping BSD and Illumos guests with QEMU o
1313
```bash
1414
sudo chmod o+rw /dev/kvm
1515

16+
sudo apt-get update
17+
1618
sudo apt-get --no-install-recommends -y install \
1719
zstd ovmf xz-utils qemu-utils ca-certificates \
1820
qemu-system-x86 qemu-system-arm qemu-efi-aarch64 \
@@ -32,12 +34,6 @@ anyvm is a single-file tool for bootstrapping BSD and Illumos guests with QEMU o
3234

3335
```bash
3436

35-
#desktop release
36-
37-
python3 anyvm.py --os freebsd --release 15.0-xfce
38-
python3 anyvm.py --os freebsd --release 15.0-gnome
39-
python3 anyvm.py --os freebsd --release 15.0-kde6
40-
4137

4238
#command line release
4339
python3 anyvm.py --os freebsd
@@ -48,6 +44,16 @@ python3 anyvm.py --os solaris
4844

4945
python3 anyvm.py --os freebsd --release 14.3 --arch riscv64
5046

47+
48+
49+
#desktop release
50+
51+
python3 anyvm.py --os freebsd --release 15.0-xfce
52+
python3 anyvm.py --os freebsd --release 15.0-gnome
53+
python3 anyvm.py --os freebsd --release 15.0-kde6
54+
55+
56+
5157
# Run a command inside the VM (everything after `--` is sent to the VM via ssh):
5258
python3 anyvm.py --os freebsd -- uname -a
5359
```

anyvm.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ def _create_windows_context():
117117
"solaris": "2.0.3",
118118
"omnios": "2.0.4",
119119
"haiku": "2.0.0",
120-
"openindiana": "2.0.4"
120+
"openindiana": "2.0.6"
121121
}
122122

123123
VERSION_TOKEN_RE = re.compile(r"[0-9]+|[A-Za-z]+")
@@ -2429,7 +2429,7 @@ def print_usage():
24292429
Format: /host/path:/guest/path
24302430
Example: -v /home/user/data:/mnt/data
24312431
--sync <mode> Synchronization mode for -v folders.
2432-
Supported: rsync (default), sshfs, nfs, scp.
2432+
Supported: rsync (default), sshfs, nfs, scp, no/off (disable sync).
24332433
Note: sshfs/nfs not supported on Windows hosts; rsync requires rsync.exe.
24342434
--data-dir <dir> Directory to store images and metadata (Default: ./output).
24352435
--cache-dir <dir> Directory to cache extracted qcow2 files (avoids re-download and re-extract).
@@ -3662,8 +3662,10 @@ def main():
36623662
val = args[i+1].lower()
36633663
if val == "":
36643664
val = "rsync"
3665-
if val not in ["sshfs", "nfs", "rsync", "scp"]:
3666-
fatal("Invalid --sync mode: {}. Supported: rsync, sshfs, nfs, scp.".format(val))
3665+
if val in ["no", "off"]:
3666+
val = "no"
3667+
if val not in ["sshfs", "nfs", "rsync", "scp", "no"]:
3668+
fatal("Invalid --sync mode: {}. Supported: rsync, sshfs, nfs, scp, no/off.".format(val))
36673669
config['sync'] = val
36683670
i += 1
36693671
elif arg == "--disktype":
@@ -5238,7 +5240,7 @@ def finish_wait_timer():
52385240
p.communicate(input=b'echo "nameserver 8.8.8.8" > /etc/resolv.conf\n')
52395241
p.wait()
52405242
# Mount Shared Folders
5241-
if config['vpaths']:
5243+
if config['vpaths'] and config['sync'] != 'no':
52425244
sudo_cmd = []
52435245
if config['sync'] == 'nfs':
52445246
# Check if sudo exists in path (unix only)

0 commit comments

Comments
 (0)