save
This commit is contained in:
parent
93f402b012
commit
7b35ea96bb
2 changed files with 116 additions and 0 deletions
|
|
@ -152,6 +152,7 @@ module Qemu
|
|||
|
||||
# -virtfs local,path=.,mount_tag=hostfs,security_model=passthrough,id=hostfs
|
||||
# mount -t 9p -o trans=virtio,version=9p2000.L hostfs /mnt
|
||||
# sudo mount -t 9p hostfs /home/user/Share -o trans=virtio,version=9p2000.L,uid=1000,gid=1000,msize=262144,cache=mmap
|
||||
|
||||
# hostfs /home 9p trans=virtio,version=9p2000.L,uid=1000,gid=1000,msize=262144,cache=mmap,nofail 0 0
|
||||
# hostfs /share 9p trans=virtio,version=9p2000.L,uid=1000,gid=1000,msize=262144,cache=mmap,nofail 0 0
|
||||
|
|
@ -237,6 +238,7 @@ module Qemu
|
|||
|
||||
### TODO: remove
|
||||
port = 2222
|
||||
args += ['-device', 'virtio-net-pci,netdev=net0']
|
||||
args += ['-netdev', "user,id=net0,hostfwd=tcp:127.0.0.1:#{port}-:22,hostfwd=udp:127.0.0.1:6544-:6544"]
|
||||
args += ['-virtfs', 'local,path=.,mount_tag=hostfs,security_model=passthrough,id=hostfs']
|
||||
### TODO END
|
||||
|
|
@ -326,3 +328,17 @@ module Qemu
|
|||
end
|
||||
|
||||
|
||||
|
||||
|
||||
## Works on MacOS=
|
||||
# -monitor unix:/tmp/qemu-monitor.sock,server,nowait
|
||||
# nc -U /tmp/qemu-monitor.sock
|
||||
# instead of args += ['-monitor', 'stdio']
|
||||
|
||||
|
||||
|
||||
|
||||
# 9P
|
||||
# sudo mount -t 9p hostfs /home/user/Share \
|
||||
# -o trans=virtio,version=9p2000.L,msize=262144,cache=mmap,access=any,dfltuid=1000,dfltgid=1000
|
||||
# sudo chown -hR 1000:1000 /home/user/Share
|
||||
Loading…
Add table
Add a link
Reference in a new issue