VMWare Fusion: How do I combine muliple numbered vmdk files into a -flat.vmdk file? - virtualization

I'm on Mac 10.6.6 using VM Ware Fusion 3.1.2. I created a Windows 7 image, but when I examine the files that make up the image, there are 21 "extent" files -- e.g. files with names like
Windows 7-s001.vmdk
Windows 7-s002.vmdk
Windows 7-s003.vmdk
...
Ultimately I want to convert this to something that an be used by VirtualBox, and so to do that, I need to get a single vmdk (-flat.vmdk) file. Does anyone know how to generate a single file given the multiple files I have now?
Thanks, - Dave

Virtual Machine - Settings - Hard Disk -> Uncheck "Split into 2GB files" and press Apply :)

For those who (like I did) may end up here looking for how to do this on ESXi (CLI): There is no vmware-vdiskmanager. Instead, use vmkfstools:
vmkfstools --clonevirtualdisk source.vmdk dest.vmdk

I have also had success doing this using the command line. Kind of heavy lifting, though - one has to RTFM and Google search carefully to find the right incantations.
look in
/Applications/VMware\ Fusion.app/Contents/Library/vmware-vdiskmanager
see -r for the "convert" option

Related

Comparing & Copying Newer Files

I have a series of E-mail templates stored on a DFS fileshare.
I would like to have a logon script so that when a user logs on, it will cycle through each template in \\LAN\Files\Office Templates\Outlook, compare the LastWriteTime and then copy across any of the newer files from the DFS share to the local folder %APPDATA%\Microsoft\Templates
Currently the folders look like this:
(I am aware at the minute they have the same date, but they won't in the future)
If anyone can help me with this then I would appreciate it very much.
Thanks in advance.
I'd use XCOPY, it's built into most versions of windows and is purpose designed for copy operations.
xcopy <Source> <Destination> <Parameters>
It's got many options, so worth reading the documentation link above.
Your copy is the most simple and needs no extra params. By default this will copy any files from Source that are newer, or do not exist, to Destination:
xcopy "\\LAN\Files\Office Templates\Outlook" "%APPDATA%\Microsoft\Templates"
Or the other option is to use Group Policy Preferences, but that's offtopic for here, more suited to ServerFault.

Copying large files using Remote Desktop

I have a 4 GB text file, compressed to 1.4 GB zip file. I need to copy it over to a Windows secure server using RDP. I am able to copy small files but not this file. It takes 15 mins and then shows an error. Any tips?
You can try to copy it by using Drive Redirection. Here's a tutorial.
BTW, RDP cannot copy files larger than 2GB by using clipboard as said in Microsoft support
window rdp clipboard has limit of about 2GB if you want to copy paste more than 2 gb file then you can try any of these options.
split file into parts like 1 gb each part with help of winrar or any other software
Use any FTP software
map local pc drive for remote desktop session(for move or copy data)
File size doesn't matter - I copied folders through Remote Desktop connection with 30GB and more. While doing this I received "Unspecified error". The Problem is that you aren't allowed to use the clipboard again while you are copying. Doesn't matter if you use the clipboard for the same machine or from the remote machine. To summarize don't use Ctrl+C.
The madness is the error is delayed so you don't recognize quickly that those things relate.
format usb drive as ntfs
connect drive as local resource in remote desktop
NET USE X: \\TSCLIENT\F
robocopy c:\source x:\
net use X: /delete
If you are administrator, you can copy the files of any size over the network using Administrative Shares assuming that it is not purposefully disabled.
Enter the following url on your File Explorer and you will see all the files and folders on your C drive of that computer with read and write access:
\\computername\c$
right-click zip-file >> Properties >> Advanced >> Encrypt contents
open your one-drive or googledrive (if the secure server allows you) and park the encrypted file on there.
(you might have to one-drive space by signing up to a months 365)
https://support.microsoft.com/en-us/office/manage-your-onedrive-storage-and-limits-989fce19-ade6-4e2f-81fb-941eabefee28
I guess it would might be possible to use google datastore or something cloudy.

how to check for activity or lack thereof on a unix file directory using perl or unix commands

Scenario:
I have a process where many files are being copied (scp'd) to a DestinationServer by Host1, Host2, Host3, Host4 for example. Going to the same common directory: DestinationServer:/home/target. All the files are unique so no files will be overwritten. Host1-Host4 will have a cronjob that will launch their scp script to DestinationServer. The caveat is the Hosts are in different time zones, locations. So, they will finish at different times.
Need:
Since the files are being scp'd to Destination:/home/target, what is the best way to programmatically check when those scp's from the other Hosts are done??
Options:
My options are to programmatically do this either in perl or shell if possible.
What do I look for, what unix commands or perl modules could I use to help determine when the processes would finish? Any ideas, examples would be great! Thanks.
Use a Maildir kind of approach: copy all files to a temporary directory, then after the transfer is complete have the originating host perform a rename into the target directory via ssh. That way when a file appears in the target directory, you know that it is complete.
I suggest this because if you just scp files into the target directory and monitor the directory in whatever way, you cannot distinguish a complete transfer from an interrupted scp command or a network failure.
SGI::FAM, Sys::Gamin
Similar but alternative way to Jouni is to use semaphore files. Before scp-ing files originating host puts up semaphore-file and when finished, remove it. So you know, it's time.

Shadow copy to clone system volume on Windows XP

I am looking for a program that uses shadow copy to copy the contents of a Windows XP system volume that is running.
I.e. I want to clone the system volume with the following snags:
(1) I want to be able to select which files to copy (i.e. not the entire file system)
(2) This is probably implied by (1), but I also have to avoid sector-by-sector copies
(3) I do not want to clone a file system into an image file and restore to a 3rd drive but want to do a filesystem to filesystem copy
All the backup/clone utilities I looked into stumble on one of above points. Any ideas?
Perhaps this one: Hobocopy

How do I copy from numerous release directories to a single folder

Okay this is and isn't programming related I guess...
I've got a whole bunch of little useful console utilities scattered across a suite of projects that I wrote and I want to dump them all to a single directory to make using them simpler. The only issue is that I have them all compiled in both Debug and Release mode.
Given that I only want the release mode versions in my utilities directory, what switch would allow me to specify that I want all executables from my tree structure but only from within Release folders:
Example:
Projects\
Project1\
Bin\
Debug\
Project1.exe
Release\
Project1.exe
Project2\
etc etc...
To
Utilities\
Project1.exe
Project2.exe
Project3.exe
Project4.exe
...
etc etc...
I figured this would be a cinch with XCopy - but it doesn't seem to allow me to exclude the Debug directories - or rather - only include items in my Release directories.
Any ideas?
You can restrict it to only release executables with the following. However, I do not believe the other requirement of flattening is possible using xcopy alone. To do the restriction:
First create a file such as exclude.txt and put this inside:
\Debug\
Then use the following command:
xcopy /e /EXCLUDE:exclude.txt *.exe C:\target
You can, however, accomplish what you want using xxcopy (free for non-commercial use). Read technical bulletin #16 for an explanation of the flattening features.
If the claim in that technical bulletin is correct, then it confirms that flattening cannot be accomplished with xcopy alone.
The following command will do exactly what you want using xxcopy:
xxcopy /sgfo /X:*\Debug\* .\Projects\*.exe .\Utilities
I recommend reading the technical bulletin, however, as it gives more sophisticated options for the flattening. I chose one of the most basic above.
Sorry, I haven't tried it yet, but shouldn't you be using:
xcopy release*.exe d:\destination /s
I am currently on my Mac so, I cant really check to be for sure.
This might not help you with assembling them all in one place now, but going forward have you considered adding a post-build event to the projects in Visual Studio (I'm assuming you are using it based on the directory names)
xcopy /Y /I /E "$(TargetDir)\$(TargetFileName)" "c:\somedirectory\$(TargetFileName)"
Ok, this is probably not going to work for you since you seem to be on a windows machine.
Here goes anyway, for the logic.
# From the base directory
mkdir Utilities
find . -type f | grep -w Release > utils.txt
for f in $(<utils.txt); do cp $f Utilities/; done
You can combine the find and cp lines into one, I split them for readability.
To do this on a windows machine you'll need Cygwin or some such Unix Utilities handy.
Maybe there are tools in the Windows shell to do this...
This may help get you started:
C:\>for %i in (*) do dir "%~dpi\*.exe"
Used in the dir command as a modifier to i, ~dp uses the drive and path of everything found in (*). If I run the above in a folder that has several subfolders containing executables, I get a dir list of all of the executables in each folder.
You should be able to modify that to add '\bin\release\' following the ~dpi portion and change dir to xcopy. A little experimentation should make it pretty easy.
To use the for statement above in a batch file, change '%' to '%%' in both places.