Quantcast
Channel: Ubuntu Forums - Virtualisation
Viewing all articles
Browse latest Browse all 4211

How to force LXC to use IPv4 addresses instead of IPv6

$
0
0
Hi, I'm trying to install a VM under LXC, using LXD frontend.

I've followed the instructions on the LXD site, and I managed to create an empty VM and installing Win11 on it.
The problem is that the VM uses IPv6 and not IPv4, so network connection doesn't work properly.

Code:

lxc list
+-------+---------+------+------+-----------------+-----------+
| NAME  |  STATE  | IPV4 | IPV6 |      TYPE      | SNAPSHOTS |
+-------+---------+------+------+-----------------+-----------+
| win11 | STOPPED |      |      | VIRTUAL-MACHINE | 0        |
+-------+---------+------+------+-----------------+-----------+

lxc start win11 --console=vga

lxc list
+-------+---------+------+----------------------------------------------+-----------------+-----------+
| NAME  |  STATE  | IPV4 |                    IPV6                    |      TYPE      | SNAPSHOTS |
+-------+---------+------+----------------------------------------------+-----------------+-----------+
| win11 | RUNNING |      | fd42:79f8:8fd2:a2d:216:3eff:fe09:f244 (eth0) | VIRTUAL-MACHINE | 0        |
+-------+---------+------+----------------------------------------------+-----------------+-----------+

I'm under Ubuntu 22:04 classic environment.

Is here someone who can help me to configure LXC in order to force use of IPv4 for all VM and containers? ;)

Viewing all articles
Browse latest Browse all 4211

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>