Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
nexus
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
flg_projects
nexus_vdi
nexus
Commits
a6842a8a
Commit
a6842a8a
authored
2 years ago
by
Florent Gluck
Browse files
Options
Downloads
Patches
Plain Diff
Added vm_run_win script to launch a Windows VM with usb passthrough. It's experimental for now.
parent
888c74ef
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tools/vm_run_win
+61
-0
61 additions, 0 deletions
tools/vm_run_win
with
61 additions
and
0 deletions
tools/vm_run_win
0 → 100755
+
61
−
0
View file @
a6842a8a
#!/bin/bash
CPUS
=
4
RAM
=
4G
APP
=
`
basename
$0
`
function
echoerr
{
echo
"
$@
"
>
&2
}
function
usage
{
echoerr
"
$APP
- launch a VM on the specified disk image(s)."
echoerr
"The VM is configured with
$CPUS
CPUs and
$RAM
of RAM."
echoerr
""
echoerr
"Usage:
$APP
-d disk -i iso"
echoerr
"disk the disk image to use (typically a .qcow file)"
echoerr
"iso the CD/DVD-ROM image to use (typically an .iso file)"
echoerr
""
echoerr
"At least one image must be specified."
exit
1
}
if
[
$#
-lt
1
]
;
then
usage
fi
while
[[
$#
-gt
0
]]
;
do
case
$1
in
-d
)
disk
=
"
$2
"
shift
# past argument
shift
# past value
;;
-i
)
iso
=
"
$2
"
shift
# past argument
shift
# past value
;;
*
)
echo
"Unknown argument
$1
"
exit
1
;;
esac
done
if
[
!
-z
$disk
]
;
then
disk_drive
=
"-drive file=
$disk
,index=0,media=disk,format=qcow2,discard=unmap,detect-zeroes=unmap,if=ide"
fi
if
[
!
-z
$iso
]
;
then
cdrom_drive
=
"-drive file=
$iso
,index=1,media=cdrom,format=raw,read-only=on"
fi
network
=
"-nic user,model=e1000e"
# USB passthrough for using a Fuji camera with X-RAW-Studio
usb
=
"-usb -device usb-host,vendorid=0x04cb,productid=0x02e8"
# -boot order=d tells QEMU to boot to CDROM first
qemu-system-x86_64
-enable-kvm
-cpu
host
-smp
cpus
=
$CPUS
-m
$RAM
-boot
order
=
d
$disk_drive
$cdrom_drive
-vga
virtio
-device
virtio-serial-pci
$network
$usb
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment