From owner-freebsd-questions@FreeBSD.ORG Fri May 29 14:53:54 2015 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CC6A8231 for ; Fri, 29 May 2015 14:53:54 +0000 (UTC) (envelope-from dnewman@networktest.com) Received: from mail5.networktest.com (mail5.networktest.com [204.109.60.142]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A8A431433 for ; Fri, 29 May 2015 14:53:54 +0000 (UTC) (envelope-from dnewman@networktest.com) Received: from localhost (localhost [127.0.0.1]) by mail5.networktest.com (Postfix) with ESMTP id 01B9239DC33 for ; Fri, 29 May 2015 07:47:07 -0700 (PDT) Received: from mail5.networktest.com ([127.0.0.1]) by localhost (mail5.networktest.com [127.0.0.1]) (maiad, port 10024) with ESMTP id 15686-08 for ; Fri, 29 May 2015 07:47:06 -0700 (PDT) Received: from tejay-2.local (cpe-75-82-83-187.socal.res.rr.com [75.82.83.187]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: dnewman@networktest.com) by mail5.networktest.com (Postfix) with ESMTPSA id A831839DC25 for ; Fri, 29 May 2015 07:47:06 -0700 (PDT) Message-ID: <55687BE9.40803@networktest.com> Date: Fri, 29 May 2015 07:47:05 -0700 From: David Newman User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: freebsd-questions@freebsd.org Subject: Missing boot loader (was: Re: creating a virtual clone) References: <5522C5DE.1050005@networktest.com> In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 May 2015 14:53:55 -0000 On 4/6/15 9:28 PM, Olivier Nicole wrote: > My solution is http://www.cs.ait.ac.th/~on/technotes/archives/2015/01/30/how-to_clone_a_freebsd_virtual_machine_on_vmware/index.html > certainly not the best/fastest, but it works. Thanks for this. After following the clone instructions, restore appears to work, but the system comes up with a "Missing boot loader" error. This is perhaps because the next-to-last step from the live CD is: cd / mount -o rw /dev/da0p1 /mnt gpart bootcode -b /mnt/boot/pmbr -p /mnt/boot/gptboot -i 1 da0 And that returns "/dev/da0p1: Operation not permitted" even though da0p1 is the target system's root/boot partition. I've pasted below the complete procedure. What's missing? Thanks in advance for troubleshooting clues. dn 1. Create the virtual machine with vSphere client 2. Boot VM using FreeBSD live CD 3. Partition disk (one ufs in da0p1, one swap in da0p2, do newfs on da0p1) 4. enable and start network interface on target VM: ifconfig em0 inet 1.1.1.2/24 5. mount root system on VM with 'mount /dev/da0p1 /mnt' 6. copy dump source filesystem using restore: cd /mnt ssh user@1.1.1.1 "cat /home/user/srcmachine.dump" | restore -r -f - cd / umount /mnt 7. enable and start network interface on target VM: ifconfig em0 inet 1.1.1.2/24 8. configure the bootloader: mount /dev/da0p1 /mnt gpart bootcode -b /mnt/boot/pmbr -p /mnt/boot/gptboot -i 1 da0 ((NOTE: Per the notes above, this step does not work.)) 9. Configure /mnt/etc/fstab to use /dev/da0p1 as root and /dev/da0p2 as swap > > Best regards, > > Olivier > > On Tue, Apr 7, 2015 at 12:43 AM, David Newman wrote: >> To test some new software, I'd like to replicate a 9.3-RELEASE machine >> and run it as a virtual machine (in this case inside VMware vSphere, but >> I'm open to using other hypervisors if this isn't possible with VMware). >> >> The 9.3 host is itself virtual, running as a VPS instance in a colo. >> >> What's the best way to do this? >> >> Thanks! >> >> dn >> >> _______________________________________________ >> freebsd-questions@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-questions >> To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" >