Please advise on right syntax to use raw zfs partitions as XEN disks I create ZFS this way zfs create rpool/vm2/win2008sbs/system and then try to create DomU with the following configuration: disk = [ ''phy:/rpool/vm2/win2008sbs/system,hda,w'' , ''file:/rpool/vm2/iso/sbs_2008.iso,hdc:cdrom,r'' ] But when try to tun it I get this error: Error: Device 768 (vbd) could not be connected. error: "/rpool/vm2/win2008sbs/system" is not a valid block device. What I''m doing wrong ? Thanks a lot. -- This message posted from opensolaris.org
E. Mike Durbin
2009-Dec-27 03:09 UTC
Re: Using raw ZFS partition as XEN disks.Help with syntax.
On 12/26/2009 07:33 PM, Alxen4 wrote:> Please advise on right syntax to use raw zfs partitions as XEN disks > > I create ZFS this way > > zfs create rpool/vm2/win2008sbs/system > > and then try to create DomU with the following configuration: > > disk = [ ''phy:/rpool/vm2/win2008sbs/system,hda,w'' > , ''file:/rpool/vm2/iso/sbs_2008.iso,hdc:cdrom,r'' > ] > > > But when try to tun it I get this error: > > Error: Device 768 (vbd) could not be connected. error: "/rpool/vm2/win2008sbs/system" is not a valid block device. > > What I''m doing wrong ? > > Thanks a lot. >Create a virtual volume: zfs create rpool/guests zfs create -V 20G rpool/guests/win2008sbs then use the corresponding zvol: virt-install \ --hvm \ --os-type windows \ --os-variant win2003 \ -n win2008sbs \ -f /dev/zvol/dsk/rpool/guests/win2008sbs \ --cdrom /rpool/vm2/iso/sbs_2008.iso \ --vnc \ --vcpus=1 \ -r 1024 -- ------------------------------------------------------------------------ * E. Mike Durbin * Architecture Manager *Sun Microsystems, Inc.* 2 Pierce Place, Suite 1700 Itasca, IL 60143 US Phone +1 630 285 7710 Mobile +1 630 965 7710 Fax +1 630 285 8752 Email emike@Sun.COM
Thanks,I will try this,but could you please show me the right syntax for xm(not virsh) configuration file. thanks again. -- This message posted from opensolaris.org
> --hvm \ > --os-type windows \ > --os-variant win2003 \ > -n win2008sbs \ > -f /dev/zvol/dsk/rpool/vm2/win2008sbs \ > --cdrom /rpool/vm2/iso/sbs_2008.iso \ > --vnc \ > --vcpus=1 \ > -r 1024I tried that and got an error ERROR Error with storage parameters: The path ''/dev/zvol/dsk/rpool/vm2/win2008sbs'' must be a file or a device, not a directory Thanks. -- This message posted from opensolaris.org
Fajar A. Nugraha
2009-Dec-27 05:21 UTC
Re: Using raw ZFS partition as XEN disks.Help with syntax.
On Sun, Dec 27, 2009 at 12:07 PM, Alxen4 <yuri@cmsintegra.com> wrote:> I tried that and got an error > > > ERROR Error with storage parameters: The path ''/dev/zvol/dsk/rpool/vm2/win2008sbs'' must be a file or a device, not a directoryDo you know the difference between file, file system, and block device? You previously have a FILE SYSTEM rpool/vm2/win2008sbs/system. That means you have some DIRECTORIES like /rpool/vm2/win2008sbs/system (the filesystem mount point) and /dev/zvol/dsk/rpool/vm2/win2008sbs (a placeholder for zvols under it). xen needs either a FILE or a BLOCK DEVICE. Mike mentioned an example to create a "virtual volume" or zvol (basically a block device) which you can use. So if you''ve done something like this (note "-V") zfs create -V 20G rpool/vm2/win2008sbs/systemdisk you can use it in domU config file like this disk = [ ''phy:/dev/zvol/dsk/rpool/vm2/win2008sbs/systemdisk,hda,w'' ] -- Fajar
Got it....The "-V" option that what I was missing... Ok.It works. But now I''m facing different issue. I guess the filesystem created with "-V" is of type ''block device'',so it has no mountpoint. zfs list rpool/vm2/win2008sbs/system 20G 410G 16K - When I try to set mountpoint like that ,I get an error: zfs set mountpoint=/rpool/vm2/win2008sbs/system rpool/vm2/win2008sbs/system cannot set property for ''rpool/vm2/win2008sbs/system'': ''mountpoint'' does not apply to datasets of this type So how could I access an actual data under that filesystem(i.e. through ls <foldername>) if it has no mountpoint ? (I''m very new to Solaris,sorry if it''s a dumb question) Thanks. -- This message posted from opensolaris.org
Fajar A. Nugraha
2009-Dec-27 07:57 UTC
Re: Using raw ZFS partition as XEN disks.Help with syntax.
On Sun, Dec 27, 2009 at 1:46 PM, Alxen4 <yuri@cmsintegra.com> wrote:> I guess the filesystem created with "-V" is of type ''block device'',so it has no mountpoint.yes..> When I try to set mountpoint like that ,I get an error: > > zfs set mountpoint=/rpool/vm2/win2008sbs/system rpool/vm2/win2008sbs/system > > cannot set property for ''rpool/vm2/win2008sbs/system'': ''mountpoint'' does not apply to datasets of this type > > So how could I access an actual data under that filesystem(i.e. through ls <foldername>) if it has no mountpoint ?A zvol is similar to a disk. Since (assuming from the path) you''ll use Windows 2008 with ntfs on it, you can''t (normally) access the data on solaris. Because solaris doesn''t have native ntfs support. If you need to access the data you need to assign the disk to Windows (or Linux) domU (or share the zvol via iscsi), and mount the partition there. You can access ntfs on solaris via fuse and ntfs-3g (something like http://blogs.sun.com/AlokChakrabarty/entry/how_to_mount_ntfs_and), but AFAIK it''s still considered experimental, so I wouldn''t recommend it. -- Fajar