I am trying to set up my first imperative MicroVM. I build it and start the SystemD service and I get no errors. The name of the vm is “test”. Then, in an attempt to bring the VM to the foreground, I use “microvm -r test” and it gives me this error:
microvm@test: -netdev tap,id=test-eth0,ifname=test-eth0,script=no,downscript=no: could not configure /dev/net/tun (test-eth0): Device or resource busy
I also notice that on the host machine, this interface does not have the IP address that I assigned it. Here is my config file for the microvm:
{
pkgs,
config,
lib,
...
}:
{
system.stateVersion = "24.11";
networking.hostName = "test";
microvm.hypervisor = "qemu";
networking.useNetworkd = true;
systemd.network = {
enable = true;
networks = {
"00-00-test" = {
matchConfig = {
Type = "ether";
};
address = [
"2001:4830:c903:1011:f::1/64"
];
routes = [
{
Gateway = "2001:4830:c903::1";
}
];
};
};
};
microvm.interfaces = [
{
type = "tap";
id = "test-eth0";
mac = "02:00:00:00:00:01";
}
];
}