-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path0v
More file actions
executable file
·59 lines (53 loc) · 1.6 KB
/
0v
File metadata and controls
executable file
·59 lines (53 loc) · 1.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#! /usr/bin/env tclsh
###############################################################################
# 0v: wrapper around qemu
source $::env(HOME)/bin/lib.tcl
need qemu-system-x86_64
###############################################################################
# attach the following usb device onto guest
set usb {2 2} ;# lsusb: "bus" "device"
set arg [lindex $::argv 0]
set ::argv [lrange $::argv 1 end]
switch -- $arg {
m - mint {
exec qemu-system-x86_64 -enable-kvm \
-name mint \
-cpu host \
-device intel-hda -device hda-duplex \
-device virtio-balloon \
-device virtio-rng-pci \
-m 1G \
-net nic \
-net user,hostname=v \
-smp 2 \
-usb \
-boot order=d \
-drive file=$::env(HOME)/opt/vm/mint/mint.img,if=virtio \
{*}$::argv
}
#w - win {
# set usbbus [lindex $usb 0]
# set usbdev [lindex $usb 1]
# exec qemu-system-x86_64 -enable-kvm \
# -name win \
# -machine q35 \
# -cpu host,hv_relaxed,hv_spinlocks=0x1fff,hv_vapic,hv_time \
# -device intel-hda -device hda-duplex \
# -device intel-iommu \
# -device qemu-xhci,id=xhci \
# -device virtio-balloon \
# -m 2G \
# -net nic,model=virtio-net-pci \
# -net user,hostname=v \
# -smp 2 \
# -usb \
# -vga virtio \
# -drive file=$::env(HOME)/opt/vm/win/win.img,if=virtio,aio=native,cache.direct=on \
# {*}$::argv
# #-device usb-host,bus=xhci.0,hostbus=$usbbus,hostaddr=$usbdev \
# #-device usb-ehci,id=ehci \
# #-audiodev pa,id=snd0 \
# #-display sdl,gl=on \
#}
default { ufail {?|m_int} }
}