[SOLVED] KVM Virtual machine using virt-install on a LVM partition

Hello,
I am far from an expert, and I am trying to build a virtual machine (debian squeeze) on my Arch 64 bits host. The VM will serve as a server with usual services (http, mail, ftp, media server etc). This is only for my own purpose and I do it as a hobby.I have no obligation to success, and more important I want to understand everything i do. I have some doubts, so why my post here.
I want to install the VM on a LVM partition.
-I first create successfully a LVM partition on /dev/sda4
$fdisk -l /dev/sda
/dev/sda4 1925115904 2949116309 512000203 8e LVM Linux
I will install the VM (named "daffodil") on a 200G Logical Volume on groupe vg0
$ lvcreate –n lv_daffodil –L 200G vg0
Logical volume “lv_daffodil” created
Now I need to create the VM. I want to use virt-install IN COMMAND LINE. After days an days of reading (and headache), here is what i think is the correct command :
virt-install --connect qemu:///system --name=daffodil --ram 8192 --cpu host
--disk path=/dev/vg0/lv_daffodil,size=200,bus=virtio,sparse=false,format=raw --cdrom /var/lib/libvirt/images/isofiles/debian-6.0.4-amd64-netinst.iso
--description="daffodil (debian squeeze) - vm guest on host magnolia" --graphics vnc --os-type=linux --os-variant=debiansqueeze
--network bridge:br0 --video=vga --hvm --accelerate
So my questions :
Is the command correct and academic?
I think size=200 is maybe not needed, as the LV has already be created. Right?
format=raw seems weird to me and not needed. Right?
My host has 16G RAM. Shall I put 16 as --ram argument or stay with 8 ?
How about the filesystem? I want an ext4. Shall I create it on lv_daffodil BEFORE the install or will I do it under the install process when partitioning?
Any advantage in creating smaller than 200G logical volume, even if I want my VM have enough space (The whole HD is 2T)?
Not sure about the --accelerate argument
Any hint for optimization?
As a n00b ++, will I be able to manage SELinux on my server, as it seems a litle bit tricky?
what about --noautoconsole argument?
Thank you for your help and knowledge.
Last edited by gabx (2012-05-02 10:39:16)

As I didn't have any answer in one week, I suscribed to [email protected]
For those of you interested in KVM, find below a script doing excatly the needed job.
#!/bin/bash
#created Thursday April 26 2012
#following Richard W.M.Jones <[email protected]> advices and script
#this script can be changed according your own need. This one will
#install a debian VM called daffodil on a LVM partition, with 2 CPU, 8192 RAM
# Script used to install VMs.
# You have to lvcreate the disk first!
# lvcreate -L sizeG -n $name vg_data
set -e
name=daffodil
cpus="--cpu=host --vcpus=2"
disk="--disk path=/dev/vg0/lv_daffodil"
location="--cdrom /var/lib/libvirt/images/isofiles/debian-6.0.4-amd64-netinst.iso
type="--os-type=linux"
variant="--os-variant=debiansqueeze"
graphics="--graphics spice"
bus="virtio"
network="--network bridge=br0"
virt-install -n $name -r 8192 \
$name $cpus $type $variant $disk $location $graphics $bus $network
To answer to some of my queries in first post:
no need to give the size as I want to use the full lvm I created first. Virt-install will pick up the size
the filesystem will be created during install
CPU amount should be less than the host, as well as CPU numbers.
--accelerate argument is no more needed
spice give usually better graphic results than vnc

