Showing posts with label Vmware. Show all posts
Showing posts with label Vmware. Show all posts

Thursday, April 20, 2023

command to check vmrun. if not start it

 "C:\Program Files (x86)\VMware\VMware Player\vmrun.exe" list>run.txt

find  "Test.vmx" run.txt >nul

if %errorlevel%==0 (echo active is true) else (("C:\Program Files (x86)\VMware\VMware Player\vmrun.exe" -T player start "c:\VirtualBox VMs\vmware\test\Test.vmx" nogui) & (echo Logged time = %time% %date%>> d:\log.txt))

::pause

del run.txt

timeout /t 120




meaning

program1 & program2    --> run program1 until finish and run program2

program1 && program2 --> run program1 and program2 together

::  ---> comment on dos

if (ifcondition) (true command) else ( false command)


find  "Test.vmx" run.txt >nul

errorlevel

0 found

1 notfound

2 ???

Thursday, June 16, 2022

Openwrt on vmware play12 add usb axis 88179 (usblan)

1. Install openwrt ova

 https://openwrt.org/docs/guide-user/virtualization/vmware

2. Install axis usb

opkg update

opkg install kmod-usb-net-axis-ax88179

3. Upgrade vm hardware version

    vmrun.exe" -T player upgradevm test.vmx

4. Batch command for non GUI

"C:\Program Files (x86)\VMware\VMware Player\vmrun.exe" -T player start "c:\VirtualBox VMs\vmware\test\Test.vmx" nogui

5. Add blow in test.vmx for auto attach usb when boot

usb.autoConnect.device0 = "0x0B95:0x1790"

Tuesday, August 11, 2009

VM usb

This post will explain how to do create a VMware ESXi bootable USB pen drive, note that it will not be an installer, but a live system running on an USB drive.
First of all you should use it for testing hardware systems for compatibility, avoiding to install the hypervisor on the system, or you can use it to play (as I’m doing) with it on your notebook or desktop.

The following is the two procedure to follow to create it based on Linux and Windows operating systems :

This post will assume you’ve already have an ISO image of the latest VMware ESXi hypervisor on your system, if you don’t have it, please download it for free at http://www.vmware.com

Linux :

