Good afternoon, I was wondering if anyone has any in site as to how to import a VMware vmdk into xVM on OpenSolaris 2009.06 (xVM 3.1). I have a VMware VM created on VMware Server 2.0 and would like to move it over to this xVM server. I appreciate any advice anyone may have. Cheers, -Chris -- This message posted from opensolaris.org
Chris Jones wrote:> Good afternoon, > > I was wondering if anyone has any in site as to how to import a VMware vmdk> into xVM on OpenSolaris 2009.06 (xVM 3.1). I have a VMware VM created on > VMware Server 2.0 and would like to move it over to this xVM server.> > I appreciate any advice anyone may have.It depends on what the VM is and how it''s configured. i.e. does it do strick H/W checking to verify a valid license (e.g. Windows), do you have a SCSI disk or a IDE based, disk, what NIC are you using, etc.. This might take a little advanced work to setup the guest definition depending on the situation. You may need to d osome guest modification to for some cases. As far as the actual vmdk file file, that should just work fine.. You can use the vmdk file directly, or import into a vdisk which will allow you to snapshot, clone, rollback, etc. I would recommend getting the vmdk file to work as a secondary disk in a xVM installed guest first, then work on trying to boot it. e.g. to use the vmdk directly tap:vdisk:/<path>/mydisk.vmdk or to import it, you can use vdiskadm import. This was an internal, undocumented command in 2009.06, and was changed and documented in snv121. The pre-b121 syntax is... : core2[1]#; vdiskadm help import import - import a zvol, raw file, or virtual disk USAGE: vdiskadm import [-fnpqm] filename vdname EXAMPLE: vdiskadm import /downloads/image.vmdk /export/new_guests/disk1 The >= snv121 syntax is... # vdiskadm help import import - import a zvol, raw file, or virtual disk USAGE: vdiskadm import [-fnpqm] [-x <type>] -d <file|zvol|dsk> [-t <type[:opt]>] vdname EXAMPLE: vdiskadm import -d /downloads/image.vmdk /export/new_guests/disk1 With the b121 version of vdiskadm, you can import/export/convert/translate vmdk(VMWare''s), vhd(Microsoft''s), and vdi(VirtualBox) files i.e. say you wanted to move the vmdk file to a zol vdiskadm translate -i vmdk -I /<path>/mydisk.vmdk -x raw -d /dev/zvol/dsk/rpool/zvols/nevada MRJ
Hi MRJ, Thanks for the valuable info. I was familiar with vdiskadm but I did not know that it had import capabilities as the man page did not support this. After I imported the vmdk I was a little stuck as I couldn''t quite figure out how to create the guest domain using this imported vdisk. I used somewhat of a hackish method in order to create the guest domain. I ran virt-install to fake an installation and specified the vidsk that I had previously imported. Once it was created and running I just rebooted the domain and viola, the domain booted just fine. I noticed virsh has a two subcommands - create and define but I was unable to get them to work as I needed an XML configuration file which normally you can dump from an existing domain. Since my vdisk came from a VMware server I was not able to do this unless I missing something. Cheers, -Chris -- This message posted from opensolaris.org
Chris Jones wrote:> Hi MRJ, > > Thanks for the valuable info. I was familiar with> vdiskadm but I did not know that it had import > capabilities as the man page did not support this. yeah.. It''s in the b121 man page now since the commands have been ARC''d.> After I imported the vmdk I was a little stuck as> I couldn''t quite figure out how to create the guest > domain using this imported vdisk. I used somewhat of > a hackish method in order to create the guest domain. > I ran virt-install to fake an installation and specified > the vidsk that I had previously imported. Once it was > created and running I just rebooted the domain and viola, > the domain booted just fine. Yes, that is officially supported (pointing virt-install to a previsouly created vdisk)... I was concerned that you would have to modify the guest configuration more.. Very cool that it just worked!> I noticed virsh has a two subcommands - create and define> but I was unable to get them to work as I needed an XML > configuration file which normally you can dump from an > existing domain. Since my vdisk came from a VMware server > I was not able to do this unless I missing something. You could create a guest, then copy and modify the xml for the new guest, pointing to the new vdisk or vmdk file. MRJ