-
Bug
-
Resolution: Unresolved
-
Normal
-
None
-
None
Hi.
The attached tarball contains a vm control script that works like a netif.tmpl:
- create a symlink to /etc/init.d/vmctl.tmpl with desired vm name:
cd /etc/init.d && ln -s vmctl.tmpl vm.web
- create a conf file /etc/conf.d/vm.web:
template=qemu qemu_arch=x86_64 qemu_net="macvtap web0 model=virtio-net-pci tap web1 model=virtio-net-pci" qemu_opts="-machine type=q35,accel=kvm -daemonize -cpu host -smp 1 -m 1G -drive file=/var/vm/tmpl.img,format=raw,if=virtio,index=0"
- create confs for web0 and web1:
cat /etc/conf.d/net.web0:
template=macvtap mac_replace=52:54:00:01:01:01 base=net.eth0 mode=bridge
cat /etc/conf.d/net.web1:
template=tap bridge="net.brwebnas"
cat /etc/conf.d/net.brwebnas:
template=bridge
- now we can start/stop/etc this vm