Locate the ISO image.
Mount it in a directory on your system (if you don’t know how, look here : http://www.riccardoriva.com/archives/64) and extract the file you need with the following commands :

sudo mkdir /tmp/iso
sudo mount -o loop -t iso9660 VMware-VMvisor-InstallerCD-3.5.0_Update_4-153875.i386.iso /tmp/iso/
sudo cp /tmp/iso/install.tgz /tmp/
sudo umount /dev/loop0

sudo tar -xzvf /tmp/install.tgz usr/lib/vmware/installer/VMware-VMvisor-big-3.5.0_Update_4-153875.i386.dd.bz2
cd /tmp/usr/lib/vmware/installer/
sudo bunzip2 VMware-VMvisor-big-3.5.0_Update_4-153875.i386.dd.bz2

Now insert your USB Pen Drive (at least 2 GB) in your system and locate it (tipically /dev/sdb).

Copy to it the image with the following command :

sudo dd if=/tmp/usr/lib/vmware/installer/VMware-VMvisor-big-3.5.0_Update_4-153875.i386.dd of=/dev/sdb BS=1M

Umount your en Drive

sudo umount /dev/sdb

Reboot your system and check your BIOS configuration for enabling “Boot from USB devices”, and check if something goes wrong.

Windows :

For windows system you should need two free software (portable) to do all works :
7-Zip Portable : http://portableapps.com/apps/utilities/7-zip_portable
DD For Windows : http://www.chrysocome.net/dd

Open the ISO file with 7zip, locate “install.tgz” and open it, locate “install.tar” and open it,
locate the folder “\usr\lib\vmware\installer\”, locate the fle : “VMware-VMvisor-big-3.5.0_Update_4-153875.i386.dd.bz2″ and open it.
Extract the file “VMware-VMvisor-big-3.5.0_Update_4-153875.i386.dd” in a temporary directory of your system (i.e. C:\temp).

Insert your pen drive (at least 2 GB) on your system and wait a couple of seconds.

Check the device ID of your pen drive using DD for Windows (by opening a command prompt on the DD directory) with the following comand :

dd –list

Then use the following syntax to copy the dd image on your removable device :

dd bs=1M if=VMware-VMvisor-big-3.5.0_Update_4-153875.i386.dd of=\\?\Device\Harddisk1\Partition0 –progress

You’ve done

Hope this help

Bye
Riccardo

Tuesday, October 7, 2008

BLOG [in] TREND เรียกใช้งาน VMware Software (Portable)

เรียกใช้งาน VMware Software ผ่าน External Harddisk
โดย : BLOG [in] TREND | เมื่อวันที่ : 18.07.2008 | เวลา : 0:08 | จำนวนผู้อ่าน : 293 ครั้ง
หมวดหมู่ : ซอฟท์แวร์ | ป้าย : external, harddisk, vmware

เพื่อน ๆ คงจะ งง เรียกใช้งาน Vmware บน External Harddisk มันแปลกตรงไหนเนี่ย ก็คงจะไม่แปลกครับถ้าเครื่องที่เพื่อน ๆ เอา Vmware Image ไปเรียกใช้งานในเครื่องที่ได้ติดตั้ง Vmware Software ไว้อยู่แล้ว แต่ .. ถ้าบังเอิญจะเอา Image ไปเล่นที่ร้าน Internet Cafe หรือ เครื่องเพื่อนๆ คนอื่นละจะทำยังไงละ ..

ก็แค่ติดตั้ง .. Software ไงไม่เห็นจะยาก .. แต่ผมมีทางให้เพื่อน ๆ สามารถเรียกใช้งานได้จาก External Harddisk ได้เลยไม่ต้องติดตั้งที่เครื่องอื่น ๆ ละจะดีกว่าไหมครับ ลองมาดูนะครับ ว่าต้องทำอย่างไรบ้างง …

.. มาเร็วว เริ่มกันเลยดีกว่านะครับ .. ขั้นตอนง่าย ๆ มีดังนี้ครับ

1. สร้าง Vmware Image ที่ต้องการใช้งาน ก่อนจากเครื่องที่ได้ติดตั้ง Vmware Software ไว้แล้ว โดยสามารถสร้างได้จาก Vmware Workstation หรือถ้าติดตั้งผ่าน Vmware Player ก็ให้ไปสร้างไฟล์ .vmx เพื่อกำหนด Hardware จากเว็บ www.easyvmx.com ได้เลย
2. ติดตั้ง OS ที่ Vmware Image นี้
3. ก๊อบปี้ข้อมูล Vmware Image ไปที่ External Harddisk
4. ขั้นตอนนี้จะทำให้สามารถ เรียกใช้งาน Vmware Software บน External Harddisk ได้

* เปิดแฟ้ม Window Explorer ไปที่ Program File\VMWare\VMWare Workstation\
* คัดลอกไฟล์ vmplayer.exe, sigc-2.0.dll, vmcuiutil.dll, vmapputil.dll และ vmapplib.dll ไปที่ External Disk

5. เรียกใช้งาน Vmware Image โดยเลือกไฟล์ Image ทีมี นามสกุล .vmx เลือก Open With ไปยัง Path ที่ Vmware Player (vmplayer.exe)ที่ External Harddisk
6. ใช้งาน Vmware ของเราได้เลยยย ครับ ..

ขอให้เพื่อน ๆ ทำกันสำเร็จนะครับ … ส่วนผมจะเอาไปใช้กับงานลูกค้า เพราะว่าปกติลูกค้าไม่ค่อย ยอมให้ติดตั้ง Software อยู่แล้วทำแบบนี้สะดวกสุด ๆ แถมถ้าต้องการนำ Vmware ไปเก็บข้อมูลก็ทำได้งานแค่ Copy ไฟล์ทั้งหมดไป วางไว้ในเครื่อง ไม่ต้องติดตั้ง Software ด้วย และนำกลับมาตรวจสอบข้อมูลก็แค่ คัดลอกมาไว้ที่ External Harddisk เหมือนเดิมครับ สะดวกจริงโลก Virtualization

vmware player : http://www.vmware.com/download/player/