Skip to content

Commit 18d9d22

Browse files
committed
fix: 修复说明
1 parent 48161e1 commit 18d9d22

File tree

3 files changed

+46
-1
lines changed

3 files changed

+46
-1
lines changed

docs/en/incomplete/images/wv1.png

195 KB
Loading

docs/en/incomplete/webvirtcloud.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,47 @@ After installation, a **Token** will be generated for adding the compute node to
111111

112112
Path: `Admin Panel > Computers > Add`
113113

114+
### Add IP Mapping for the Created Virtual Machine
115+
116+
Assume your virtual machine appears in the user control panel as:
117+
118+
![wv1](images/wv1.png)
119+
120+
And the result of executing `ip a | head -n 15` on the host machine is:
121+
122+
```shell
123+
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
124+
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
125+
inet 127.0.0.1/8 scope host lo
126+
valid_lft forever preferred_lft forever
127+
inet6 ::1/128 scope host
128+
valid_lft forever preferred_lft forever
129+
2: ens3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
130+
link/ether 52:54:00:f1:d6:8b brd ff:ff:ff:ff:ff:ff
131+
altname enp0s3
132+
inet your-public-IPV4-address/associated-subnet-mask scope global noprefixroute ens3
133+
valid_lft forever preferred_lft forever
134+
inet6 2a0b:4140:4c60::2/48 scope global noprefixroute
135+
valid_lft forever preferred_lft forever
136+
inet6 fe80::5054:ff:fef1:d68b/64 scope link noprefixroute
137+
valid_lft forever preferred_lft forever
138+
```
139+
140+
It can be seen that the public IPV4 address is bound to the `ens3` interface, so the following commands will use `ens3`.
141+
142+
To map port 22 of the current virtual machine to port 3322 of the public IPV4 address, run:
143+
144+
```shell
145+
# Add a DNAT rule: forward traffic from public port 3322 to local 192.168.33.130:22
146+
iptables -t nat -A PREROUTING -i ens3 -p tcp --dport 3322 -j DNAT --to-destination 192.168.33.130:22
147+
# Add a POSTROUTING rule: enable NAT masquerading for proper return traffic
148+
iptables -t nat -A POSTROUTING -p tcp -d 192.168.33.130 --dport 22 -j MASQUERADE
149+
# Allow incoming traffic on port 3322 (required if firewalld is enabled)
150+
iptables -I INPUT -p tcp --dport 3322 -j ACCEPT
151+
```
152+
153+
Now the internal virtual machine is exposed to the internet and can be accessed remotely.
154+
114155
### Troubleshooting Adding Compute Node
115156

116157
On the Controller node, execute:
@@ -173,6 +214,10 @@ If Docker containers don't auto-restart after a system reboot, run:
173214
docker start $(docker ps -a -q)
174215
```
175216

217+
### Disadvantages
218+
219+
The VM image is written to death, there is no way to use your own custom image, and there is no way to export it, and the original image does not have password login and ROOT login available.
220+
176221
## Thanks
177222

178223
https://webvirt.cloud/

docs/incomplete/webvirtcloud.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ docker start $(docker ps -a -q)
220220

221221
### 缺点
222222

223-
系统镜像是写死的,没法使用自己制作的镜像,也没办法导出使用,同时原始的镜像没有设置SSH登录可用密码登录和ROOT登录可用
223+
系统镜像是写死的,没法使用自己制作的自定义镜像,也没办法导出使用,同时原始的镜像没有设置远程可用密码登录和ROOT登录可用
224224

225225
## 致谢
226226

0 commit comments

Comments
 (0)