Ewan Slater
2010-Jun-21 18:21 UTC
[Xen-users] Complete Xen n00b getting stuck trying to create a VM
Hi, I''ve installed CentOS 5.5 with the virtualisation option. I have also put a copy of the CentOS 5.5 .iso on the filesystem. I then try to create my first vm with virt-install --prompt, and give the path to the .iso for CentOS. Then terminal window runs through to "Creating domain" and the virt viewer opens and asks me what type of media contains the packages to be installed. How can I get it to read the .iso that I specified on the command line? I have tried exporting the directory containing the .iso through NFS, I''ve checked I can mount the directory via NFS and then tried to use this but no dice ("That directory could not be mounted from the server"). I then tried mounting the .iso as a directory on the host file system, and exporting that directory via NFS, but got the same result. What I would ideally like to do is to tell the VM I''m creating that it has a CD/DVD-ROM attached and to point it to the .iso file. Any help would be most gratefully received. Cheers, Ewan _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Fajar A. Nugraha
2010-Jun-22 02:01 UTC
Re: [Xen-users] Complete Xen n00b getting stuck trying to create a VM
On Tue, Jun 22, 2010 at 1:21 AM, Ewan Slater <ewan.slater@googlemail.com> wrote:> I then try to create my first vm with virt-install --prompt, and give > the path to the .iso for CentOS.That won''t work. Basically virt-install and RHEL/Centos installer issue.> How can I get it to read the .iso that I specified on the command line?You can''t. Not directly.> > I have tried exporting the directory containing the .iso through NFS, > I''ve checked I can mount the directory via NFS and then tried to use > this but no dice ("That directory could not be mounted from the > server"). I then tried mounting the .iso as a directory on the host > file system, and exporting that directory via NFS, but got the same > result.That SHOULD work. Perhaps some IP range or path mixup? IMHO, the easiest way is to simply use http. Something like: - install httpd on your dom0 - create /var/www/html/iso - mount your ISO there - use http://ip_of_your_dom_0/iso as installation source.> > What I would ideally like to do is to tell the VM I''m creating that it > has a CD/DVD-ROM attached and to point it to the .iso file.Again, you can''t. Opensolaris can do it just fine. RHEL/Centos currently can''t do it when installing as PV guest, thus the http workaround needed. -- Fajar _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Ewan Slater
2010-Jun-22 08:16 UTC
Re: [Xen-users] Complete Xen n00b getting stuck trying to create a VM
Thanks for the tip. Set up httpd and mounted iso as suggested. Confirmed that I can browse to the contents of the iso using FireFox. Started the install using virt install. Then the installer in the VM tells me that it is "unable to retrieve http://192.168.1.71//iso/images/stage2.img". Note the "//" after the ip address. I am definitely not putting a second slash in there when I specify the URL. As I said, I can browse to the URL just fine, and see stage2.img. Any suggestions? Cheers, Ewan On 22 June 2010 03:01, Fajar A. Nugraha <fajar@fajar.net> wrote:> On Tue, Jun 22, 2010 at 1:21 AM, Ewan Slater <ewan.slater@googlemail.com> wrote: >> I then try to create my first vm with virt-install --prompt, and give >> the path to the .iso for CentOS. > > That won''t work. Basically virt-install and RHEL/Centos installer issue. > >> How can I get it to read the .iso that I specified on the command line? > > You can''t. Not directly. > >> >> I have tried exporting the directory containing the .iso through NFS, >> I''ve checked I can mount the directory via NFS and then tried to use >> this but no dice ("That directory could not be mounted from the >> server"). I then tried mounting the .iso as a directory on the host >> file system, and exporting that directory via NFS, but got the same >> result. > > That SHOULD work. Perhaps some IP range or path mixup? > IMHO, the easiest way is to simply use http. Something like: > - install httpd on your dom0 > - create /var/www/html/iso > - mount your ISO there > - use http://ip_of_your_dom_0/iso as installation source. > >> >> What I would ideally like to do is to tell the VM I''m creating that it >> has a CD/DVD-ROM attached and to point it to the .iso file. > > Again, you can''t. Opensolaris can do it just fine. RHEL/Centos > currently can''t do it when installing as PV guest, thus the http > workaround needed. > > -- > Fajar >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Fajar A. Nugraha
2010-Jun-22 09:11 UTC
Re: [Xen-users] Complete Xen n00b getting stuck trying to create a VM
On Tue, Jun 22, 2010 at 3:16 PM, Ewan Slater <ewan.slater@googlemail.com> wrote:> Then the installer in the VM tells me that it is "unable to retrieve > http://192.168.1.71//iso/images/stage2.img". Note the "//" after the > ip address. I am definitely not putting a second slash in there when > I specify the URL. >The extra slash should be fine. I''m more concern about your network setup. What does your virt-install line look like? does domU get an IP address? does http log on dom0 shows ANY access from domU''s IP address? Usually it''s easier to put domU on virbr0 bridge, and let domU use dhcp to configure its IP address.> As I said, I can browse to the URL just fine, and see stage2.img.Can you download it to your computer? Just trying to eliminate possible selinux/permission-related problem. -- Fajar _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Ewan Slater
2010-Jun-22 10:17 UTC
Re: [Xen-users] Complete Xen n00b getting stuck trying to create a VM
What I''m trying to do is to run through the example on page 18 of "The Book of Xen" by Takemura & Crawford. I''m trying to use CentOS because that''s what they used in the book. so CentOS host with virtualisation. Getting it''s ip address from DHCP. my virt-install is as follows: [root@localhost ~]# virt-install --prompt What is the name of your virtual machine? capello How much RAM should be allocated (in megabytes)? 256 What would you like to use as the disk (file path)? /var/lib/xen/images/capello.img How large would you like the disk (/var/lib/xen/images/capello.img) to be (in gigabytes)? 4 What is the install URL? http://192.168.1.73/iso Starting install... Retrieving file .treeinfo... | 413 B 00:00 Retrieving file vmlinuz... | 2.1 MB 00:00 Retrieving file initrd.img... | 7.2 MB 00:00 Creating storage file... | 4.0 GB 00:00 Creating domain... | 0 B 00:00 The apache error_log contains the following: [Tue Jun 22 07:22:42 2010] [error] [client 192.168.1.73] (70014)End of file found: mod_mime_magic: read failed from uncompress of /var/www/html/iso/images/xen/vmlinuz I did tail -f on the access_log but nothing seems to be being written there. How would I tell if the DomU gets an IP address (I specified DHCP when prompted by the install in the VM)? Cheers, Ewan On 22 June 2010 10:11, Fajar A. Nugraha <fajar@fajar.net> wrote:> On Tue, Jun 22, 2010 at 3:16 PM, Ewan Slater <ewan.slater@googlemail.com> wrote: >> Then the installer in the VM tells me that it is "unable to retrieve >> http://192.168.1.71//iso/images/stage2.img". Note the "//" after the >> ip address. I am definitely not putting a second slash in there when >> I specify the URL. >> > > The extra slash should be fine. I''m more concern about your network > setup. What does your virt-install line look like? does domU get an IP > address? does http log on dom0 shows ANY access from domU''s IP > address? > > Usually it''s easier to put domU on virbr0 bridge, and let domU use > dhcp to configure its IP address. > >> As I said, I can browse to the URL just fine, and see stage2.img. > > Can you download it to your computer? Just trying to eliminate > possible selinux/permission-related problem. > > -- > Fajar >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Fajar A. Nugraha
2010-Jun-22 11:38 UTC
Re: [Xen-users] Complete Xen n00b getting stuck trying to create a VM
On Tue, Jun 22, 2010 at 5:17 PM, Ewan Slater <ewan.slater@googlemail.com> wrote:> my virt-install is as follows: > > [root@localhost ~]# virt-install --promptit doesn''t ask about any network parameters?> [Tue Jun 22 07:22:42 2010] [error] [client 192.168.1.73] (70014)End of > file found: mod_mime_magic: read failed from uncompress of > /var/www/html/iso/images/xen/vmlinuzThat shouldn''t be from domU. Like your domU error said, it''s looking for stage2.img. Is there anything about stage2.img on your access/error log? If not, then it''s still basic networking issue.> How would I tell if the DomU gets an IP address (I specified DHCP when > prompted by the install in the VM)?Here''s some things you could do: - make sure dom0''s firewall (if any) allows domU to connect - make sure you got domU with a GUI. using "virt-manager" might be easier, as it allows you to easily see resource allocation (including NIC) - when installing domU, use shortcut to switch to another session on domU (Alt-F2 or possibly Ctrl-Alt-F2.). From that text session you can issue commands like ping and ifconfig to verify that domU can connect to dom0 IP address. -- Fajar _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
ewan.slater@googlemail.com
2010-Jun-22 13:41 UTC
Re: [Xen-users] Complete Xen n00b getting stuck trying to create a VM
Hi Fajar, Yes, you're right - firewall issue. Thanks for all the help :-) Ewan ------Original Message------ From: Fajar A. Nugraha To: Ewan Slater Cc: xen-users@lists.xensource.com Subject: Re: [Xen-users] Complete Xen n00b getting stuck trying to create a VM Sent: 22 Jun 2010 12:38 On Tue, Jun 22, 2010 at 5:17 PM, Ewan Slater <ewan.slater@googlemail.com> wrote:> my virt-install is as follows: > > [root@localhost ~]# virt-install --promptit doesn't ask about any network parameters?> [Tue Jun 22 07:22:42 2010] [error] [client 192.168.1.73] (70014)End of > file found: mod_mime_magic: read failed from uncompress of > /var/www/html/iso/images/xen/vmlinuzThat shouldn't be from domU. Like your domU error said, it's looking for stage2.img. Is there anything about stage2.img on your access/error log? If not, then it's still basic networking issue.> How would I tell if the DomU gets an IP address (I specified DHCP when > prompted by the install in the VM)?Here's some things you could do: - make sure dom0's firewall (if any) allows domU to connect - make sure you got domU with a GUI. using "virt-manager" might be easier, as it allows you to easily see resource allocation (including NIC) - when installing domU, use shortcut to switch to another session on domU (Alt-F2 or possibly Ctrl-Alt-F2.). From that text session you can issue commands like ping and ifconfig to verify that domU can connect to dom0 IP address. -- Fajar Sent from my BlackBerry® wireless device _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users