Re: [fedora-virt] Routing to guests
by Robert Thiem
> From: Philip Rhoades
> I can ssh from/to the host/guest OK but how do I set up a route (or
> whatever is necessary) so that another machine:
> eth0: 192.168.0.12
> can ssh to the guest? - "ssh 192.168.122.68" gives "no route to host" -
> http://docs.fedoraproject.org/virtualization-guide/f12/en-US/html/ but
> the problem does not seem to be covered there.
Alexander is correct in saying that bridging would allow you to do that.
There are two networking discussed in the guide.
The first is a NAT (network address translation), in which the guests are
given "private" ip addresses and any outbound traffic appears to be coming
from the host machine's IP address. This is the same as the setup on your
ADSL router where the internal network machines get addresses of
192.168.x.x but the internet sees your requests as coming from the IP
address of your router.
There should be lots of documentation in linux firewalling guides under
sections on NAT (or possibly called IP Masquerading in some). Have a look
at these for information on port forwarding to reveal services
inside the virtual (such as ssh).
The other option is bridging. This shares the physical network interface
of the host with the guest. In this case the VM acts as though it's a
machine plugged into the same subnet as the host, its services are
accessible like those of the host and it's as vulnerable to attack as the
host.
Robert
11 years, 4 months
Incresing size of Vista-guest storage F14-Host
by Frank Murphy
I have a need to run Vista (don't have xp) as an F14 guest,
have it installed and working a few months.
(required for college)
it is a 31gb image, but I need to add more empty space to it.
Hence my image:
http://www.zimagez.com/zimage/screenshot-230111-104704.php
Using Virt-Manager, I have a choice of overwriting my existing Vista,
or creating a new empty-guest.
Can I increaser Vista from 31gb to 50gb?
--
Regards,
Frank Murphy
UTF_8 Encoded
Friend of Fedora
12 years, 4 months
F14 host, no usb in guests?
by Frank Murphy
Ho do I get the guest to know when a usb (any device) is
attached/inserted.
The host panel just pops up, with the usb device.
Nothing on the guese (fullscreen)
happens on F13/14/rawhide guests.
Have I left out some setting?
--
Regards,
Frank Murphy
UTF_8 Encoded
Friend of Fedora
12 years, 4 months
install to new lvm storage pool fails
by fp.to.anomalyst@xoxy.net
Looks like the attachment was stripped.
Here's the info inline
==================================
Fri, 21 Jan 2011 11:02:47 DEBUG Launched with command line:
/usr/bin/virt-install --name junkfoo1 --debug --description=site:junk
role:foo --ram=512 --virt-type=kvm --vcpus=1 --check-cpu --accelerate
--os-type=linux os-variant=fedor14 --initrd-inject=/iso/ks/foo.ks
--extra-args ks=file:/foo.ks --video=vmvga --disk
vol=VGlv2/junkfoo1.img,bus=ide,device=disk --vnc
--location=/iso/Fedora-14-x86_64-DVD.iso
Fri, 21 Jan 2011 11:02:47 DEBUG Requesting libvirt URI default
Fri, 21 Jan 2011 11:02:47 DEBUG Received libvirt URI qemu:///system
Fri, 21 Jan 2011 11:02:47 DEBUG Requesting virt method 'default',
hv type 'kvm'.
Fri, 21 Jan 2011 11:02:47 DEBUG Received virt method 'hvm'
Fri, 21 Jan 2011 11:02:47 DEBUG Hypervisor name is 'kvm'
Fri, 21 Jan 2011 11:02:47 DEBUG Parsed volume: as pool='VGlv2'
vol='junkfoo1.img'
Fri, 21 Jan 2011 11:02:47 DEBUG parse_disk: returning {'format':
None, 'bus': 'ide', 'readOnly': False, 'volInstall': None, 'path':
'VGlv2/junkfoo1.img', 'device': 'disk', 'volName': ('VGlv2',
'junkfoo1.img'), 'conn': <libvirt.virConnect instance at 0x1609bd8>,
'size': None, 'driverType': None, 'driverCache': None, 'shareable':
False, 'driverName': None, 'sparse': True}
Fri, 21 Jan 2011 11:02:47 DEBUG Overwriting 'path' with value from
StorageVolume object.
Fri, 21 Jan 2011 11:02:47 DEBUG DistroInstaller location is a local
file/path: /iso/Fedora-14-x86_64-DVD.iso
Starting install...
Fri, 21 Jan 2011 11:02:47 DEBUG Preparing mount at
/var/lib/libvirt/boot/virtinstmnt.wirs7a
Fri, 21 Jan 2011 11:02:47 DEBUG Attempting to detect distro:
Fri, 21 Jan 2011 11:02:47 DEBUG Fetching URI:
/var/lib/libvirt/boot/virtinstmnt.wirs7a/.treeinfo
Fri, 21 Jan 2011 11:02:47 DEBUG Saved file to
/var/lib/libvirt/boot/virtinst-.treeinfo.jz10Od
Retrieving file .treeinfo...
| 2.0
kB 00:00 ...
Fri, 21 Jan 2011 11:02:47 DEBUG Fetching URI:
/var/lib/libvirt/boot/virtinstmnt.wirs7a/images/pxeboot/vmlinuz
Fri, 21 Jan 2011 11:02:48 DEBUG Saved file to
/var/lib/libvirt/boot/virtinst-vmlinuz.nNPKiR
Retrieving file vmlinuz...
| 7.2
MB 00:00 ...
Fri, 21 Jan 2011 11:02:48 DEBUG Fetching URI:
/var/lib/libvirt/boot/virtinstmnt.wirs7a/images/pxeboot/initrd.img
Fri, 21 Jan 2011 11:02:48 DEBUG Saved file to
/var/lib/libvirt/boot/virtinst-initrd.img.EVIRsy
Retrieving file initrd.img...
| 61
MB 00:00 ...
Fri, 21 Jan 2011 11:02:48 DEBUG Cleaning up mount at
/var/lib/libvirt/boot/virtinstmnt.wirs7a
Fri, 21 Jan 2011 11:02:48 DEBUG Unpacking initrd.
Fri, 21 Jan 2011 11:02:49 DEBUG Copying /iso/ks/foo.ks to the initrd.
Fri, 21 Jan 2011 11:02:49 DEBUG Repacking the initrd.
Fri, 21 Jan 2011 11:02:53 DEBUG Generated install XML:
<domain type='kvm'>
<name>junkfoo1</name>
<currentMemory>524288</currentMemory>
<memory>524288</memory>
<uuid>072866f2-e7d2-e4d3-770e-3764bf023086</uuid>
<description>site:junk role:foo</description>
<os>
<type arch='x86_64'>hvm</type>
<kernel>/var/lib/libvirt/boot/virtinst-vmlinuz.nNPKiR</kernel>
<initrd>/var/lib/libvirt/boot/virtinst-initrd.img.EVIRsy</initrd>
<cmdline> ks=file:/foo.ks</cmdline>
</os>
<features>
<acpi/><apic/><pae/>
</features>
<clock offset="utc"/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>destroy</on_reboot>
<on_crash>destroy</on_crash>
<vcpu>1</vcpu>
<devices>
<emulator>/usr/bin/qemu-kvm</emulator>
<disk type='block' device='disk'>
<driver name='qemu' type='raw'/>
<source dev='/dev/VGpool2/junkfoo1.img'/>
<target dev='hda' bus='ide'/>
</disk>
<disk type='file' device='disk'>
<driver name='qemu'/>
<source file='/iso/Fedora-14-x86_64-DVD.iso'/>
<target dev='hdb' bus='ide'/>
<readonly/>
</disk>
<interface type='network'>
<source network='default'/>
<mac address='52:54:00:a2:5e:e8'/>
</interface>
<input type='mouse' bus='ps2'/>
<graphics type='vnc' port='-1' keymap='en-us'/>
<console type='pty'/>
<video>
<model type='vmvga'/>
</video>
</devices>
</domain>
Fri, 21 Jan 2011 11:02:53 DEBUG Removing
/var/lib/libvirt/boot/virtinst-vmlinuz.nNPKiR
Fri, 21 Jan 2011 11:02:53 DEBUG Removing
/var/lib/libvirt/boot/virtinst-initrd.img.EVIRsy
Fri, 21 Jan 2011 11:02:53 ERROR internal error Process exited while
reading console log output: char device redirected to /dev/pts/4
qemu-kvm: -device
ide-drive,bus=ide.0,unit=1,drive=drive-ide0-0-1,id=ide0-0-1: Can't use
a read-only drive
qemu-kvm: -device
ide-drive,bus=ide.0,unit=1,drive=drive-ide0-0-1,id=ide0-0-1: Device
'ide-drive' could not be initialized
Fri, 21 Jan 2011 11:02:53 DEBUG Traceback (most recent call last):
File "/usr/bin/virt-install", line 1019, in main
start_time, guest.start_install)
File "/usr/bin/virt-install", line 1061, in do_install
dom = install_func(conscb, progresscb, wait=(not wait))
File "/usr/lib/python2.7/site-packages/virtinst/Guest.py", line
1023, in start_install
return self._do_install(consolecb, meter, removeOld, wait)
File "/usr/lib/python2.7/site-packages/virtinst/Guest.py", line
1088, in _do_install
"install")
File "/usr/lib/python2.7/site-packages/virtinst/Guest.py", line
1059, in _create_guest
dom = self.conn.createLinux(start_xml, 0)
File "/usr/lib64/python2.7/site-packages/libvirt.py", line 1277, in
createLinux
if ret is None:raise libvirtError('virDomainCreateLinux() failed',
conn=self)
libvirtError: internal error Process exited while reading console log
output: char device redirected to /dev/pts/4
qemu-kvm: -device
ide-drive,bus=ide.0,unit=1,drive=drive-ide0-0-1,id=ide0-0-1: Can't use
a read-only drive
qemu-kvm: -device
ide-drive,bus=ide.0,unit=1,drive=drive-ide0-0-1,id=ide0-0-1: Device
'ide-drive' could not be initialized
==================================
the command also fails when creating the volume with pool
==================================
Fri, 21 Jan 2011 11:12:10 DEBUG Launched with command line:
/usr/bin/virt-install --name junkfoo1 --debug --description=site:junk
role:foo --ram=512 --virt-type=kvm --vcpus=1 --check-cpu --accelerate
--os-type=linux os-variant=fedor14 --initrd-inject=/iso/ks/foo.ks
--extra-args ks=file:/foo.ks --video=vmvga --disk
pool=VGlv2,size=8,bus=ide,device=disk --vnc
--location=/iso/Fedora-14-x86_64-DVD.iso
Fri, 21 Jan 2011 11:12:10 DEBUG Requesting libvirt URI default
Fri, 21 Jan 2011 11:12:10 DEBUG Received libvirt URI qemu:///system
Fri, 21 Jan 2011 11:12:10 DEBUG Requesting virt method 'default',
hv type 'kvm'.
Fri, 21 Jan 2011 11:12:10 DEBUG Received virt method 'hvm'
Fri, 21 Jan 2011 11:12:10 DEBUG Hypervisor name is 'kvm'
Fri, 21 Jan 2011 11:12:10 DEBUG parse_disk: returning {'format':
None, 'bus': 'ide', 'readOnly': False, 'volInstall':
<virtinst.Storage.LogicalVolume object at 0x1b0d190>, 'path': 'VGlv2',
'device': 'disk', 'volName': None, 'conn': <libvirt.virConnect
instance at 0x1b07bd8>, 'size': 8.0, 'driverType': None,
'driverCache': None, 'shareable': False, 'driverName': None, 'sparse':
True}
Fri, 21 Jan 2011 11:12:10 DEBUG Overwriting 'path' with value from
StorageVolume object.
Fri, 21 Jan 2011 11:12:10 DEBUG DistroInstaller location is a local
file/path: /iso/Fedora-14-x86_64-DVD.iso
Starting install...
Fri, 21 Jan 2011 11:12:11 DEBUG Preparing mount at
/var/lib/libvirt/boot/virtinstmnt.0ukb__
Fri, 21 Jan 2011 11:12:11 DEBUG Attempting to detect distro:
Fri, 21 Jan 2011 11:12:11 DEBUG Fetching URI:
/var/lib/libvirt/boot/virtinstmnt.0ukb__/.treeinfo
Fri, 21 Jan 2011 11:12:11 DEBUG Saved file to
/var/lib/libvirt/boot/virtinst-.treeinfo.A2M14A
Retrieving file .treeinfo...
| 2.0
kB 00:00 ...
Fri, 21 Jan 2011 11:12:11 DEBUG Fetching URI:
/var/lib/libvirt/boot/virtinstmnt.0ukb__/images/pxeboot/vmlinuz
Fri, 21 Jan 2011 11:12:11 DEBUG Saved file to
/var/lib/libvirt/boot/virtinst-vmlinuz.En5FYi
Retrieving file vmlinuz...
| 7.2
MB 00:00 ...
Fri, 21 Jan 2011 11:12:11 DEBUG Fetching URI:
/var/lib/libvirt/boot/virtinstmnt.0ukb__/images/pxeboot/initrd.img
Fri, 21 Jan 2011 11:12:11 DEBUG Saved file to
/var/lib/libvirt/boot/virtinst-initrd.img.TPsuX7
Retrieving file initrd.img...
| 61
MB 00:00 ...
Fri, 21 Jan 2011 11:12:11 DEBUG Cleaning up mount at
/var/lib/libvirt/boot/virtinstmnt.0ukb__
Fri, 21 Jan 2011 11:12:11 DEBUG Unpacking initrd.
Fri, 21 Jan 2011 11:12:12 DEBUG Copying /iso/ks/foo.ks to the initrd.
Fri, 21 Jan 2011 11:12:12 DEBUG Repacking the initrd.
Fri, 21 Jan 2011 11:12:16 DEBUG Creating storage volume
'junkfoo1-1.img' with xml:
<volume>
<name>junkfoo1-1.img</name>
<capacity>8589934592</capacity>
<allocation>0</allocation>
<target>
</target>
</volume>
Allocating 'junkfoo1-1.img'
| 8.0
GB 00:00
Fri, 21 Jan 2011 11:12:18 DEBUG Storage volume 'junkfoo1-1.img'
install complete.
Fri, 21 Jan 2011 11:12:18 DEBUG Can't fix selinux context in this case.
======================================================================
12 years, 4 months
Dom0 xen support in Fedora 15?
by M A Young
I am trying to work out whether it is practical to propose Dom0 xen
support as a feature for Fedora 15.
The kernel situation is that Domain 0 has been accepted upstream for
2.6.37. Assuming a 3 month kernel release cycle, F15 will most likely ship
with a 2.6.37.x kernel, with 2.6.38 coming out either after the F15
release or just before but too late to be included. If the plan to get key
xen drivers into 2.6.38 succeeds, then F15 may be become usable as a
Domain 0 system at some point during its lifetime as the kernel package in
a Fedora version typically has one major update.
If the kernel team accept backported patches then it might just be
possible to ship F15 with usable Domain 0 support but the timescale for
that would be very tight.
The other thing we would need to consider is what needs to be done to make
xen friendly enough to be usable by an ordinary user. The page
https://fedoraproject.org/wiki/Features/XenPvopsDom0 contains plans from
when dom0 xen support was expected to make a quick return to Fedora, but
they are a couple of years old now so probably need updating.
I think as a minimum we would need a way to add a dom0 enabled grub entry
for a kernel, rather than requiring the user to hand edit the grub file.
We should also make sure that xen works with the other Fedora
virtualisation tools.
What do others think about this? For example is it achievable as a
feature, is it too early and better to wait for F16, and what else should
we aim to do to make xen usable in Fedora?
Michael Young
12 years, 4 months
install to new lvm storage pool fails
by fp.to.anomalyst@xoxy.net
Thanx for the earlier kickstart help, for some reason my brain kept
farting me into interpreting :'path' as directory path and not the
fully qualified file path.
Attached is the virt-install debug.
The XML appears correct to me mapping the new allocation to hda as the
first definition, but only seems to find the hdb iso/dvd pseudo drive.
I have also tried scsi and virtio bus types to no avail.
Is this a bug I shoud file or another I/O error (Inept/Operator)
Assuming things were working correctly would the bus=scsi or
bus=virtio give perceptibly better performance?
12 years, 4 months
supplying kickstart file using initrd-inject?
by fp.to.anomalyst@xoxy.net
>From the man page:
--initrd-inject=PATH
Add PATH to the root of the initrd fetched with "--location". This
can be used to run an automated install without requiring a network
hosted kickstart file:
--initrd-injections=/path/to/my.ks --extra-args ``ks=file:/my.ks''
The tree:
# ll /iso
lrwxrwxrwx. 1 root root 9 Jan 13 16:09 /iso -> /aaa1/iso
# ll /iso/F*
-rw-r--r--. 1 root root 719323136 Jan 15 06:40 /iso/Fedora-14-i686-Live-KDE.iso
-rw-r--r--. 1 qemu qemu 3520802816 Jan 4 16:38 /iso/Fedora-14-x86_64-DVD.iso
-rw-r--r--. 1 qemu qemu 230686720 Jan 3 16:52
/iso/Fedora-14-x86_64-netinst.iso
# ll /iso/ks/*.ks
-rw-------. 1 root root 2477 Jan 17 11:32 /iso/ks/foo.ks
The command:
virt-install --name junkfoo1 --ram=512
--location=/iso/Fedora-14-x86_64-DVD.iso --file=/dev/sdc2 --file-size
8 --virt-type=kvm --vcpus=1 --check-cpu --accelerate --os-type=linux
os-variant=fedor14 --initrd-inject=/iso/ks --extra-args
ks=file:/foo.ks --vnc
The result:
ERROR [Errno 21] Is a directory: '/iso/ks'
My google-fu does not seem to turn up an answer as to how I might be
futzing this up.
TIA for a cluestick to the head.
Bonus question:
Since the --file is spec'ing a partition which, of course, has an
intrinsic size, is the size option a) unneeded b) incorrect c) ignored
or some combination?
--file=/dev/sdc2 --file-size 8
12 years, 4 months
Re: [fedora-virt] KVM high available
by iarly selbir
Sorry, I forgot to mentions it, Yes I have this configuration two failover
domain, first with host-1 on top, and other with host-2 on top.
My question is, how you guys are configuring your guests resources to
failover from on hosts to another, remembering that I have same machines on
two kvm hosts, i.e. kvm001 has guest001 on, and kvmsrv002 has guest001 ( It
must be powered on just in fail of guest0001 on kvm001)
I hope being clear enough.
Thank you so much.
- -
iarlyy selbir
:wq!
On Fri, Jan 14, 2011 at 3:18 PM, Thomas Sjolshagen <thomas(a)sjolshagen.net>wrote:
> On Fri, 14 Jan 2011 14:19:52 -0300, iarly selbir <iarlyy(a)gmail.com> wrote:
>
> Hi there,
> Hi I'm joining today an would like to share my knowledge with
> virtualization and get more = )
> when KVM-HOST-001 fail, the KVM-HOST-002 take over all machines from
> other host, I'm sharing a storage volume between two nodes (gfs2), so all
> hosts can see the guest images, but how to configure the clusters resources
> to migrate the guests? this is my question and any suggestions will be
> appreciated.
>
> Assuming you're using libvirt to manage the VM's (guests), I'd configure
> them as <vm> resources in rgmanager and make them members of a failover
> group with the highest (shows up as the lowest priority number in the
> example) priority to the KVM-HOST-* you want the guest to start on (if it's
> available).
> A couple of (example) <vm> resource I have configured in my 2-node GFS2
> based KVM cluster (some of the info in the vm resource tag is actually not
> necessary, but I was both experimenting and playing it safe when I set this
> up)
> <rm>
> <failoverdomains>
> <failoverdomain name="prefer-virt0" restricted="0"
> ordered="1">
> <failoverdomainnode name="virt0-backup"
> priority="10" />
> <failoverdomainnode name="virt1-backup"
> priority="20" />
> </failoverdomain>
> <failoverdomain name="prefer-virt1" restricted="0"
> ordered="1">
> <failoverdomainnode name="virt1-backup"
> priority="10" />
> <failoverdomainnode name="virt0-backup"
> priority="20" />
> </failoverdomain>
> </failoverdomains>
> <!-- VM resources -->
> <vm name="imap1" autostart="1" recovery="restart" migrate="live"
> domain="prefer-virt0" use_virsh="1" hypervisor="qemu" />
> <vm name="imap2" autostart="1" recovery="restart" migrate="live"
> domain="prefer-virt1" use_virsh="1" hypervisor="qemu" />
> </rm>
> Hope this helps to illustrate.
> // Thomas
>
12 years, 4 months
Fedora Virt status
by Justin Forbes
Fedora 14
- We have 79 open bugs, 9 of which have fixes in awaiting updates.
- 1 bug has been closed in the last week
- Virt-preview has been opened for Fedora 14, more details below
Fedora 15
- Upcoming Deadlines:
2011-01-25 Feature Submission Deadline (2 Weeks!)
2011-02-08 Feature Freeze--Planning & Development Ends
2011-02-08 Branch Fedora 15 from Rawhide-- Branch Freeze
2011-02-15 Software String Freeze
2011-02-15 Alpha Change Deadline
2011-03-01 Alpha Release
2011-03-15 Software Translation Deadline
2011-03-22 Beta Change Deadline Features 100% Complete
2011-04-05 Beta Release
2011-04-25 Final Change Deadline
2011-04-26 Compose 'Final' RC
2011-05-10 Fedora 15 Final Release
- Feature submission deadline is fast approaching, let's get those feature
submissions done.
== Virt Preview Repository ==
The virt-preview repository is now active for F14 users wishing to run the
latest F15 virt packages on their stable F14 systems. F13 virt-preview users
will still get the latest F14 packages. For details on how to run enable
virt-preview, please see:
https://fedoraproject.org/wiki/Virtualization_Preview_Repository
Also note that virt-preview for F14 and later releases will live on the new(ish)
repos.fedorapeople.org site.
== Bugs of importance: ==
- 662380 Encrypted disks do not work
Using virsh to create the encrypted disk, resulting disk is unusable.
- 655280 libvirt does not support vendor/product based USB device
passthrough with QEMU
- 656943 KVM guest crashes if vmware vga option is used
Reports of qemu crashing when a vga option is passed, using debian guests
- 589130 USB disk not marked as removable
USB Mass storage devices are not marked as removable to a guest.
Bug has been filed upstream as well there is some debate as to what is
the correct behavior here.
12 years, 4 months
Creating a F14 VM on a F13 host crashes host
by Fred Brier
When I try to install an F14 VM on on an up-to-date F13 host using virt-manager. It crashes the host. I have tried this twice and it happened in exactly the same spot. After you specify the ISO medium and the VM OS type, version, and an LVM volume, it starts to boot, you select the Install option and then it crashes. Has anyone else seen this? I might expect a failure to create a VM, but not to crash the entire host OS. The host has had over 5 VMs and never had a problem.
I did try creating an F11 VM using virt-manager on the same F13 host is going fine. It looked like it was going to succeed, but then crashed the host after it had installed all the packages for the new VM and was in the process of rebooting. So now I feel something is corrupted. I have created F11 hosts under F11 previously. Thank you for any information on resolving this.
12 years, 4 months