Similar Messages

  • Can the boot camp partition be resized once windows is installed and running as virtual machine using vm fusion ware?

    I have macbook air partitioned 505/50 and running OSX and win 7 side by side as virtual machines using vm fusion.  Can the partition size be changed without starting over?

    Very helpful.  I started with vm ware to create a pseudo drive but could not import win 7 over home network.  mac has no immediate way to connect to network without adapter, and has no cdrom.  So i used boot camp to create partition, then made a bootable win7 iso file on a memory stick using win 7 usb/cdrom download tool from microsoft, and rEFIT to get mac to boot from the mem stick into the dos partition.  Then i ran vm fusion to import the win 7 partition as a virtual machine.  OSx and win 7 run side by side.
    Seems from what you say that sizing cannot be accomplished without deleting partition and starting over.  If I start over and just run vm fusion to create he win7 virtual machine, not sure how I would bet the minimum win 7 os into the ac.  Perhaps vm will boot from the mem stick using refit.  Do you know?

  • Having trouble with creation of a cloud service with multiple virtual machines using java sdk.

    I am creating a cloud service on azure with 2 virtual machines using java sdk API. Service created successfully.
    My input endpoint details are as follows.
    INPUT ENDPOINTS
    Head : 191.238.144.47:2400
    Head : 191.238.144.47:22
    Node0 : 191.238.144.47:43211
    For Head instance port 2400 is for HTTPS and port 22 is for SSH and for Node0 instance port 43211 is for SSH.
    But I am having problem with doing a ssh on Head instance. Sometimes it works sometimes doesn't. Same problem with HTTPS also.
    I have some application running over there but when i try to access it thru browser sometimes it works but most of the time doesn't. When I restart the instances from azure portal, its works after
    that(not always but most of the time). 
    Now I am confused what is going on there. I am creating cloud service and virtual machines using java sdk and setting input endpoints also. After creation of all instances i restart every instance programmatically .
    I am not sure whether restart is required or not. It must be something to do with input endpoints only but not able to get the right thing i guess. When i do the same thing thru azure portal(creation of cloud service with virtual machines and setting up input
    end points) everything works fine but not achieving the result when implementing it by java sdk API. Please help me.

    HI Nithin,
    Thanks for your reply. I am setting the endpoints after creating my instances using update call. Here's the code snippet.
    AzureService aServ = new AzureService(session);
     if(aServ.checkNameAvailability(clusterName)) {
               aServ.createHostedService(clusterName, "dbX cluster");         
             // Creating head instance
             aServ.createHead(clusterName, imgName, headType, userName, pswd);  
            // Setting end points for head node
             String name = "ssh";
             int port = 22;
             aServ.updateVMInputEndpoint(clusterName, "Head", name, port);
             // Restarting head instance
             aServ.restartVM(clusterName, "Head");
           String roleName = "Node";
           String tmpRoleName = "";
           for(int i=0; i<noi; i++) {
                      port = 43210+(i+1);
                      tmpRoleName = roleName + i;
                   // Creating node instance
                    aServ.createVM(clusterName, tmpRoleName, imgName, nodeType, userName, pswd);
                  // Setting end points for node instance
                   aServ.updateVMInputEndpoint(clusterName, tmpRoleName, name, port);
                  // Restarting node instance
                 aServ.restartVM(clusterName, tmpRoleName);
          // Method to update the input endpoint details 
          public void updateVMInputEndpoint(String clusterName, String vmName, String name, int port)
            throws Exception {
                    VirtualMachineGetResponse resp = computeManagementClient.getVirtualMachinesOperations().
                                                            get(clusterName, clusterName, vmName);
                    VirtualMachineUpdateParameters updateParameters = new VirtualMachineUpdateParameters();
                    //get the configuration list
                    ArrayList<ConfigurationSet> configlist = resp.getConfigurationSets();
                    //get inputendpoint list and update it
                    ArrayList<InputEndpoint> endpointlist = configlist.get(0).getInputEndpoints();
                    InputEndpoint inputEndpoint = new InputEndpoint();
                    inputEndpoint.setEnableDirectServerReturn(false);
                    inputEndpoint.setPort(port);
                    inputEndpoint.setLocalPort(port);
                    inputEndpoint.setName(name);
                    inputEndpoint.setProtocol(InputEndpointTransportProtocol.TCP);
                    endpointlist.add(inputEndpoint);
                    // Open port for https on head node
                    if(vmName.equals("Head")) {
                            inputEndpoint = new InputEndpoint();
                            inputEndpoint.setEnableDirectServerReturn(false);
                            inputEndpoint.setPort(2400);
                            inputEndpoint.setLocalPort(2400);
                            inputEndpoint.setName("https");
                            inputEndpoint.setProtocol(InputEndpointTransportProtocol.TCP);
                            endpointlist.add(inputEndpoint);
                    updateParameters.setConfigurationSets(configlist);
                    //required for update
                    OSVirtualHardDisk osVirtualHardDisk = resp.getOSVirtualHardDisk();
                    updateParameters.setOSVirtualHardDisk(osVirtualHardDisk);
                    updateParameters.setRoleName(resp.getRoleName());
                    OperationResponse updtResp = computeManagementClient.getVirtualMachinesOperations().update(clusterName, clusterName, resp.getRoleName(), updateParameters);
    And every time i am creating a new cloud service along with head and node instances. Region is "South Central US".
    I am setting ProvisionGuestAgent field to true at instance creation time. Thank you.

  • Can't install my printer on Windows virtual machine using  Leopard OS

    Have just installed Leopard and Parrallels software. I cannot install my HP C3180 printer on the virtual windows machine. USB plug and unplug are not recognized and suspect it is because the printer is in use on the Mac OS side. How can I get the same printer to be connected and usable in both MAC and Windows virtual machines?

    I had exactly the same issue as you when I wanted to print from my iMac to a printer that was attached to a Windows 7 machine.
    I found the solution at an Apple Support page, located at "http://support.apple.com/kb/HT3049".
    What really solved my problem was the introduction of the user PASSWORD in the address line, like this:
    smb://user:password@workgroup/server/sharename
    Read the Apple Support page I mentioned carefully to better understand what you will be doing.
    I hope this helps you.

  • Can't create new virtual machine with Virt-manager

    After going through the whole setup, I would get this error through backtrace:
    File "/usr/share/virt-manager/virtManager/netlist.py", line 346, in validate_network
    netobj.start()
    File "/usr/share/virt-manager/virtManager/network.py", line 104, in start
    self._backend.create()
    File "/usr/lib/python2.7/site-packages/libvirt.py", line 2755, in create
    if ret == -1: raise libvirtError ('virNetworkCreate() failed', net=self)
    libvirtError: Unable to create bridge virbr0: File exists
    Hence, I attempted to follow https://wiki.archlinux.org/index.php/Bridge_with_netctl to set up my network bridge and try again, and I'd still get the same error.
    I also tried to do sudo virt-manager but I'd get:
    ** (virt-manager:16835): WARNING **: Could not open X display
    No protocol specified
    (virt-manager:16835): Gdk-ERROR **: error: XDG_RUNTIME_DIR not set in the environment.
    I want to get KVM working using a gui and so I choice virt-manager, but now I'm stuck and don't know where to go from here.

    Hi Sir,
    Please follow these troubleshooting steps mentioned within the article below :
    http://blogs.technet.com/b/scvmm/archive/2012/08/13/kb-how-to-troubleshoot-the-needs-attention-and-not-responding-host-status-in-system-center-2012-virtual-machine-manager.aspx
    Best Regards,
    Elton Ji
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected] .

  • Hyper v virtual Machines should have installed integrated services or not ?

    Hi
    In my prodcution found hyper v virtual machines have no integrated services was installed should we installed on production servers is any impact if we didnt installed them.
    if it should installed then what is the best approch to installed.
    Thanks

    You posted in the Group Policy forum...
    That's a good question for the Hyper-V forum:
    http://social.technet.microsoft.com/Forums/en-US/home?forum=winserverhyperv
    Don
    (Please take a moment to "Vote as Helpful" and/or "Mark as Answer", where applicable.
    This helps the community, keeps the forums tidy, and recognises useful contributions. Thanks!)

  • How to Allow microphone and all hardware in Virtual Machine using Hyper-v

    I have recently installed Windows 10 preview in Windows 8.1 pro.
    How i can allow Microphone and all things in virtual machine from Hyper-v
    Thanks
    Thank You , Shan Ali Khan

    You connect to the VM using the RDP Client - connecting to the IP / name of the VM over the network.
    This enabled all device redirection by default.
    You can possibly use Enhanced Session Mode as well.  That again uses RDP under the hood.
    Brian Ehlert
    http://ITProctology.blogspot.com
    Learn. Apply. Repeat.

  • Build Novell 6 on virtual machine using windows 2008 r2?

    Hello.It will work this configuration?Somebody tried this?i have a novell 6 server using a IBM machine and i bought a new DELL machine with windows 2008 R2 enterprise.I want to put Novell server on a virtual machine build with 2008 R2.Will work novell on virtual machine?or i will have problem with workstation to "see" the TREE?i heard that this could be a problem, that putting a novell on a virtual machine, workstations won't see the built TREE.I also have a problem with my actual Novell:when i puuted it with IP, it didn't work, so i let it with IPX/SPX.But i have windows 7 workstation and i cannot connect them to my NOVELL network.Please help me.

    On 30/11/2011 07:56, shtou wrote:
    > Hello.It will work this configuration?Somebody tried this?i have a
    > novell 6 server using a IBM machine and i bought a new DELL machine with
    > windows 2008 R2 enterprise.I want to put Novell server on a virtual
    > machine build with 2008 R2.Will work novell on virtual machine?or i will
    > have problem with workstation to "see" the TREE?i heard that this could
    > be a problem, that putting a novell on a virtual machine, workstations
    > won't see the built TREE.I also have a problem with my actual
    > Novell:when i puuted it with IP, it didn't work, so i let it with
    > IPX/SPX.But i have windows 7 workstation and i cannot connect them to my
    > NOVELL network.Please help me.
    By "Novell 6" do you perhaps mean NetWare 6 (Novell is the company not
    the product)? Does "6" imply 6.0 or 6.5? The latter is more suited to
    being virtualised.
    HTH.
    Simon
    Novell Knowledge Partner (NKP)
    Do you work with Novell technologies at a university, college or school?
    If so, your campus could benefit from joining the Novell Technology
    Transfer Partner (TTP) program. See novell.com/ttp for more details.

  • Windows server 2008 r2 virtual machine uses much less memory then it has assigned

    Guys,
    I had a virtual machine with windows 2008 r2 operating system, running sharepoint, on a server where it had 6gb RAM memory assigned.
    Now I bought a new server, which has 32 gb of ram. I moved my virtual machine there, and assigned 24gb of RAM.
    But after I started VM, in Windows Task Manager I see that system uses only about 6.5 GB of RAM assigned. That is not even close to 24gb, which it has available.
    Is there any power shell script or anything else available to increase virtual machine memory usage?
    Thank you. 

    Hi,
    I found a KB similar described with your issue- the Hyper-V host cannot allocate more memory to the virtual machine because there is not enough free disk space to extend the
    memory contents file, more detail symptoms please refer the following KB:
    Dynamic Memory allocation in a Virtual Machine does not change although there is available memory on the host
    http://support.microsoft.com/kb/2504962/en-us
    Hope this helps.
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • Failed to revert to VSS snapshot on the virtual hard disk '\\?\Volume{0f7b010b-f397-11e0-a76b-002655db9b10}\' of the virtual machine | Using HYPER-V 2008 R2

    Hi,
    I got this error on one of the VM (web server) backed up usng HYPER-V 2008 R2 and when I looked up, there is an microsoft hotfix for the same issue.
    Microsoft KB Hotfix:
    A backup of virtual machines fails when you use the Hyper-V VSS writer to back up virtual machines concurrently on a computer that is running Windows Server 2008
    http://support.microsoft.com/kb/971394
    But, the VM (web server) is running Windows 2008 R2 - SP1.
    Hotfix says - To apply this hotfix, your computer must be running one of the following operating systems:
    Windows Server 2008
    Windows Server 2008 Service Pack 2 (SP2)
    Does it mean it does not apply to Windows 2008 R2 | SP1 ?
    When I checked the :
    Swprv.dll version, it was higher than the one mentioned in the hotfix.
    Thanks for any help.
    -Ashwin

    Hi Ashwin,
    I am assuming that the VM(web server) is using SQL .
    Please try to disable SQL Server VSS Writer in services.msc , then retry WSB again .
    Hope this helps
    Best Regards
    Elton Ji
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • Can I Manage virtual machines using SCCM? What about Amazon ec2 instances?

    Hi All,
    As part of my lab environment, I would like to discover and manage virtual machines within ESXi platform and a few on Hyper-V. As part of this, 
    1] Do we need SC-VMM to create/discover/manage virtual machines or can this be done by using just SCCM 2012 module?
    2] Does SCCM provide any connectors to public cloud services (ex: Amazon EC2 or Google Cloud services)? Can this be done using SCCM? 
    Any help on this would be appreciated. thanks

    Thanks Jason.
    A few follow up questions just to make sure I understand you correctly:
    a] Statement: I understand SCCM can manage OS within any VM (I just realized my set up has discovered 2 VM's running Win 2008 OS via AD discovery method). My confusion began after going thru SC-VMM docs. I assumed, once you have SC-VMM set up, it will discover/manage
    either ESXi servers or Citrix or other vendor hypervisors and then discover VM's within the hypervisors. But as you said, SCCM can manage OS within any VM.
    b] Q: my sccm set up is part of domain 'A' and its discovering systems/users as part of domain 'A'. Is there a way to discover systems as part of domain 'B'? When I look into 'discovery methods' -> Active directory system discovery -> Add a new container
    -> path -> select a new container -> it selects only domain 'A'
    As a result I'm not able to add a secondary domain for system discovery. IS this how its supposed to be? Discovery runs only within one domain? (or) am I missing something here?
    c] When you said 'Yes, I do think (I'm not familiar with all things VMM though) that there is a connector to EC2', did you mean a connector from SCCM or a connector from VMM component?
    thanks again for all the help.

  • Trigger a BSOD on Hyper-V Virtual Machine using CrashonCtrlScroll

    Hi All,
    I need to trigger a Memory Check on a VM running under Hyper-V 2012 R1. Using "http://msdn.microsoft.com/en-us/library/ff545499.aspx" as a guide a I have tried using the standard
    Right CTRL + Scroll Lock + Scroll Lock as well as alternate keys, e.g. Left and Right ALT keys etc.
    Unfortunately I can't seem to trigger the Memory Check.
    Has anyone else attempted to do this?
    Essentially I am troublehshooting an issues ehere the vendor needs a complete memory dump to work out what is loaded at the time the issue occurs.
    Any help would be great.
    NSutton

    Hi Nathan,
    If the specified VM is Generation 2 virtual machine running on a Windows Server 2012 Hyper-V host, you'll need instead to create the CrashOnCtrlScroll registry key in the guest operating system in this location:
    HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\hyperkbd\Parameters
    Either way be sure to reboot the guest operating system of your virtual machine once you have made any of the above registry changes so they can take effect.
    If your virtual machine is running Windows Server 2012 R2, you can use the new Debug-VM cmdlet of Windows PowerShell to bugcheck the virtual machine and generate a dump file. This cmdlet injects a non-maskable interrupt (NMI) into the guest operating system
    virtual machine which results in a bugcheck of the operating system. For the syntax and examples of using this cmdlet, see
    http://technet.microsoft.com/en-us/library/dn464280.aspx.
    Please let me know if this helps
    Thanks,
    Pankaj Joshi
    pankaj(MCT)

  • Upgrade pre-built Oracle Virtual Machine using  Siebel VM template

    Hello
    I'm planning to deploy a Siebel environment for testing purposes using Oracle Virtual Machines templates (http://www.oracle.com/technetwork/server-storage/vm/siebel-092480.html). this template has been made to deploy Siebel CRM SIA 8.1.1.ENU and i need the  8.1.1.7 version with ENU and ESN languages
    My main questions are:
    after complete the Siebel installation using this template (8.1.1 ENU), is it possible to upgrade to 8.1.1.7 version? is it possible to add ESN language?
    thanks and best regards!
    Francisco Ruiz
    Oracle Consulting Mexico
    Edited by: user733897 on 1/03/2013 11:59 AM

    Wilson
    Thanks by kind help, but im still face issues, the log indicates a license error but i already introduce the licenses codes but is still showing the error on login.
    ServerLog     ProcessCreate     1     00000d67513a0900:0     2013-03-08 20:45:59     Created server process (OS pid =      2525     ) for SCCObjMgr_enu
    ServerLog     ProcessCreate     1     00000d67513a0900:0     2013-03-08 20:45:59     Created server process (OS pid =      2542     ) for SMObjMgr_enu
    ServerLog     ProcessExit     1     00000d68513a0900:0     2013-03-08 20:56:35     SvrTblCleanup      2431     SBL-OMS-00103 Process 2431 exited with error - Error %1 initializing the license key
    ServerLog     ProcessCreate     1     00000d67513a0900:0     2013-03-08 20:56:35     Created server process (OS pid =      2656     ) for SvrTblCleanup
    ServerLog     ProcessExit     1     00000d68513a0900:0     2013-03-08 20:56:35     SvrTaskPersist      2432     SBL-OMS-00103 Process 2432 exited with error - Error %1 initializing the license key
    ServerLog     ProcessCreate     1     00000d67513a0900:0     2013-03-08 20:56:35     Created server process (OS pid =      2670     ) for SvrTaskPersist
    Another log file
    2021 2013-03-11 18:00:07 0000-00-00 00:00:00 -0700 00000000 001 ffff 0001 09 SvrTblCleanup 848297986 28037 1101329440 /u01/app/siebel/ses/siebsrvr/enterprises/siebel/siebel811/log/SvrTblCleanup_0809_848297986.log 8.1.1 [21111] ENU
    ObjMgrLicense     Error     1     00000005513e6d85:0     2013-03-11 18:00:07     (dmlicmgr.cpp (133)) SBL-DAT-00171: A license key for this software has expired.
    Please enter a new key to proceed, or contact your system administrator.
    GenericLog     GenericError     1     00000005513e6d85:0     2013-03-11 18:00:07     Object manager error: ([0] A license key for this software has expired.
    Please enter a new key to proceed, or contact your system administrator.(SBL-DAT-00171) (0x7500ab))
    GenericLog     GenericError     1     00000005513e6d85:0     2013-03-11 18:00:07     ( (0) err=2818155 sys=7667883) SBL-OMS-00107: Object manager error: ([0] A license key for this software has expired.
    Please enter a new key to proceed, or contact your system administrator.(SBL-DAT-00171) (0x7500ab))
    GenericLog     GenericError     1     00000005513e6d85:0     2013-03-11 18:00:07     (ccfom.cpp (568) err=2818151 sys=0) SBL-OMS-00103: Error 7667883 initializing the license key
    GenericLog     GenericError     1     00000005513e6d85:0     2013-03-11 18:00:07     (bsvcmgr.cpp (658) err=2818151 sys=0) SBL-OMS-00103: Error 7667883 initializing the license key
    GenericLog     GenericError     1     00000005513e6d85:0     2013-03-11 18:00:07     (smishell.cpp (342) err=2818151 sys=0) SBL-OMS-00103: Error 7667883 initializing the license key
    TaskConfig     TaskCfgParamError     1     00000005513e6d85:0     2013-03-11 18:00:07     ***********Dumping Parameters for the current task (848297986) because of errors**********

  • Custom Domain name for Azure virtual machine using azure websites

    Hie, I am using a cloud service (e.g cloud1) and it has a hosted VM in it (Windows server 2012). It is having a URL cloud1.cloudapp.net. So I want to use the domain name (e.g azuresite1.azurewebsites.net)created from azure.
      So how do I add the Cname record and everything in this setup .
      I already tried to use
    this but that didn't work
     What additional steps are required to add custom domain name to an azure virtual machine and, the custom domain name is also an azure website

    If you want to use azuresite1.zurewebsites.net then i think, you have to create a azurewebsite. If you have a custom domain then following should work.
    You have findout the IP that is attached to the VM. 
    Point your domain name to that IP (using domain dashboard)
    Now your domain points to whatever the site hosted on the VM (port 80)
    If you have more sites then, you have specify HostName for the site which you want to use with domain name.
    Try and let me know if this helped.

  • Query virtual machine used space

    Hi,
    I have 3 physical servers with some virtual machines... How can I query/check the space allocated to each virtual machine?

    Insaponata,
    Greetings, you could use the du command, i.e.
    du -ah /OVS/running_pool
    or
    du -ah /OVS/running_pool<Virtual Machine Name>
    or
    du -ch /OVS/running_pool
    or
    du -ch /OVS/running_pool<Virtual Machine Name>
    For more details about Oracle VM storage and storage repositories please review: http://itnewscast.com/chapter-6-oracle-vm-22-san-iscsi-and-nfs-backend-storage-configurations
    Respectfully,
    Roddy

Maybe you are looking for