network problem

ice2ice

New Member
Apr 27, 2020
11
0
1
44
hello,
My VM have no network, i'm on dedicated server and i'm using proxmox. I don't understand how to configure for it works... (sorry for my english, i'm french...)
Someone could help me please?
thanks
 
Hi,

Please post your network configuration cat /etc/network/interfaces and output of command ip a also qm config <VMID>
 
it's for proxmox :

iface lo inet loopback

iface enp0s20 inet manual

auto vmbr0
iface vmbr0 inet static
address **.**.*.*** (i hide my ip)
netmask 255.255.255.0
gateway **.**.*.* (hide it too)
bridge_ports enp0s20
bridge_stp off
bridge_fd 0

ip a :

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: enp0s20: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq master vmbr0 state UP group default qlen 1000
link/ether 00:07:cb:0b:80:62 brd ff:ff:ff:ff:ff:ff
3: vmbr0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether 00:07:cb:0b:80:62 brd ff:ff:ff:ff:ff:ff
inet xx.xx.x.xxx/24 brd xx.xx.x.255 scope global vmbr0
valid_lft forever preferred_lft forever
inet6 fe80::207:cbff:fe0b:8062/64 scope link
valid_lft forever preferred_lft forever
8: tap100i0: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN group default qlen 1000
link/ether 12:99:ab:53:86:cb brd ff:ff:ff:ff:ff:ff

qm config <VMID> :

-bash: syntax error near unexpected token `newline'

and in the VM console it tell me that:


jM5s3pc.png


ip a :

0IXWCufl.png


qm config <VMID> :

-bash: syntax error near unexpected token `newline'

thanks for your help
 
The directory is /etc/network/interfaces, not /ect/. . . for the network configuration
 
for the network config in the vm it tell that :

87zuA5Bl.png


where can i find the id of me vm please?
 
Use the command qm list on the machine that is hosting your VM. You'll see a list of your VMs and their IDs.
 
ok i found it :

agent: 1
bootdisk: scsi0
cores: 2
ide2: local:iso/ubuntu-18.04.4-live-server-amd64.iso,media=cdrom
memory: 2176
name: vestacp
net0: virtio=00:07:CB:0B:80:62,bridge=vmbr1,firewall=1
numa: 0
ostype: l26
scsi0: local:100/vm-100-disk-0.qcow2,size=50G
scsihw: virtio-scsi-pci
smbios1: uuid=a6ca22e8-b779-4246-89ab-3f7ca030a27b
sockets: 1
vmgenid: c0855fed-9069-490b-ad21-9664b1f4d043
 
for the network config i found this :

auto lo
iface lo inet loopback

iface enp0s20 inet manual

auto vmbr0
iface vmbr0 inet static
address **.**.*.***
netmask 255.255.255.0
gateway *.*.*.*
bridge_ports enp0s20
bridge_stp off
bridge_fd 0
 
It looks like the VM is set up to use vmbr1 when you only have vmbro0 setup as a bridge on your host. Try changing the VMs networking configuration (preferrably through the web interface) to use vmbr0. Don't edit /etc/network/interfaces directly.
 
That's your host network configuration, which looks like it is set up correctly. You want to edit your VM's network configruation which is found by clicking your VM on the side panel and then clicking "Hardware". A page will show up with a list of components. Click "Network Device"
and edit it. Change the bridge from vmbr1 to vmbr0.

Then run the command qm config <VMID> on your host machine. The bridge setting should show vmbr0. Then test and see if your VM can connect to your network.
 
i've got a fix ip for the server and i don't have dhcp. The fix ip is use by proxmox
and proxmox has been installed by my webhost, this is my webhost panel.

NIM5aaq.png
 
is ok thank you for help ;)

cat >> /etc/network/interfaces <<EOF

auto vmbr1
iface vmbr1 inet static
address 192.168.1.1
netmask 24
bridge-ports none
bridge-stp off
bridge-fd 0

post-up echo 1 > /proc/sys/net/ipv4/ip_forward
post-up iptables -t nat -A POSTROUTING -s '192.168.1.0/24' -o vmbr0 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s '192.168.1.0/24' -o vmbr0 -j MASQUERADE
EOF
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!