Comments (9)
Please use slirp
option to runqemu
luckily for qemuriscv machines we have QB_SLIRP_OPT
already set which will forward port 2222 on host to qemu
runqemu nographic slirp
The from client machine
ssh -p 2222 -l root <host-ip>
will get you right into qemu
from meta-riscv.
I tried, but it does not work.
Even the ssh connection from host to qemu does not work.
I tried the following command on host machine.
ssh -l root 192.168.7.2
And It does not work without any output.
So I check the sshd in qemu by the command systemctl restart sshd
and the following message is appeared.
Failed to restart ssh.service: Unit ssh.service not found.
I already add EXTRA_IMAGE_FEATURES_append = " ssh-server-dropbear" in local.conf. Should I do some more configuration??
About the connection from remote machine, I'll try after fix this problem.
from meta-riscv.
you should check if dropbear is running in qemu, I guess thats the problem. btw. what image target do you build ? you can also try to replace dropbear with
EXTRA_IMAGE_FEATURES_append = " ssh-server-openssh"
to use openSSH instead
from meta-riscv.
MACHINE=qemuriscv32 bitbake core-image-full-cmdline
is the image target.
I checked if dropbear is running in qemu by ps -ef
but there's no process related with dropbear.
Then I build with ssh-server-openssh, but there's no process related with ssh as well.
from meta-riscv.
I tried another solution and It works well.
I remove slirp
option because it makes the ssh connection impossible. (I not sure, but when I remove this option, ssh connection from host machine(or remote machine) to virtual machine works well.)
Then I route the host machine's port X
to 192.168.7.2:22
via iptables
It allow the remote machine to connect to virtual machine by using ssh -p X -l root <host-ip>
+) I have another question, can I change the port from 22 to another without using slirp?
+) Is it possible to increase memory over 1GB? I tried to boot 4GB virtual machine, but it has only 1002mb memory.
from meta-riscv.
you have to bitbake after making these changes.
yeah perhaps in local.conf
or meta/conf/machine/include/riscv/qemuriscv.inc
QB_TAP_OPT = "-netdev tap,id=net0,ifname=@TAP@,script=no,downscript=no"
to be
QB_TAP_OPT = "-netdev tap,id=net0,ifname=@TAP@,script=no,downscript=no,hostfwd=tcp::10000-:22"
then rebuild image.
from meta-riscv.
I tried to add "hostfwd=tcp::10000-:22" at ~/riscv-yocto/openembedded-core/meta/conf/machine/include/riscv/qemuriscv.inc
file.
But the following message is appeared.
runqemu - ERROR - Failed to run qemu: qemu-system-riscv32: Invalid parameter 'hostfwd'
+) Can I make many virtual machine ? The above question is for this reason. I want to make more virtual machine and assign different port to each virtual machine. (same image, only different port vm)
+) Is it possible to increase virtual machine's memory over 1GB? I tried to boot 2GB virtual machine, but it has only 1002mb memory.
from meta-riscv.
interesting, I have tried runqemu nographic slirp
here with qemu/mips though and it worked all fine and also ssh -p 2222 -l root <host-ip>
worked. Secondly, overriding should have achieved something similar, so I am not sure whats going on your end.
for increasing memory it is qemu's limitation. On some arches it is 512M on some it is 1G
and some has higher limits. I think for riscv32 its 1G
Since runqemu is primarily used for debugging/development and not scaled deployment
it does not have support to launch multiple instances since it uses same image to run
one probably needs to copy the kernel + image and have a custom scripts to launch and
maybe even make it easy to launch new instance easily.
from meta-riscv.
I'll correct what I said above. I have confirmed that slirp works fine.
About launching many vm, I followed your answer and it works well!
Thanks to you, it was a big help.
I hope you have a nice day.
- I'll close this issue.
from meta-riscv.
Related Issues (20)
- current go-cross cannot support cgo for riscv64
- go_1.19.4.bb not install standard lib code HOT 1
- Qemu RISCV64 build fails due to nfs-utils HOT 11
- Kernel modules will not work on MangoPi pro HOT 2
- Where is recipes-bsp/boot0/boot0.bb? HOT 3
- BrokenPipeError: [Errno 32] Broken pipe HOT 4
- opensbi: do_install() fails for visionfive2 HOT 2
- visionfive2 missing ChipsMedia_VisionFive2 license file
- weston does not start on Visionfive2 HOT 3
- glibc build failed on ARCH riscv32 HOT 3
- build failing on start with 'ERROR: Nothing RPROVIDES 'systemd'' HOT 2
- Milk-V Duo: Kernel compilation fails HOT 1
- mangopi-mq-pro u-boot-allwinnerd1-1_1.0-r0 do_fetch HOT 1
- visionfive 2 cpu0: cpufreq_init: failed to get clk and cpufreq-dt: failed register driver: -19 HOT 4
- Error while compiling perf HOT 1
- No hdmi on mangopi HOT 3
- [master: visionfive2] mesa-pvr HOT 4
- How can I increase my RAM memory for milk-v duo 64MB? HOT 1
- star64 - u-boot compilation fails
- visionfive2-pvr-graphics: failing installation with SysV init
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from meta-riscv.