From owner-freebsd-virtualization@FreeBSD.ORG Mon Feb 18 03:35:19 2013 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 821) id 344F84D8; Mon, 18 Feb 2013 03:35:19 +0000 (UTC) Date: Mon, 18 Feb 2013 03:35:19 +0000 From: John To: FreeBSD Virtualization Subject: ReadOnly iSCSI disk with Virtualbox? Message-ID: <20130218033519.GA34629@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Feb 2013 03:35:19 -0000 Hi Folks, I've been using VB with iSCSI disks hosted on a FreeBSD system using istgt for a while with no problems. The system hosting VB is fbsd9.1. Recently I wanted to use a single zvol and export it to 100+ VB systems in ReadOnly mode. The OS on the way up recognizes the hd is R/O and mounts a tmpfs filesystem for those areas that need it. My thoughts on enforcing the ReadOnly disk: 1. Attach the iSCSI drive with "--mtype readonly" 2. Export the zvol with the istgt option "ReadOnly Yes" Unfortunately, neither of the above work. #1 fails to attach the disk to the VM: VBoxManage storageattach $vmname --storagectl "SATA Controller" \ --type hdd \ --port $devport --device 0 \ --medium iscsi \ --server $ip \ --tport $port \ --target $iqn \ --mtype shareable \ --initiator $initiator VBoxManage: error: Cannot change type for medium '192.168.22.231|iqn.2012-02.com.example:jwd1:1' to 'Readonly' since it is a hard disk VBoxManage: error: Details: code VBOX_E_INVALID_OBJECT_STATE (0x80bb0007), component Medium, interface IMedium, callee nsISupports VBoxManage: error: Context: "COMSETTER(Type)(mediumType)" at line 678 of file VBoxManageStorageController.cpp VBoxManage: error: Failed to set the medium type The #2 option also fails: The attach of the hard drive succeeds, the failure occurs when the virtual machine is started: VBoxHeadless --startvm jwd1 ... Error: failed to start machine. Error message: VD: error VERR_VD_IMAGE_READ_ONLY opening image file '172.21.22.231|iqn.2012-02.com.sas.unx:jwd1:1' (VERR_VD_IMAGE_READ_ONLY). Failed to open image '172.21.22.231|iqn.2012-02.com.sas.unx:jwd1:1' in read-write mode rc=VERR_VD_IMAGE_READ_ONLY (VERR_VD_IMAGE_READ_ONLY). Failed to attach driver below us! Image is read-only. (VERR_VD_IMAGE_READ_ONLY). AHCI: Failed to attach drive to Port0 (VERR_VD_IMAGE_READ_ONLY) Has anyone else tried doing this and/or have a different of approaching the problem? Or, do I need to start patching code? Any thoughts are appreciated. Thanks, John From owner-freebsd-virtualization@FreeBSD.ORG Mon Feb 18 11:06:55 2013 Return-Path: Delivered-To: freebsd-virtualization@FreeBSD.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 2FFF7242 for ; Mon, 18 Feb 2013 11:06:55 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 1C948E3F for ; Mon, 18 Feb 2013 11:06:55 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.6/8.14.6) with ESMTP id r1IB6sXW061747 for ; Mon, 18 Feb 2013 11:06:54 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.6/8.14.6/Submit) id r1IB6sov061745 for freebsd-virtualization@FreeBSD.org; Mon, 18 Feb 2013 11:06:54 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 18 Feb 2013 11:06:54 GMT Message-Id: <201302181106.r1IB6sov061745@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-virtualization@FreeBSD.org Subject: Current problem reports assigned to freebsd-virtualization@FreeBSD.org X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Feb 2013 11:06:55 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o kern/170096 virtualization[vimage] Dynamically-attached network interface will c o kern/169991 virtualization[run] [vimage] panic after device plugged in o kern/165252 virtualization[vimage] [pf] [panic] kernel panics with VIMAGE and PF o kern/161094 virtualization[vimage] [pf] [panic] kernel panic with pf + VIMAGE wh o kern/160541 virtualization[vimage][pf][patch] panic: userret: Returning on td 0x o kern/160496 virtualization[vimage] [pf] [patch] kernel panic with pf + VIMAGE o kern/148155 virtualization[vimage] [pf] Kernel panic with PF/IPFilter + VIMAGE k a kern/147950 virtualization[vimage] [carp] VIMAGE + CARP = kernel crash s kern/143808 virtualization[pf] pf does not work inside jail a kern/141696 virtualization[rum] [vimage] [panic] rum(4)+ vimage = kernel panic 10 problems total.