Kickstarting VM fails
I'm reading Michael Jang's RHCSA/RHCE Study Guide and have encountered a problem I can't solve. One of the exercises runs through the process of using virt-install to create a VM and install RHEL 6 onto it. The command in the book, while slightly wrong, is mostly right:
Code:
[root@study qemu]# virt-install -n outsider1.example.org -r 768 --disk path=/var/lib/libvirt/images/outsider1.example.org.img,size=12 -l ftp://192.168.100.1/pub/inst -x "ks=ftp://192.168.100.1/pub/ks/outsider1.cfg" I've verified that the ftp server is accessible from the three networks on the system I'm using: virbr0: 192.168.122.1, virbr1: 192.168.100.1 and eth0: 192.168.1.4. Has anyone else encountered this and found the solution? I've even tried the one method suggested by another user in that thread which is to add the "--network network=outsider" parameter to the virt-install command. This did not solve the problem. |
Hi theillen,
Two common problems that you should check: 1) Permissions -- since you're using an FTP server, the Kickstart file can't be read unless there are read permissions for all users 2) SELinux contexts -- make sure it matches the defaults for the /var/ftp/pub directory (I assume you're the person who has also posted in the message list on the Amazon page for the book. FYI, I sometimes also check the cert subforum here, http://www.linuxquestions.org/questi...tification-46/ .) For more info, see p. 97-100 in the book. |
Yes, that was me.
Permissions and contexts are all aligned: Code:
|
Is your FTP server running? (run /etc/init.d/vsftpd status) While it's not the best security practice, it's often advisable to run a command like
chkconfig vsftp on to make sure it's running on reboot too. Other thought -- In the Virtual Machine Manager, click Edit | Connection Details click the Virtual Networks tab Do you see the 192.168.100.0 network (which I labeled as "outsider" in the book) in the list? |
Yes it is running and I can connect from the three IPs listed.
|
Okay, let's try something else. I just ran the following command:
virt-install -x "ks=ftp://192.168.100.1/pub/ks/outsider1-ks.cfg" -l /var/ftp/pub/inst --prompt I'm then prompted for options, as follows Quote:
edit -- that was sloppy -- just checked again, and you can sub ftp://192.168.100.1/pub/inst for /var/ftp/pub/inst If you still get the error, let me know where. |
I get the same result: When trying to download the kickstart file it fails to connect to the server. This makes me wonder about network configuration. I don't have a DHCP server dishing out configurations to these as far as I know unless they're being bridged to my main home network. That doesn't seem to be the case, though. How do I force a network configuration?
|
OK, I've tried various options to try to replicate your issue. Here's what I find.
My virbr1 device is the outsider VM network, with IP address 192.168.100.1 Normally, it's running, as confirmed by this output excerpt to the ifconfig virbr1 command virbr1 Link encap:Ethernet HWaddr 52:54:00:35:84:FF inet addr:192.168.100.1 Bcast:192.168.100.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 When it's down, I see this instead in the third line: BROADCAST MULTICAST MTU:1500 Metric:1 In that case, in the VNC window that appears, I get the following error message: failed to retrieve ftp://192.168.100.1/pub/ks/outsider1-ks.cfg: Couldn't connect to server If this is where you're seeing the connection problem, check for activity on your virtual network devices. If you do get the VNC window at all, click Send Key | Ctrl+Alt+F3 and Send Key | Ctrl+Alt+F4 for messages associated with the VM creation process. Alternatively, if you get an error message at the command line, before any VNC window appears, it might look something like: ERROR [Errno 111] Connection refused or ERROR [Errno 113] No route to host (To indirectly answer your question about forcing network configuration -- make sure your libvirtd and libvirt-guests services are running. That also controls the virtual network devices.) |
I do see the "failed to retrieve ftp://192.168.100.1/pub/ks/outsider1-ks.cfg: Couldn't connect to server" error. I'll have to double-check the configuration of the virbr1 interface. I've been fairly certain that it is active, but I could be wrong.
|
When you do check the virbr1 device, also check the messages in the third and fourth virtual consoles (click Send Key | Ctrl+Alt+F3 and Send Key | Ctrl+Alt+F4 ). The messages in those consoles can also provide clues.
|
Hi, if you using default network then your ftp server it should point to 192.168.122.1
try this [root@study qemu]# virt-install -n outsider1.example.org -r 768 --disk path=/var/lib/libvirt/images/outsider1.example.org.img,size=12 -l ftp://192.168.122.1/pub/inst -x "ks=ftp://192.168.122.1/pub/ks/outsider1.cfg" |
Dear Saifelyzal,
Thanks for your note. What you say is true. However, one of the points of the example.org network (192.168.100.0/24) is that it represents an outside network (not the default) -- subsequent firewall options in the book are designed to prevent access from that network. |
then you need to create bridge network to access that network from the vm.
|
I do include instructions on how to create that second "outsider" network, in Chapter 2, Exercise 2-1.
|
Images indicating the errors I'm getting:
https://picasaweb.google.com/lh/phot...eat=directlink https://picasaweb.google.com/lh/phot...eat=directlink https://picasaweb.google.com/lh/phot...eat=directlink |
All times are GMT -5. The time now is 05:58 PM. |