VMware vSphere

 View Only
  • 1.  Trying to copy a VM from one server to another

    Posted Oct 24, 2010 12:27 AM

    Hi All,

    I'm new to ESXi 4, though I've used VMWare Workstation for years. I'm trying to copy a VM of a Windows system (sysprepped) from one host to another. Both hosts are identical systems with the exact same ESXi host configuration. Same hw, same version of ESXi, same config, same partition sizes.

    When i use Vsphere's browse datastore to "download" the vmdk & vmx files to a local (Windows Server 2003) drive , I get the following 3 files: The same vmx file, a tiny vmdk file, and a huge filename-flat.vmdk file. The vmdk file on the source host's datastore browser is about 23GB. The flat vmdk file on the local system is nearly 63GB.

    Then I reopen Vsphere on the destination server, and "upload" the 3 files to a directory I created in the datastore. Once there, I use the browser to "Add to Inventory." When I attempt to power up the VM, I get the error message "Insufficient disk space on datastore."

    Any ideas of what I might have done wrong? Again the datastore configuration is identical:

    Local VMware Disk: 62.95GB, Total Formatted Capacity: 62.75GB. vmfs 3.33 1MB block size This is the only VM on the system.

    Thanks in advance,

    Mark



  • 2.  RE: Trying to copy a VM from one server to another

    Posted Oct 24, 2010 01:06 AM

    Can you post the vmware.log file for the VM?






    --Matt
    VCP, VCDX #52, Unix Geek, Storage Nerd



  • 3.  RE: Trying to copy a VM from one server to another

    Posted Oct 24, 2010 02:06 AM

    I apologize, but I deleted the VM and all its files and I'm copying the vmdk and vmx files again. The download and upload process with the datastore browser takes between 4 & 5 hours, so I won't be able to post anything until sometime tomorrow afternoon.

    Thanks for the reply, and I'll post either the log file or a happy result as soon as I can.

    Thanks again!

    Mark



  • 4.  RE: Trying to copy a VM from one server to another

    Posted Oct 24, 2010 03:25 AM

    You might want to try Veeam FastSCP to copy the file between hosts. It's pretty easy to use and would save you from the two step process of moving the file. I don't have any idea what the issue about your "datastore" error message. If copying it again doesn't work post again the exact error message.

    Mike P

    MCSE, VCP3/4



  • 5.  RE: Trying to copy a VM from one server to another

    Posted Oct 24, 2010 02:58 PM

    Thanks for the advice about fastscp, it looks like it will be a huge help, unfortunately it didn't seem to help though.

    I'll be posting what I'm finding in just a few minutes.

    Thanks again!

    Mark



  • 6.  RE: Trying to copy a VM from one server to another

    Posted Oct 24, 2010 03:15 PM

    I think that here's the problem:

    vmx| http://vob.sched.swap.extendfailure.status Failed to extend swap file (fileHandle 76038638) from 0 KB to 4124672 KB: No space left on device.

    vmx| http://msg.vmmonVMK.creatVMFailed Could not power on VM : No space left on device.

    A decision was made by people "above my pay grade" to virtualize some desktops using server hardware, where there would be 1 VM per host. They created a single datastore using up the entire free space on the mirrored drives. The idea was to create a "base" system for all the users in the department, and then copy the VM to multiple hosts, with each user effectively using all the resources on the host. No, I don't know why they wouldn't just load the client OS directly on the host system, so they wouldn't have the overhead of the hypervisor - like I said, the decision was above my "pay grade."

    The problem seems to be that when I start up the datastore browser on the source host, the vmdk file shows up as roughly 23GB, giving LOTS of free space. But when I copy the vmdk file using the browser, the destination file becomes 2, a flat file that's the entire provisioned size, and another vmdk file with the original name.

    The weird thing is that I also tried copying the files using FastSCP, but when I open the utility on the source host, it shows the fully provisioned size and flat file name. I've attached screen shots of the datastore browser and fastscp, both of which are showing the same datastore.

    Thanks!

    Mark



  • 7.  RE: Trying to copy a VM from one server to another
    Best Answer

    Posted Oct 24, 2010 03:53 PM

    What you see is by design.

    When you try to copy a thin provisioned disk, either with the datastore browser or FastSCP, the virtual disk will be inflated. Use the Converter instead as recommended by AlbertWT.

    Since the destination virtual disks already needs 60GB of disk space you may not be able to power on the VM, because there is not enough disk space left for the swap file, which has the size of the configured RAM (minus reservation, if any).

    André



  • 8.  RE: Trying to copy a VM from one server to another

    Posted Oct 24, 2010 06:09 AM

    mhlevy,

    First off it sounds like you are a bit confused about what files you are taking from the datastore.......In Vsphere 4, there is a .vmdk file that is a file describing information about your virtual machine and the -flat.vmdk, virtual disk file that contains the data of your virtual disk. Last the .vmx which is your bios file/config file.

    It sounds to me what you are trying to do is grab the files on one ESX server and move them to another ESX server that is not using the same vcenter server if at all.....

    To move machines from one ESX server to another you have to be using shared storage and using vcenter server. Im guessing you are using two different ESX servers with local attached storage on both.

    There are a few ways to accomplish what you want but you can't just add the files and then say add to inventory. The ESX server needs to know what you are doing.

    Easy way to do what you want may be to create a virtual appliance (.ovf format) and export, then import into your other ESX enviornment. That would be my path.You could also create a new virtual machine using the custom option and select use an exsisting virtual disk (the -falt.vmdk file).

    If I assumed wrong on any of this please correct me and I will try and go from there. Good Luck

    Rusty

    VCP4



  • 9.  RE: Trying to copy a VM from one server to another

    Posted Oct 26, 2010 03:58 PM

    Sorry it took so long to get back to you on this. I didn't explain what I was trying to do very well, but you caught it. What management wants me to do is copy a sysprepped VM to multiple ESXi hosts in order to have a "generic" Win7 VM environment for multiple devleopers. The idea is to give the developers a thin client for their desktop, and be able to access their "desktop" from any location. The reason for server HW is for the fault tolerance.

    You're right, I am confused... I've attached a screen-shot of the datastore browser, which doesn't show the "flat" vmdk file. The VM was configured with "thin provisioning" and as you can see, there appears to be plenty of space on the datastore, but when I copy the vmdk file to another ESXi host (whether using the datastore browser, VMware Converter, or FastSCP) the virtual disk file is expanded to the fully provisioned size, and that was what was causing all the problems I was originally having, which was that VMware couldn't "power up" the VM because there wasn't enough free space to create the swap and temp files that VMware need. I don't recall ever having this problem before, in copying VMs (Either on earlier versions of VMware Server, or VMWare Workstation), but then now that I think about it, I never tried copying the VMs to another host.

    My "solution" for this situation was to use Symantec Backup Exec System Recovery Desktop Edition to create a backup of the VM, then restore it to a smaller provisioned disk (the original Win7 virtual disk was 60GB, the "new" Win7 virtual disk is 55GB.

    It looks like this may have solved my problem, thought it would be nice if it didn't expand the disk file to the full size of the provisioned virtual disk file, since it takes nearly 5 hours to copy the virtual disk across the network.

    Thanks again for your help!

    Mark



  • 10.  RE: Trying to copy a VM from one server to another

    Posted Oct 24, 2010 10:57 AM

    Hi,

    What about V2V using VMware Converter 4 ? it is for free of course but it cannot be scheduled.

    Kind Regards,

    AWT