Tuesday Oct 14, 2008

A little script to clone a VM with VMware ESX/ESXi (but no VirtualCenter)

I wanted to strike this one for my own records...

I was looking for an easy way to clone a VM without VirtualCenter and came across this, which worked like a charm, bits of which I had done before for other purposes...

http://hsukumar.wordpress.com/2008/05/14/esx-clone-without-virtual-center

So I came up with a little automation, good for when you have to "create a few"... Change according to your datastore!

Script: clone-system name-of-source-vm name-of-target-vm

SOURCEVM=$1
TARGETVM=$2
DATASTORE=/vmfs/volumes/MY-VM-STORE

mkdir $DATASTORE/"$2"

vmkfstools -i $DATASTORE/"$1"/"$1".vmdk $DATASTORE/"$2"/"$2".vmdk

Thursday Mar 27, 2008

Windows VM cannot connect to USB devices on a Keyspan USB Server?

So you've built yourself a network treat: a Windows XP Pro VM (virtual machine). Now you have a desktop that you can take anywhere with you. Next thing you'll want to do, is get your USB devices back online, except you can't attach them to the VM, because, well, it's a VM after all.

The best solution so far (I disagree with and have a distaste for USB devices plugged through your client) is still USB over IP. It's good for a number of reasons, such as, a device can be easily shared by a number of users without having to travel with it (think of a scanner) and because you can dettach your session from your client and the device stays connected to your session (think of a USB drive copying a large amount of data).

That said, because you most likely built your VM from scratch (and not P2V), the Windows installer got really clever: it decided that since your hardware had no USB ports (it's a VM!) you wouldn't need USB support, right? Not anymore, unless you want to throw that Keyspan USB server or Digi AnywhereUSB server into the bin.

What to do? Quite simple really...

- Get hold of that Windows media one more time

- Find in it this file: I386\\usbd.sy_

- Copy it to your VM as: c:\\windows\\system32\\drivers\\usbd.sys

- Reboot your VM

- Enjoy having your devices on the network too.


About

A thin thinker down under

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
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
   
       
Today