Laine Stump
2012-Feb-14 17:01 UTC
[libvirt-users] [libvirt] Fail to import available VM image
On 02/14/2012 11:01 AM, Jun Koi wrote:> On Tue, Feb 14, 2012 at 11:47 PM, Alex Jia <ajia at redhat.com> wrote: >> Hi Jun, >> I assume you haven't changed libvirt default URI, it may be a issue, >> I want to know whether it works for you if you explicitly specify >> --connect qemu:///system with virt-install? I think a root reason >> probably is your disk image location, the log said it can't find >> storage volume, if you put img.winp under the /var/lib/libvirt/images, >> then give a disk absolute path to virt-install, Does it work for you? > ok, i change the command a bit, and it went further. > here is how i did: > > (1) compiled everything from source, then install (make install) to my Ubuntu > > (2) start libvirtd on commandline > # libvirtd -d > > (3) import my KVM image to libvirt > > $ virt-install --connect qemu:///system -n winxp -r 800 --accelerate > --vnc -v --noautoconsole --import -f /home/jun/img/img.winxp > > it failed, and the log is like below: > > .... > [Tue, 14 Feb 2012 23:51:49 virt-install 3831] DEBUG (cli:326) > Requesting libvirt URI qemu:///system > [Tue, 14 Feb 2012 23:51:51 virt-install 3831] DEBUG (cli:328) Received > libvirt URI qemu:///system > [Tue, 14 Feb 2012 23:51:52 virt-install 3831] DEBUG (virt-install:259) > Requesting virt method 'hvm', hv type 'default'. > [Tue, 14 Feb 2012 23:51:52 virt-install 3831] DEBUG (virt-install:469) > Received virt method 'hvm' > [Tue, 14 Feb 2012 23:51:52 virt-install 3831] DEBUG (virt-install:470) > Hypervisor name is 'kvm' > [Tue, 14 Feb 2012 23:51:52 virt-install 3831] ERROR (cli:439) Error in > network device parameters: Virtual network 'default' has not been > started. > [Tue, 14 Feb 2012 23:51:52 virt-install 3831] DEBUG (cli:440) > Traceback (most recent call last): > File "/usr/local/lib/python2.6/dist-packages/virtinst/cli.py", line > 884, in get_networks > dev = parse_network(guest, netstr, mac=mac) > File "/usr/local/lib/python2.6/dist-packages/virtinst/cli.py", line > 1642, in parse_network > bridge=opts.get("bridge")) > File "/usr/local/lib/python2.6/dist-packages/virtinst/VirtualNetworkInterface.py", > line 153, in __init__ > self.network = network > File "/usr/local/lib/python2.6/dist-packages/virtinst/XMLBuilderDomain.py", > line 309, in new_setter > fset(self, val, *args, **kwargs) > File "/usr/local/lib/python2.6/dist-packages/virtinst/VirtualNetworkInterface.py", > line 257, in set_network > "started.") % newnet) > ValueError: Virtual network 'default' has not been started.A very common cause of this problem is that a systemwide instance of dnsmasq is already (erroneously) listening on the bridge created by libvirt for the default network. I took your email as an oppurtunity to write an entry in the new Troubleshooting section of the libvirt wiki. It will explain to you how to solve your problem (*if* this is your problem, of course :-). http://wiki.libvirt.org/page/Virtual_network_%27default%27_has_not_been_started If that ends up not being your problem, please reply to this message, but sending the reply to libvirt-users at redhat.com (I also Cc'ed this message there) rather than to libvir-list at redhat.com. (The former is the official list for user questions about libvirt, whil libvir-list is intended for for people discussing the code.)> i guess perhaps just starting "libvirtd -d" on commandline is not > enough. do i need a script to configure and start libvirtd properly > for me? > and it seems i must configure the virtual network somehow?The "default" network should already be there as part of the stock install.
Alex Jia
2012-Feb-15 02:38 UTC
[libvirt-users] [libvirt] Fail to import available VM image
On 02/15/2012 01:01 AM, Laine Stump wrote:> On 02/14/2012 11:01 AM, Jun Koi wrote: >> On Tue, Feb 14, 2012 at 11:47 PM, Alex Jia<ajia at redhat.com> wrote: >>> Hi Jun, >>> I assume you haven't changed libvirt default URI, it may be a issue, >>> I want to know whether it works for you if you explicitly specify >>> --connect qemu:///system with virt-install? I think a root reason >>> probably is your disk image location, the log said it can't find >>> storage volume, if you put img.winp under the /var/lib/libvirt/images, >>> then give a disk absolute path to virt-install, Does it work for you? >> ok, i change the command a bit, and it went further. >> here is how i did: >> >> (1) compiled everything from source, then install (make install) to my Ubuntu >> >> (2) start libvirtd on commandline >> # libvirtd -d >> >> (3) import my KVM image to libvirt >> >> $ virt-install --connect qemu:///system -n winxp -r 800 --accelerate >> --vnc -v --noautoconsole --import -f /home/jun/img/img.winxp >> >> it failed, and the log is like below: >> >> .... >> [Tue, 14 Feb 2012 23:51:49 virt-install 3831] DEBUG (cli:326) >> Requesting libvirt URI qemu:///system >> [Tue, 14 Feb 2012 23:51:51 virt-install 3831] DEBUG (cli:328) Received >> libvirt URI qemu:///system >> [Tue, 14 Feb 2012 23:51:52 virt-install 3831] DEBUG (virt-install:259) >> Requesting virt method 'hvm', hv type 'default'. >> [Tue, 14 Feb 2012 23:51:52 virt-install 3831] DEBUG (virt-install:469) >> Received virt method 'hvm' >> [Tue, 14 Feb 2012 23:51:52 virt-install 3831] DEBUG (virt-install:470) >> Hypervisor name is 'kvm' >> [Tue, 14 Feb 2012 23:51:52 virt-install 3831] ERROR (cli:439) Error in >> network device parameters: Virtual network 'default' has not been >> started. >> [Tue, 14 Feb 2012 23:51:52 virt-install 3831] DEBUG (cli:440) >> Traceback (most recent call last): >> File "/usr/local/lib/python2.6/dist-packages/virtinst/cli.py", line >> 884, in get_networks >> dev = parse_network(guest, netstr, mac=mac) >> File "/usr/local/lib/python2.6/dist-packages/virtinst/cli.py", line >> 1642, in parse_network >> bridge=opts.get("bridge")) >> File "/usr/local/lib/python2.6/dist-packages/virtinst/VirtualNetworkInterface.py", >> line 153, in __init__ >> self.network = network >> File "/usr/local/lib/python2.6/dist-packages/virtinst/XMLBuilderDomain.py", >> line 309, in new_setter >> fset(self, val, *args, **kwargs) >> File "/usr/local/lib/python2.6/dist-packages/virtinst/VirtualNetworkInterface.py", >> line 257, in set_network >> "started.") % newnet) >> ValueError: Virtual network 'default' has not been started. > A very common cause of this problem is that a systemwide instance of > dnsmasq is already (erroneously) listening on the bridge created by > libvirt for the default network.Laine, yeah, I'm missing this important reason.> I took your email as an oppurtunity to > write an entry in the new Troubleshooting section of the libvirt wiki. > It will explain to you how to solve your problem (*if* this is your > problem, of course :-). > > > http://wiki.libvirt.org/page/Virtual_network_%27default%27_has_not_been_startedGreat, I want to tidy up a doc about this ago, it should be very helpful for a new guys. Thanks & Regards, Alex> If that ends up not being your problem, please reply to this message, > but sending the reply to libvirt-users at redhat.com (I also Cc'ed this > message there) rather than to libvir-list at redhat.com. (The former is the > official list for user questions about libvirt, whil libvir-list is > intended for for people discussing the code.) > > >> i guess perhaps just starting "libvirtd -d" on commandline is not >> enough. do i need a script to configure and start libvirtd properly >> for me? >> and it seems i must configure the virtual network somehow? > The "default" network should already be there as part of the stock install. > > > -- > libvir-list mailing list > libvir-list at redhat.com > https://www.redhat.com/mailman/listinfo/libvir-list
On Wed, Feb 15, 2012 at 1:01 AM, Laine Stump <laine at laine.org> wrote:> On 02/14/2012 11:01 AM, Jun Koi wrote: >> On Tue, Feb 14, 2012 at 11:47 PM, Alex Jia <ajia at redhat.com> wrote: >>> Hi Jun, >>> I assume you haven't changed libvirt default URI, it may be a issue, >>> I want to know whether it works for you if you explicitly specify >>> --connect qemu:///system with virt-install? I think a root reason >>> probably is your disk image location, the log said it can't find >>> storage volume, if you put img.winp under the /var/lib/libvirt/images, >>> then give a disk absolute path to virt-install, Does it work for you? >> ok, i change the command a bit, and it went further. >> here is how i did: >> >> (1) compiled everything from source, then install (make install) to my Ubuntu >> >> (2) start libvirtd on commandline >> # libvirtd -d >> >> (3) import my KVM image to libvirt >> >> $ virt-install --connect qemu:///system -n winxp -r 800 --accelerate >> --vnc -v --noautoconsole --import -f /home/jun/img/img.winxp >> >> it failed, and the log is like below: >> >> .... >> [Tue, 14 Feb 2012 23:51:49 virt-install 3831] DEBUG (cli:326) >> Requesting libvirt URI qemu:///system >> [Tue, 14 Feb 2012 23:51:51 virt-install 3831] DEBUG (cli:328) Received >> libvirt URI qemu:///system >> [Tue, 14 Feb 2012 23:51:52 virt-install 3831] DEBUG (virt-install:259) >> Requesting virt method 'hvm', hv type 'default'. >> [Tue, 14 Feb 2012 23:51:52 virt-install 3831] DEBUG (virt-install:469) >> Received virt method 'hvm' >> [Tue, 14 Feb 2012 23:51:52 virt-install 3831] DEBUG (virt-install:470) >> Hypervisor name is 'kvm' >> [Tue, 14 Feb 2012 23:51:52 virt-install 3831] ERROR (cli:439) Error in >> network device parameters: Virtual network 'default' has not been >> started. >> [Tue, 14 Feb 2012 23:51:52 virt-install 3831] DEBUG (cli:440) >> Traceback (most recent call last): >> ? File "/usr/local/lib/python2.6/dist-packages/virtinst/cli.py", line >> 884, in get_networks >> ? ? dev = parse_network(guest, netstr, mac=mac) >> ? File "/usr/local/lib/python2.6/dist-packages/virtinst/cli.py", line >> 1642, in parse_network >> ? ? bridge=opts.get("bridge")) >> ? File "/usr/local/lib/python2.6/dist-packages/virtinst/VirtualNetworkInterface.py", >> line 153, in __init__ >> ? ? self.network = network >> ? File "/usr/local/lib/python2.6/dist-packages/virtinst/XMLBuilderDomain.py", >> line 309, in new_setter >> ? ? fset(self, val, *args, **kwargs) >> ? File "/usr/local/lib/python2.6/dist-packages/virtinst/VirtualNetworkInterface.py", >> line 257, in set_network >> ? ? "started.") % newnet) >> ValueError: Virtual network 'default' has not been started. > > A very common cause of this problem is that a systemwide instance of > dnsmasq is already (erroneously) listening on the bridge created by > libvirt for the default network. I took your email as an oppurtunity to > write an entry in the new Troubleshooting section of the libvirt wiki. > It will explain to you how to solve your problem (*if* this is your > problem, of course :-).this is not my problem, as i dont use dnsmasq. below is my /var/log/libvirt/libvirtd.log .... 2012-02-15 01:54:18.358+0000: 10580: info : libvirt version: 0.9.10 2012-02-15 01:54:18.358+0000: 10580: error : virCommandWait:2308 : internal error Child process (/sbin/iptables --table mangle --delete POSTROUTING --out-interface virbr0 --protocol udp --destination-port 68 --jump CHECKSUM --checksum-fill) status unexpected: exit status 2 2012-02-15 01:54:18.367+0000: 10580: error : virCommandWait:2308 : internal error Child process (/sbin/iptables --table mangle --insert POSTROUTING --out-interface virbr0 --protocol udp --destination-port 68 --jump CHECKSUM --checksum-fill) status unexpected: exit status 2 2012-02-15 01:54:18.367+0000: 10580: warning : networkAddGeneralIptablesRules:1301 : Could not add rule to fixup DHCP response checksums on network 'default'. 2012-02-15 01:54:18.367+0000: 10580: warning : networkAddGeneralIptablesRules:1302 : May need to update iptables package & kernel to support CHECKSUM rule. and currently output of "brctl show" is: # brctl show bridge name bridge id STP enabled interfaces pan0 8000.000000000000 no virbr0 8000.000000000000 yes so what is wrong with my system? thanks, Jun
Alex Jia
2012-Feb-15 03:32 UTC
[libvirt-users] [libvirt] Fail to import available VM image
On 02/15/2012 10:53 AM, Jun Koi wrote:> On Wed, Feb 15, 2012 at 1:01 AM, Laine Stump<laine at laine.org> wrote: >> On 02/14/2012 11:01 AM, Jun Koi wrote: >>> On Tue, Feb 14, 2012 at 11:47 PM, Alex Jia<ajia at redhat.com> wrote: >>>> Hi Jun, >>>> I assume you haven't changed libvirt default URI, it may be a issue, >>>> I want to know whether it works for you if you explicitly specify >>>> --connect qemu:///system with virt-install? I think a root reason >>>> probably is your disk image location, the log said it can't find >>>> storage volume, if you put img.winp under the /var/lib/libvirt/images, >>>> then give a disk absolute path to virt-install, Does it work for you? >>> ok, i change the command a bit, and it went further. >>> here is how i did: >>> >>> (1) compiled everything from source, then install (make install) to my Ubuntu >>> >>> (2) start libvirtd on commandline >>> # libvirtd -d >>> >>> (3) import my KVM image to libvirt >>> >>> $ virt-install --connect qemu:///system -n winxp -r 800 --accelerate >>> --vnc -v --noautoconsole --import -f /home/jun/img/img.winxp >>> >>> it failed, and the log is like below: >>> >>> .... >>> [Tue, 14 Feb 2012 23:51:49 virt-install 3831] DEBUG (cli:326) >>> Requesting libvirt URI qemu:///system >>> [Tue, 14 Feb 2012 23:51:51 virt-install 3831] DEBUG (cli:328) Received >>> libvirt URI qemu:///system >>> [Tue, 14 Feb 2012 23:51:52 virt-install 3831] DEBUG (virt-install:259) >>> Requesting virt method 'hvm', hv type 'default'. >>> [Tue, 14 Feb 2012 23:51:52 virt-install 3831] DEBUG (virt-install:469) >>> Received virt method 'hvm' >>> [Tue, 14 Feb 2012 23:51:52 virt-install 3831] DEBUG (virt-install:470) >>> Hypervisor name is 'kvm' >>> [Tue, 14 Feb 2012 23:51:52 virt-install 3831] ERROR (cli:439) Error in >>> network device parameters: Virtual network 'default' has not been >>> started. >>> [Tue, 14 Feb 2012 23:51:52 virt-install 3831] DEBUG (cli:440) >>> Traceback (most recent call last): >>> File "/usr/local/lib/python2.6/dist-packages/virtinst/cli.py", line >>> 884, in get_networks >>> dev = parse_network(guest, netstr, mac=mac) >>> File "/usr/local/lib/python2.6/dist-packages/virtinst/cli.py", line >>> 1642, in parse_network >>> bridge=opts.get("bridge")) >>> File "/usr/local/lib/python2.6/dist-packages/virtinst/VirtualNetworkInterface.py", >>> line 153, in __init__ >>> self.network = network >>> File "/usr/local/lib/python2.6/dist-packages/virtinst/XMLBuilderDomain.py", >>> line 309, in new_setter >>> fset(self, val, *args, **kwargs) >>> File "/usr/local/lib/python2.6/dist-packages/virtinst/VirtualNetworkInterface.py", >>> line 257, in set_network >>> "started.") % newnet) >>> ValueError: Virtual network 'default' has not been started. >> A very common cause of this problem is that a systemwide instance of >> dnsmasq is already (erroneously) listening on the bridge created by >> libvirt for the default network. I took your email as an oppurtunity to >> write an entry in the new Troubleshooting section of the libvirt wiki. >> It will explain to you how to solve your problem (*if* this is your >> problem, of course :-). > this is not my problem, as i dont use dnsmasq.You means you haven't a dnsmasq process is running before starting virtual network 'default', right? I want to know a cmdline argument of the dnsmasq process by ps -ef|grep dnsmasq> below is my /var/log/libvirt/libvirtd.log > > .... > 2012-02-15 01:54:18.358+0000: 10580: info : libvirt version: 0.9.10 > 2012-02-15 01:54:18.358+0000: 10580: error : virCommandWait:2308 : > internal error Child process (/sbin/iptables --table mangle --delete > POSTROUTING --out-interface virbr0 --protocol udp --destination-port > 68 --jump CHECKSUM --checksum-fill) status unexpected: exit status 2 > 2012-02-15 01:54:18.367+0000: 10580: error : virCommandWait:2308 : > internal error Child process (/sbin/iptables --table mangle --insert > POSTROUTING --out-interface virbr0 --protocol udp --destination-port > 68 --jump CHECKSUM --checksum-fill) status unexpected: exit status 2 > 2012-02-15 01:54:18.367+0000: 10580: warning : > networkAddGeneralIptablesRules:1301 : Could not add rule to fixup DHCP > response checksums on network 'default'. > 2012-02-15 01:54:18.367+0000: 10580: warning : > networkAddGeneralIptablesRules:1302 : May need to update iptables > package& kernel to support CHECKSUM rule. > > > and currently output of "brctl show" is: > # brctl show > bridge name bridge id STP enabled interfaces > pan0 8000.000000000000 no > virbr0 8000.000000000000 yesIf you manually stop virtual network 'default' and dnsmasq service then restart 'default' network, does it work for you? for instance: % virsh net-destroy default % service dnsmasq status if your dnsmasq is still active then stop it, otherwise, please ignore the following step: % service dnsmasq stop make sure you haven't any dnsmasq process is running by ps -ef|grep dnsmasq, then active 'default' network again: % virsh net-start default if the above step is failed, please give related logs and virsh output. what's dnsmasq process with cmdline? % ps -ef|grep dnsmasq Good Luck! Alex> so what is wrong with my system? > > thanks, > Jun > > -- > libvir-list mailing list > libvir-list at redhat.com > https://www.redhat.com/mailman/listinfo/libvir-list