#!/bin/bash
xrandr --newmode "1920x1080_60.00" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync
xrandr --addmode Virtual1 1920x1080_60.00
xrandr --output Virtual1 --mode 1920x1080_60.00
Paste this in your website: <script type="text/javascript" src="http://www.posteet.com/embed/2221"></script>
Très utile pour mettre une VM snort en bridge sur un linux ; il suffit de mettre les deux vmnet du bridge en promiscuous sur la machine hébergeant la VM
# VMware software does not allow the virtual Ethernet adapter to go into promiscuous mode unless the user running the VMware software has permission to make that setting. This follows the standard Linux practice that only root can put a network interface into promiscuous mode.
chgrp vmware/dev/vmnet0
chmod g+rw /dev/vmnet0
# N.B: Change vmnet0 with the bridged device
Paste this in your website: <script type="text/javascript" src="http://www.posteet.com/embed/711"></script>
# Every time I reboot and run VMWare, I have to manually run vmware-config.pl to create again vmnet devices (/dev/vmnetX)
# This scrit fix this problem. Add it to the init.d directory and run it on startup (rcX.d)
vim /etc/init.d/mkvmnet
#! /bin/sh -e
#Create device nodes for vmnet
sync
`/bin/mknod --mode=600 /dev/vmnet0 c 119 0`
`/bin/mknod --mode=600 /dev/vmnet1 c 119 1`
`/bin/mknod --mode=600 /dev/vmnet2 c 119 2`
`/bin/mknod --mode=600 /dev/vmnet3 c 119 3`
`/bin/mknod --mode=600 /dev/vmnet4 c 119 4`
`/bin/mknod --mode=600 /dev/vmnet5 c 119 5`
`/bin/mknod --mode=600 /dev/vmnet6 c 119 6`
`/bin/mknod --mode=600 /dev/vmnet7 c 119 7`
`/bin/mknod --mode=600 /dev/vmnet8 c 119 8`
`/bin/mknod --mode=600 /dev/vmnet9 c 119 9`
sync
exit 0
# To execute the script on startup
cp -s /etc/init.d/mkvmnet /etc/rc3.d/S02mkvmnet
chmod 755 /etc/init.d/mkvmnet
Paste this in your website: <script type="text/javascript" src="http://www.posteet.com/embed/120"></script>
Ajouter les droits en écriture et execution sur le fichier vmx de la VM
Paste this in your website: <script type="text/javascript" src="http://www.posteet.com/embed/73"></script>
# ** Dans la VM **
dd if=/dev/zero of=/zero.bin
rm zero.bin
# ** Sur la machine hôte **
vmware-vdiskmanager -k <disk.vmdk> #( /!\ Windows uniquement )
vmware-vdiskmanager -r <sourceDisk.vmdk> -t 1 <destinationDisk.vmdk>
Paste this in your website: <script type="text/javascript" src="http://www.posteet.com/embed/4"></script>