Created
February 8, 2023 08:15
-
-
Save alirezaarzehgar/ffe9cfef7e5b191fcbf7500fcf5a6231 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| INF=enp2s0 | |
| ip tuntap add dev virttap mode tap user $USER | |
| brctl addbr virtbr | |
| brctl addif virtbr ${INF} | |
| brctl addif virtbr virttap | |
| ip link set virtbr up | |
| ip link set ${INF} up | |
| ip link set virttap up | |
| qemu-img create -f vmdk testpxe.vmdk 10 | |
| qemu-system-x86_64 \ | |
| -hda testpxe.vmdk \ | |
| -enable-kvm \ | |
| -m 1G \ | |
| -boot n \ | |
| -net nic \ | |
| -net tap,ifname=virttap,script=no,downscript=no |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment